Package gov.nih.mipav.model.algorithms
Class AlgorithmVOIExtraction
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmVOIExtraction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmVOIExtraction extends AlgorithmBase
DOCUMENT ME!
-
-
Field Summary
Fields Modifier and Type Field Description private VOI
addedVOI
DOCUMENT ME!private java.awt.Color[]
colorTable
DOCUMENT ME!private int
connected
private short[]
expImgBuffer
DOCUMENT ME!private short[]
grayScaleArray
DOCUMENT ME!private short[]
imgBuffer
DOCUMENT ME!private java.util.BitSet
mask
DOCUMENT ME!private java.util.BitSet
mask2
DOCUMENT ME!private java.util.BitSet
maskAll
DOCUMENT ME!private java.util.BitSet
maskExpanded
private short[][]
maskList
DOCUMENT ME!private java.lang.String[]
nameTable
DOCUMENT ME!private short[][]
nextMaskList
DOCUMENT ME!private int
numVOIAdded
private short[]
objBuffer
DOCUMENT ME!private java.util.BitSet
outMask
DOCUMENT ME!private int[]
VOIIndexArray
DOCUMENT ME!private int
xDim
DOCUMENT ME!private int
xDimE
DOCUMENT ME!private int
yDim
DOCUMENT ME!private int
yDimE
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmVOIExtraction(ModelImage srcImg)
Creates a new AlgorithmVOIExtraction object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calcInPlace()
Calculates the VOI extraction.private void
calcInPlace2()
From text description in 4th edition Image Processing, Analysis, and Machine Vision International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Algorithm 6.6 Inner Boundary Tracing, pp. 191-192.void
disposeLocal()
DOCUMENT ME!private void
extendedBoundaryTracing()
From text description in 4th edition Image Processing, Analysis, and Machine Vision International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Algorithm 6.8 Extended Boundary Tracing, pp. 195-196.void
finalize()
Prepares this class for destruction.VOI
getAddedVOI()
Retrieve the VOI generated by the mask to voi extraction.int
getNumVOIAdded()
private void
outerBoundaryTracing()
From text description in 4th edition Image Processing, Analysis, and Machine Vision International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Algorithm 6.7 Outer Boundary Tracing, p. 193.void
runAlgorithm()
Starts the program.void
setColorTable(java.awt.Color[] colorTable)
DOCUMENT ME!void
setNameTable(java.lang.String[] nameTable)
DOCUMENT ME!private void
setRegionMaskAll()
Sets the mask of all points in the 4 connected region with a gray scale value.private void
setRegionMaskI(int xStart, int yStart, short objectValue)
Sets the mask of all points in the 4 connected region with a gray scale value of objectValue Uses iteration.private void
setRegionOutMaskI(int xStart, int yStart, short objectValue)
Sets the mask of all points in the 4 connected region with a gray scale value of objectValue 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, windowOpened
-
Methods 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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
addedVOI
private VOI addedVOI
DOCUMENT ME!
-
colorTable
private java.awt.Color[] colorTable
DOCUMENT ME!
-
expImgBuffer
private short[] expImgBuffer
DOCUMENT ME!
-
grayScaleArray
private short[] grayScaleArray
DOCUMENT ME!
-
imgBuffer
private short[] imgBuffer
DOCUMENT ME!
-
mask
private java.util.BitSet mask
DOCUMENT ME!
-
mask2
private java.util.BitSet mask2
DOCUMENT ME!
-
maskAll
private java.util.BitSet maskAll
DOCUMENT ME!
-
maskList
private short[][] maskList
DOCUMENT ME!
-
nameTable
private java.lang.String[] nameTable
DOCUMENT ME!
-
nextMaskList
private short[][] nextMaskList
DOCUMENT ME!
-
objBuffer
private short[] objBuffer
DOCUMENT ME!
-
outMask
private java.util.BitSet outMask
DOCUMENT ME!
-
VOIIndexArray
private int[] VOIIndexArray
DOCUMENT ME!
-
xDim
private int xDim
DOCUMENT ME!
-
xDimE
private int xDimE
DOCUMENT ME!
-
yDim
private int yDim
DOCUMENT ME!
-
yDimE
private int yDimE
DOCUMENT ME!
-
maskExpanded
private java.util.BitSet maskExpanded
-
connected
private int connected
-
numVOIAdded
private int numVOIAdded
-
-
Constructor Detail
-
AlgorithmVOIExtraction
public AlgorithmVOIExtraction(ModelImage srcImg)
Creates a new AlgorithmVOIExtraction object.- Parameters:
srcImg
- source image model
-
-
Method Detail
-
disposeLocal
public void disposeLocal()
DOCUMENT ME!
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
setColorTable
public void setColorTable(java.awt.Color[] colorTable)
DOCUMENT ME!- Parameters:
colorTable
- DOCUMENT ME!
-
setNameTable
public void setNameTable(java.lang.String[] nameTable)
DOCUMENT ME!- Parameters:
nameTable
- DOCUMENT ME!
-
extendedBoundaryTracing
private void extendedBoundaryTracing()
From text description in 4th edition Image Processing, Analysis, and Machine Vision International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Algorithm 6.8 Extended Boundary Tracing, pp. 195-196.
-
outerBoundaryTracing
private void outerBoundaryTracing()
From text description in 4th edition Image Processing, Analysis, and Machine Vision International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Algorithm 6.7 Outer Boundary Tracing, p. 193.
-
calcInPlace2
private void calcInPlace2()
From text description in 4th edition Image Processing, Analysis, and Machine Vision International Edition by Milan Sonka, Vaclav Hlavac, and Roger Boyle, Algorithm 6.6 Inner Boundary Tracing, pp. 191-192. "Algorithm 6.6 works for all regions larger than one pixel. It is able to find region borders but does not find borders of region holes, which may be located by identifying border elements unallocated thus far to borders. The search for border elements always starts after a traced border is closed, and the search for "unused" border elements can continue in the same way as the search for the first border element. Note that if objects are of unit width, more conditions must be added." Can be used with either connected = 4 or connected = 8. Much less memory than calcInPlace.
-
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, short objectValue)
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 pointobjectValue
- the gray scale value of the object
-
setRegionOutMaskI
private void setRegionOutMaskI(int xStart, int yStart, short objectValue)
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 pointobjectValue
- the gray scale value of the object
-
getAddedVOI
public VOI getAddedVOI()
Retrieve the VOI generated by the mask to voi extraction.- Returns:
- The generated VOI object.
-
getNumVOIAdded
public int getNumVOIAdded()
-
-