Class AbstractMultiImageOperation<T extends AbstractImageContainer>

    • Constructor Detail

      • AbstractMultiImageOperation

        public AbstractMultiImageOperation()
    • Method Detail

      • minNumImagesRequired

        public abstract int minNumImagesRequired()
        Returns the minimum number of images that are required for the operation.
        Returns:
        the number of images that are required, <= 0 means no lower limit
      • maxNumImagesRequired

        public abstract int maxNumImagesRequired()
        Returns the maximum number of images that are required for the operation.
        Returns:
        the number of images that are required, <= 0 means no upper limit
      • checkSameDimensions

        protected boolean checkSameDimensions​(T image1,
                                              T image2)
        Checks whether the two images have the same dimensions.
        Parameters:
        image1 - the first image
        image2 - the second image
        Returns:
        true if the same dimensions
      • checkSameDimensions

        protected String checkSameDimensions​(T[] images)
        Checks whether the images have the same dimensions.
        Parameters:
        images - the images
        Returns:
        null if the same dimensions, other error message
      • check

        protected void check​(T[] images)
        Checks the images.

        Default implementation only ensures that images are present.
        Parameters:
        images - the images to check
      • doProcess

        protected abstract T[] doProcess​(T[] images)
        Performs the actual processing of the images.
        Parameters:
        images - the images to process
        Returns:
        the generated image(s)
      • process

        public T[] process​(T[] images)
        Processes the images.
        Parameters:
        images - the images to process
        Returns:
        the generated image(s)