Class AlgorithmVOIExtractionPaint

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

public class AlgorithmVOIExtractionPaint extends AlgorithmBase
DOCUMENT ME!
  • Field Details

    • addedVOI

      private VOI addedVOI
      DOCUMENT ME!
    • length

      private int length
      xDim2*yDim2.
    • expandedLength

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

      private BitSet mask
      DOCUMENT ME!
    • mask2

      private BitSet mask2
      DOCUMENT ME!
    • maskAll

      private BitSet maskAll
      DOCUMENT ME!
    • maskE

      private BitSet maskE
      DOCUMENT ME!
    • maskList

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

      private BitSet maskN
      DOCUMENT ME!
    • maskS

      private BitSet maskS
      DOCUMENT ME!
    • maskW

      private BitSet maskW
      DOCUMENT ME!
    • neighbors

      private int neighbors
      DOCUMENT ME!
    • nextMaskList

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

      private 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 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 BitSet maskExpanded
  • Constructor Details

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

    • finalize

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

      public Vector<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!
    • runAlgorithm

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

      public void setPaintMask(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