Class AlgorithmRGBtoGrays

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmRGBtoGrays
    extends AlgorithmBase
    Simple algorithm that converts an RGB image to a red, green, and blue greyscale images.
    Version:
    1.0 Dec 30, 1999
    Author:
    Matthew J. McAuliffe, Ph.D.
    • Field Detail

      • destImageB

        private ModelImage destImageB
        Destination image (gray type) to store the Blue channel of the source image.
      • destImageG

        private ModelImage destImageG
        Destination image (gray type) to store the Green channel of the source image.
      • destImageR

        private ModelImage destImageR
        Destination image (gray type) to store the Red channel of the source image.
      • srcImage

        private ModelImage srcImage
        Source image RGB type image.
    • Constructor Detail

      • AlgorithmRGBtoGrays

        public AlgorithmRGBtoGrays​(ModelImage destImgR,
                                   ModelImage destImgG,
                                   ModelImage destImgB,
                                   ModelImage srcImg)
        Creates a new AlgorithmRGBtoGrays object.
        Parameters:
        destImgR - image model where result image of the Red channel is to be stored
        destImgG - image model where result image of the Green channel is to be stored
        destImgB - image model where result image of the Blue channel is to be stored
        srcImg - source image model
    • Method Detail

      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize in class AlgorithmBase
      • calcStoreInDest

        private void calcStoreInDest()
        Calculates the new images.