Class AlgorithmCenterOfMassRGB

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmCenterOfMassRGB
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmCenterOfMassRGB extends AlgorithmBase
* This algorithm calculates the red, green, and blue center of mass for 2D and 3D color images.
Version:
1.0 February 26, 2008
Author:
William Gandler
  • Field Details

    • entireImage

      private boolean entireImage
      Flag, if true, indicates that the whole image should be processed. If false on process the image over the mask areas.
    • thresholdB

      private float[] thresholdB
      DOCUMENT ME!
    • thresholdG

      private float[] thresholdG
      DOCUMENT ME!
    • thresholdR

      private float[] thresholdR
      Three arrays (R,G,B) containing minimum and maximum threshold for each channel.
  • Constructor Details

    • AlgorithmCenterOfMassRGB

      public AlgorithmCenterOfMassRGB(ModelImage srcImage, float[] thresholdR, float[] thresholdG, float[] thresholdB, boolean maskFlag)
      Default constructor for running algorithm to calculate red, green, and blue centers of mass.
      Parameters:
      srcImage - ModelImage source
      thresholdR - float[] red thresh
      thresholdG - float[] green thresh
      thresholdB - float[] blue thresh
      maskFlag - boolean whole image or voi
  • 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
    • calcInPlace2D

      private void calcInPlace2D()
      Calculate red, green, and blue centers of mass for 2D color image.
    • calcInPlace3D

      private void calcInPlace3D()
      Calculates red, green, and blue centers of mass in 3D color image.
    • getThresholdR

      public float[] getThresholdR()
    • getThresholdG

      public float[] getThresholdG()
    • getThresholdB

      public float[] getThresholdB()