Class AlgorithmRGBtoGrays

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.utilities.AlgorithmRGBtoGrays
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, 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 Details

    • 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 Details

    • 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 Details

    • finalize

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

      public void runAlgorithm()
      Starts the program.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • calcStoreInDest

      private void calcStoreInDest()
      Calculates the new images.