Class AlgorithmMask

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

    public class AlgorithmMask
    extends AlgorithmBase
    Allow the user to fill a VOI or fill everything outside the VOI with a specific fill value.
    Version:
    0.1 Feb 11, 1998
    Author:
    Matthew J. McAuliffe, Ph.D.
    • Field Detail

      • imageFill

        private float imageFill
        Set the mask areas to this value.
      • imageFillB

        private float imageFillB
        DOCUMENT ME!
      • imageFillG

        private float imageFillG
        DOCUMENT ME!
      • imageFillR

        private float imageFillR
        DOCUMENT ME!
      • imageFillI

        private float imageFillI
      • polarity

        private boolean polarity
        if true then fill inside the VOI. If false then fill outside
    • Constructor Detail

      • AlgorithmMask

        public AlgorithmMask​(ModelImage srcImg,
                             float fill,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        srcImg - source image model
        fill - value used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
      • AlgorithmMask

        public AlgorithmMask​(ModelImage srcImg,
                             java.awt.Color _fillColor,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        srcImg - source image model
        _fillColor - color used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
      • AlgorithmMask

        public AlgorithmMask​(ModelImage destImg,
                             ModelImage srcImg,
                             float fill,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        destImg - image model where result image is to stored
        srcImg - source image model
        fill - value used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
      • AlgorithmMask

        public AlgorithmMask​(ModelImage srcImg,
                             float fillR,
                             float fillG,
                             float fillB,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        srcImg - source image model
        fillR - red value used to fill a region
        fillG - green value used to fill a region
        fillB - blue value used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
      • AlgorithmMask

        public AlgorithmMask​(ModelImage destImg,
                             ModelImage srcImg,
                             float fillR,
                             float fillG,
                             float fillB,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        destImg - image model where result image is to stored
        srcImg - source image model
        fillR - red value used to fill a region
        fillG - green value used to fill a region
        fillB - blue value used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
      • AlgorithmMask

        public AlgorithmMask​(ModelImage srcImg,
                             float fill,
                             float fillI,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        srcImg - source image model
        fill - real value used to fill a region
        fillI - imaginary value used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
      • AlgorithmMask

        public AlgorithmMask​(ModelImage destImg,
                             ModelImage srcImg,
                             float fill,
                             float fillI,
                             boolean polarity,
                             boolean useVOI)
        Creates a new AlgorithmMask object.
        Parameters:
        destImg - image model where result image is to stored
        srcImg - source image model
        fill - real value used to fill a region
        fillI - imaginary value used to fill a region
        polarity - flag indicating fill location, true = fill inside; false fill outside
        useVOI - use the VOI to define the mask area else it will use the painted area to define the mask.
    • Method Detail

      • calcInPlace25D

        public void calcInPlace25D​(java.util.BitSet mask,
                                   float fillValue,
                                   int tSlice)
        Fills VOI of the source image with fill value.
        Parameters:
        mask - DOCUMENT ME!
        fillValue - value to be placed in the image where the mask is true
        tSlice - indicates which volume should be painted (tSlice = 4th dimension)
      • calcInPlace25D

        public void calcInPlace25D​(java.util.BitSet mask,
                                   float fillValue,
                                   int tSlice,
                                   java.util.Vector<java.lang.Integer> intensityLockVector,
                                   boolean showProgressBar)
        Fills VOI of the source image with fill value.
        Parameters:
        mask - DOCUMENT ME!
        fillValue - value to be placed in the image where the mask is true
        tSlice - indicates which volume should be painted (tSlice = 4th dimension)
        intensityLockVector - Vector containing Integer objects that represent the intensity values that are not mutable
      • calcInPlace25DC

        public void calcInPlace25DC​(java.util.BitSet mask,
                                    java.awt.Color fillColor,
                                    int tSlice,
                                    java.lang.String rgbString,
                                    java.util.Vector<java.lang.Integer> intensityLockVector,
                                    boolean showProgressBar)
        Fills VOI of the color source image with fill color.
        Parameters:
        mask - DOCUMENT ME!
        fillColor - color to be placed in the image where the mask is true
        tSlice - indicates which volume should be painted (tSlice = 4th dimension)
      • calcInPlace25DCMask

        public void calcInPlace25DCMask​(java.util.BitSet mask,
                                        java.awt.Color fillColor,
                                        int tSlice)
        Fills VOI of the color source image with fill color.
        Parameters:
        mask - DOCUMENT ME!
        fillColor - color to be placed in the image where the mask is true
        tSlice - indicates which volume should be painted (tSlice = 4th dimension)
      • calcInPlace25DMask

        public void calcInPlace25DMask​(java.util.BitSet mask,
                                       float fillValue,
                                       int tSlice)
        Fills VOI of the source image with fill value.
        Parameters:
        mask - DOCUMENT ME!
        fillValue - value to be placed in the image where the mask is true
        tSlice - indicates which volume should be painted (tSlice = 4th dimension)
      • calcInPlace25DMask

        public void calcInPlace25DMask​(java.util.BitSet mask,
                                       float fillValue,
                                       int tSlice,
                                       java.util.Vector<java.lang.Integer> intensityLockVector)
        Fills VOI of the source image with fill value.
        Parameters:
        mask - DOCUMENT ME!
        fillValue - value to be placed in the image where the mask is true
        tSlice - indicates which volume should be painted (tSlice = 4th dimension)
        intensityLockVector - DOCUMENT ME!
      • finalize

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

        private void calcInPlace2D()
        Fills VOI of source image with fill value.
      • calcInPlace2DComplex

        private void calcInPlace2DComplex()
        Fills VOI of source image with fill value.
      • calcInPlace2DRGB

        private void calcInPlace2DRGB()
        Fills VOI of source image with fill value.
      • calcInPlace3D

        private void calcInPlace3D()
        Fills VOI of the source image with fill value.
      • calcInPlace3DComplex

        private void calcInPlace3DComplex()
        Fills VOI of the source image with fill value.
      • calcInPlace3DRGB

        private void calcInPlace3DRGB()
        Fills VOI of the source image with fill value.
      • calcInPlace4D

        private void calcInPlace4D()
        Fills VOI of the source image with fill value.
      • calcInPlace4DComplex

        private void calcInPlace4DComplex()
        Fills VOI of the source image with fill value.
      • calcInPlace4DRGB

        private void calcInPlace4DRGB()
        Fills VOI of the source image with fill value.
      • calcStoreInDest2D

        private void calcStoreInDest2D()
        Fills new image/VOI with new fill value;
      • calcStoreInDest2DComplex

        private void calcStoreInDest2DComplex()
        Fills new image/VOI with new fill value;
      • calcStoreInDest2DRGB

        private void calcStoreInDest2DRGB()
        Fills new image/VOI with new fill value;
      • calcStoreInDest3D

        private void calcStoreInDest3D()
        Fills new image/VOI with new fill value;
      • calcStoreInDest3DComplex

        private void calcStoreInDest3DComplex()
        Fills new image/VOI with new fill value;
      • calcStoreInDest3DRGB

        private void calcStoreInDest3DRGB()
        Fills new image/VOI with new fill value;
      • calcStoreInDest4D

        private void calcStoreInDest4D()
        Fills new image/VOI with new fill value;
      • calcStoreInDest4DComplex

        private void calcStoreInDest4DComplex()
        Fills new image/VOI with new fill value;
      • calcStoreInDest4DRGB

        private void calcStoreInDest4DRGB()
        Fills new image/VOI with new fill value;