Class AlgorithmVOIExtractionPaint

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

    public class AlgorithmVOIExtractionPaint
    extends AlgorithmBase
    DOCUMENT ME!
    • Field Detail

      • addedVOI

        private VOI addedVOI
        DOCUMENT ME!
      • length

        private int length
        xDim2*yDim2.
      • expandedLength

        private int expandedLength
        (xDim2+2)*(yDim2+2)
      • mask

        private java.util.BitSet mask
        DOCUMENT ME!
      • mask2

        private java.util.BitSet mask2
        DOCUMENT ME!
      • maskAll

        private java.util.BitSet maskAll
        DOCUMENT ME!
      • maskE

        private java.util.BitSet maskE
        DOCUMENT ME!
      • maskList

        private int[][] maskList
        DOCUMENT ME!
      • maskN

        private java.util.BitSet maskN
        DOCUMENT ME!
      • maskS

        private java.util.BitSet maskS
        DOCUMENT ME!
      • maskW

        private java.util.BitSet maskW
        DOCUMENT ME!
      • neighbors

        private int neighbors
        DOCUMENT ME!
      • nextMaskList

        private int[][] nextMaskList
        DOCUMENT ME!
      • outMask

        private java.util.BitSet outMask
        DOCUMENT ME!
      • smallLength

        private int smallLength
        xDim * yDim.
      • smallPos

        private int smallPos
        DOCUMENT ME!
      • smallPos3D

        private int smallPos3D
        DOCUMENT ME!
      • smallX

        private int smallX
        DOCUMENT ME!
      • smallY

        private int smallY
        DOCUMENT ME!
      • srcImage

        private ModelImage srcImage
        DOCUMENT ME!
      • srcPaintMask

        private java.util.BitSet srcPaintMask
        DOCUMENT ME!
      • testPos

        private int testPos
        x + y*xDim.
      • voiIDnum

        private short voiIDnum
        DOCUMENT ME!
      • x

        private int x
        current x position.
      • xDim

        private int xDim
        DOCUMENT ME!
      • xDim2

        private int xDim2
        DOCUMENT ME!
      • xDim4

        private int xDim4
        DOCUMENT ME!
      • xt

        private int xt
        DOCUMENT ME!
      • yt

        private int yt
        DOCUMENT ME!
      • y

        private int y
        current y position.
      • yDim

        private int yDim
        DOCUMENT ME!
      • yDim2

        private int yDim2
        DOCUMENT ME!
      • z

        private int z
        current z slice.
      • zDim

        private int zDim
        extent of z dimension in the in the source image.
      • maskExpanded

        private java.util.BitSet maskExpanded
    • Constructor Detail

      • AlgorithmVOIExtractionPaint

        public AlgorithmVOIExtractionPaint​(ModelImage sourceImage)
        Constructor for finding the borders of the paint on various slices of an image.
        Parameters:
        sourceImage - the image that has been painted
      • AlgorithmVOIExtractionPaint

        public AlgorithmVOIExtractionPaint​(ModelImage sourceImage,
                                           java.util.BitSet srcPaint,
                                           int xDimen,
                                           int yDimen,
                                           int zDimen,
                                           short voiID)
        Construct the extractor for paint extraction to a VOI.
        Parameters:
        sourceImage - the image that has been painted
        srcPaint - the paint bitmap
        xDimen - the x dimension of the image
        yDimen - the y dimension of the image
        zDimen - the z dimension of the image
        voiID - the VOI number to give to the generated VOI
    • Method Detail

      • finalize

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

        public java.util.Vector<java.awt.Polygon> findPaintBorder​(int slice)
        Finds a set of lines which surround the paint in the image.
        Parameters:
        slice - the slice to find the paint borders on
        Returns:
        DOCUMENT ME!
      • setPaintMask

        public void setPaintMask​(java.util.BitSet mask)
        Changes the paint mask that we look for borders in.
        Parameters:
        mask - the new mask to search through
      • calcInPlace

        private void calcInPlace()
        Calculates the VOI extraction.
      • setRegionMaskAll

        private void setRegionMaskAll()
        Sets the mask of all points in the 4 connected region with a gray scale value.
      • setRegionMaskI

        private void setRegionMaskI​(int xStart,
                                    int yStart,
                                    int offset)
        Sets the mask of all points in the 4 connected region with a gray scale value of objectValue Uses iteration.
        Parameters:
        xStart - the x coordinate of the starting point
        yStart - the y coordinate of the starting point
        offset - offset into z plane of srcPaintMask
      • setRegionMaskIFalse

        private void setRegionMaskIFalse​(int xStart,
                                         int yStart,
                                         int offset)
        Sets the mask of all points in the 4 connected region with a gray scale value of objectValue. Uses iteration.
        Parameters:
        xStart - the x coordinate of the starting point
        yStart - the y coordinate of the starting point
        offset - offset into z plane of srcPaintMask
      • setRegionOutMaskI

        private void setRegionOutMaskI​(int xStart,
                                       int yStart,
                                       int offset)
        Sets the mask of all points in the 4 connected region with a srcPaintMask equal to false Uses iteration.
        Parameters:
        xStart - the x coordinate of the starting point
        yStart - the y coordinate of the starting point
        offset - offset into z plane of srcPaintMask