Class AlgorithmCenterOfMassRGB

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.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 Detail

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

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

      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize 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()