Class Pipeline

    • Field Detail

      • filtersToApply

        private final java.util.List<ImageFilter> filtersToApply
        A list of image filters to apply.
      • unmodifiableFiltersToApply

        private final java.util.List<ImageFilter> unmodifiableFiltersToApply
        An unmodifiable list of image filters to apply. Used by the getFilters() method. This object is created by Collections.unmodifiableList which provides an unmodifiable view of the original list. Therefore, any changes to the original list will also be "visible" from this list as well.
    • Constructor Detail

      • Pipeline

        public Pipeline()
        Instantiates a new Pipeline with no image filters to apply.
    • Method Detail

      • add

        public void add​(ImageFilter filter)
        Adds an ImageFilter to the pipeline.
        Parameters:
        filter - An ImageFilter.
      • addFirst

        public void addFirst​(ImageFilter filter)
        Adds an ImageFilter to the beginning of the pipeline.
        Parameters:
        filter - An ImageFilter.
      • addAll

        public void addAll​(java.util.List<ImageFilter> filters)
        Adds a List of ImageFilters to the pipeline.
        Parameters:
        filters - A list of filters to add to the pipeline.
      • getFilters

        public java.util.List<ImageFilter> getFilters()
        Returns a list of ImageFilters which will be applied by this Pipeline.
        Returns:
        A list of filters which are applied by this pipeline.
      • apply

        public java.awt.image.BufferedImage apply​(java.awt.image.BufferedImage img)
        Description copied from interface: ImageFilter
        Applies a image filtering operation on an image.
        Specified by:
        apply in interface ImageFilter
        Parameters:
        img - The image to apply the filtering on.
        Returns:
        The resulting image after applying this filter.