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:
ActionListener,WindowListener,Runnable,EventListener
DOCUMENT ME!
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate VOIDOCUMENT ME!private int(xDim2+2)*(yDim2+2)private intxDim2*yDim2.private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetprivate int[][]DOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private BitSetDOCUMENT ME!private intDOCUMENT ME!private int[][]DOCUMENT ME!private BitSetDOCUMENT ME!private intxDim * yDim.private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private ModelImageDOCUMENT ME!private BitSetDOCUMENT ME!private intx + y*xDim.private shortDOCUMENT ME!private intcurrent x position.private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intcurrent y position.private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intcurrent z slice.private intextent of z dimension in the in the source image.Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmVOIExtractionPaint(ModelImage sourceImage) Constructor for finding the borders of the paint on various slices of an image.AlgorithmVOIExtractionPaint(ModelImage sourceImage, BitSet srcPaint, int xDimen, int yDimen, int zDimen, short voiID) Construct the extractor for paint extraction to a VOI. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCalculates the VOI extraction.voidfinalize()Prepares this class for destruction.findPaintBorder(int slice) Finds a set of lines which surround the paint in the image.voidStarts the program.voidsetPaintMask(BitSet mask) Changes the paint mask that we look for borders in.private voidSets 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.AlgorithmBase
actionPerformed, 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, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
addedVOI
DOCUMENT ME! -
length
private int lengthxDim2*yDim2. -
expandedLength
private int expandedLength(xDim2+2)*(yDim2+2) -
mask
DOCUMENT ME! -
mask2
DOCUMENT ME! -
maskAll
DOCUMENT ME! -
maskE
DOCUMENT ME! -
maskList
private int[][] maskListDOCUMENT ME! -
maskN
DOCUMENT ME! -
maskS
DOCUMENT ME! -
maskW
DOCUMENT ME! -
neighbors
private int neighborsDOCUMENT ME! -
nextMaskList
private int[][] nextMaskListDOCUMENT ME! -
outMask
DOCUMENT ME! -
smallLength
private int smallLengthxDim * yDim. -
smallPos
private int smallPosDOCUMENT ME! -
smallPos3D
private int smallPos3DDOCUMENT ME! -
smallX
private int smallXDOCUMENT ME! -
smallY
private int smallYDOCUMENT ME! -
srcImage
DOCUMENT ME! -
srcPaintMask
DOCUMENT ME! -
testPos
private int testPosx + y*xDim. -
voiIDnum
private short voiIDnumDOCUMENT ME! -
x
private int xcurrent x position. -
xDim
private int xDimDOCUMENT ME! -
xDim2
private int xDim2DOCUMENT ME! -
xDim4
private int xDim4DOCUMENT ME! -
xt
private int xtDOCUMENT ME! -
yt
private int ytDOCUMENT ME! -
y
private int ycurrent y position. -
yDim
private int yDimDOCUMENT ME! -
yDim2
private int yDim2DOCUMENT ME! -
z
private int zcurrent z slice. -
zDim
private int zDimextent of z dimension in the in the source image. -
maskExpanded
-
-
Constructor Details
-
AlgorithmVOIExtractionPaint
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 paintedsrcPaint- the paint bitmapxDimen- the x dimension of the imageyDimen- the y dimension of the imagezDimen- the z dimension of the imagevoiID- the VOI number to give to the generated VOI
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
findPaintBorder
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:
runAlgorithmin classAlgorithmBase
-
setPaintMask
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 pointyStart- the y coordinate of the starting pointoffset- 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 pointyStart- the y coordinate of the starting pointoffset- 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 pointyStart- the y coordinate of the starting pointoffset- offset into z plane of srcPaintMask
-