Class AlgorithmProstateBoundaryExt
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.filters.AlgorithmProstateBoundaryExt
-
- All Implemented Interfaces:
AlgorithmInterface
,java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmProstateBoundaryExt extends AlgorithmBase implements AlgorithmInterface
This algorithm traces the prostate boundary from the target image, non prostate binary mask image and prostate boundary binary mask image. After AAM generates the initial contour, the contour is copied to all the three images. Target image represent the test image original intensity texture. non-prostate binary image and prostate boundary image are generated from SVM classification. Current tracing mechanism is polar coordinate based, along the AAM generated initial contour landmark points, the alpha angel ranges from 0 to 360 degree, the alpha expansion line is used for tracing the ideal prostate boundary point. A basic voting mechanism is applied to find the ideal point. Lately, we will use normal line of the contour curve from the landmark point to represent the tracing path.- Author:
- Ruida Cheng
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
AlgorithmProstateBoundaryExt.Edge
(package private) class
AlgorithmProstateBoundaryExt.PointAttribute
-
Field Summary
Fields Modifier and Type Field Description private ModelImage
boundaryImage
boundary image.private VOIVector
expandVOI
final VOIprivate ModelImage
nonProstateImage
non-prostate imageprivate VOI
resultVOI
result VOIModelImage
srcImage
target imageprivate VOIVector
VOIs
VOIs-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmProstateBoundaryExt(ModelImage _srcImage, ModelImage _nonProstateImage, ModelImage _boundaryImage, int _imageSliceNumber)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
algorithmPerformed(AlgorithmBase algorithm)
Called after an algorithm this listener is registered to exits (maybe successfully, maybe not).void
finalize()
Prepares this class for destruction.void
findBoundaryNarrowBand()
Voting based tracing for the final prostate boundary.VOIVector
getExtractedVOI()
get the final VOIVOI
getResultVOI()
Returns the resultant VOI.static void
pause()
Pauses the display until the user hits enter.void
runAlgorithm()
Actually runs the algorithm.void
smoothVOI30(ModelImage maskImage, ModelImage resultImage)
Smooth the AAM initial generated contour with 30 landmark points.-
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
-
resultVOI
private VOI resultVOI
result VOI
-
srcImage
public ModelImage srcImage
target image
-
VOIs
private VOIVector VOIs
VOIs
-
nonProstateImage
private ModelImage nonProstateImage
non-prostate image
-
boundaryImage
private ModelImage boundaryImage
boundary image.
-
expandVOI
private VOIVector expandVOI
final VOI
-
-
Constructor Detail
-
AlgorithmProstateBoundaryExt
public AlgorithmProstateBoundaryExt(ModelImage _srcImage, ModelImage _nonProstateImage, ModelImage _boundaryImage, int _imageSliceNumber)
Constructor- Parameters:
_srcImage
- target image_nonProstateImage
- non-prostate binary mask image_boundaryImage
- prostate boundary mask image._imageSliceNumber
- image slice number, trivial.
-
-
Method Detail
-
algorithmPerformed
public void algorithmPerformed(AlgorithmBase algorithm)
Description copied from interface:AlgorithmInterface
Called after an algorithm this listener is registered to exits (maybe successfully, maybe not). If the algorithm is run in a separate thread, this call will be made within that thread. If not, this call will be made from that same, shared thread.- Specified by:
algorithmPerformed
in interfaceAlgorithmInterface
- Parameters:
algorithm
- the algorithm which has just completed
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
getResultVOI
public VOI getResultVOI()
Returns the resultant VOI.- Returns:
- resultant VOI that has localized to the boundaries of the object
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
smoothVOI30
public void smoothVOI30(ModelImage maskImage, ModelImage resultImage)
Smooth the AAM initial generated contour with 30 landmark points.- Parameters:
maskImage
- binary mask imageresultImage
- result image
-
findBoundaryNarrowBand
public void findBoundaryNarrowBand()
Voting based tracing for the final prostate boundary.
-
getExtractedVOI
public VOIVector getExtractedVOI()
get the final VOI- Returns:
- final prostate VOI
-
pause
public static void pause()
Pauses the display until the user hits enter.
-
-