Package gov.nih.mipav.model.algorithms
Class AlgorithmVOIExtractionPaint
- java.lang.Object
- 
- java.lang.Thread
- 
- gov.nih.mipav.model.algorithms.AlgorithmBase
- 
- gov.nih.mipav.model.algorithms.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 SummaryFields Modifier and Type Field Description private VOIaddedVOIDOCUMENT ME!private intexpandedLength(xDim2+2)*(yDim2+2)private intlengthxDim2*yDim2.private java.util.BitSetmaskDOCUMENT ME!private java.util.BitSetmask2DOCUMENT ME!private java.util.BitSetmaskAllDOCUMENT ME!private java.util.BitSetmaskEDOCUMENT ME!private java.util.BitSetmaskExpandedprivate int[][]maskListDOCUMENT ME!private java.util.BitSetmaskNDOCUMENT ME!private java.util.BitSetmaskSDOCUMENT ME!private java.util.BitSetmaskWDOCUMENT ME!private intneighborsDOCUMENT ME!private int[][]nextMaskListDOCUMENT ME!private java.util.BitSetoutMaskDOCUMENT ME!private intsmallLengthxDim * yDim.private intsmallPosDOCUMENT ME!private intsmallPos3DDOCUMENT ME!private intsmallXDOCUMENT ME!private intsmallYDOCUMENT ME!private ModelImagesrcImageDOCUMENT ME!private java.util.BitSetsrcPaintMaskDOCUMENT ME!private inttestPosx + y*xDim.private shortvoiIDnumDOCUMENT ME!private intxcurrent x position.private intxDimDOCUMENT ME!private intxDim2DOCUMENT ME!private intxDim4DOCUMENT ME!private intxtDOCUMENT ME!private intycurrent y position.private intyDimDOCUMENT ME!private intyDim2DOCUMENT ME!private intytDOCUMENT ME!private intzcurrent z slice.private intzDimextent of z dimension in the in the source image.- 
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBasedestFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStopped
 
- 
 - 
Constructor SummaryConstructors Constructor Description AlgorithmVOIExtractionPaint(ModelImage sourceImage)Constructor for finding the borders of the paint on various slices of an image.AlgorithmVOIExtractionPaint(ModelImage sourceImage, java.util.BitSet srcPaint, int xDimen, int yDimen, int zDimen, short voiID)Construct the extractor for paint extraction to a VOI.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcalcInPlace()Calculates the VOI extraction.voidfinalize()Prepares this class for destruction.java.util.Vector<java.awt.Polygon>findPaintBorder(int slice)Finds a set of lines which surround the paint in the image.voidrunAlgorithm()Starts the program.voidsetPaintMask(java.util.BitSet mask)Changes the paint mask that we look for borders in.private voidsetRegionMaskAll()Sets the mask of all points in the 4 connected region with a gray scale value.private voidsetRegionMaskI(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.private voidsetRegionMaskIFalse(int xStart, int yStart, int offset)Sets the mask of all points in the 4 connected region with a gray scale value of objectValue.private voidsetRegionOutMaskI(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.- 
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBaseactionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
 - 
Methods inherited from class java.lang.ThreadactiveCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
 
- 
 
- 
- 
- 
Field Detail- 
addedVOIprivate VOI addedVOI DOCUMENT ME!
 - 
lengthprivate int length xDim2*yDim2.
 - 
expandedLengthprivate int expandedLength (xDim2+2)*(yDim2+2)
 - 
maskprivate java.util.BitSet mask DOCUMENT ME!
 - 
mask2private java.util.BitSet mask2 DOCUMENT ME!
 - 
maskAllprivate java.util.BitSet maskAll DOCUMENT ME!
 - 
maskEprivate java.util.BitSet maskE DOCUMENT ME!
 - 
maskListprivate int[][] maskList DOCUMENT ME!
 - 
maskNprivate java.util.BitSet maskN DOCUMENT ME!
 - 
maskSprivate java.util.BitSet maskS DOCUMENT ME!
 - 
maskWprivate java.util.BitSet maskW DOCUMENT ME!
 - 
neighborsprivate int neighbors DOCUMENT ME!
 - 
nextMaskListprivate int[][] nextMaskList DOCUMENT ME!
 - 
outMaskprivate java.util.BitSet outMask DOCUMENT ME!
 - 
smallLengthprivate int smallLength xDim * yDim.
 - 
smallPosprivate int smallPos DOCUMENT ME!
 - 
smallPos3Dprivate int smallPos3D DOCUMENT ME!
 - 
smallXprivate int smallX DOCUMENT ME!
 - 
smallYprivate int smallY DOCUMENT ME!
 - 
srcImageprivate ModelImage srcImage DOCUMENT ME!
 - 
srcPaintMaskprivate java.util.BitSet srcPaintMask DOCUMENT ME!
 - 
testPosprivate int testPos x + y*xDim.
 - 
voiIDnumprivate short voiIDnum DOCUMENT ME!
 - 
xprivate int x current x position.
 - 
xDimprivate int xDim DOCUMENT ME!
 - 
xDim2private int xDim2 DOCUMENT ME!
 - 
xDim4private int xDim4 DOCUMENT ME!
 - 
xtprivate int xt DOCUMENT ME!
 - 
ytprivate int yt DOCUMENT ME!
 - 
yprivate int y current y position.
 - 
yDimprivate int yDim DOCUMENT ME!
 - 
yDim2private int yDim2 DOCUMENT ME!
 - 
zprivate int z current z slice.
 - 
zDimprivate int zDim extent of z dimension in the in the source image.
 - 
maskExpandedprivate java.util.BitSet maskExpanded 
 
- 
 - 
Constructor Detail- 
AlgorithmVOIExtractionPaintpublic 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
 
 - 
AlgorithmVOIExtractionPaintpublic 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- 
finalizepublic void finalize() Prepares this class for destruction.- Overrides:
- finalizein class- AlgorithmBase
 
 - 
findPaintBorderpublic 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!
 
 - 
runAlgorithmpublic void runAlgorithm() Starts the program.- Specified by:
- runAlgorithmin class- AlgorithmBase
 
 - 
setPaintMaskpublic void setPaintMask(java.util.BitSet mask) Changes the paint mask that we look for borders in.- Parameters:
- mask- the new mask to search through
 
 - 
calcInPlaceprivate void calcInPlace() Calculates the VOI extraction.
 - 
setRegionMaskAllprivate void setRegionMaskAll() Sets the mask of all points in the 4 connected region with a gray scale value.
 - 
setRegionMaskIprivate 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
 
 - 
setRegionMaskIFalseprivate 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
 
 - 
setRegionOutMaskIprivate 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
 
 
- 
 
-