Package gov.nih.mipav.model.algorithms
Class AlgorithmMinimumPerimeterPolygon
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmMinimumPerimeterPolygon
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Smoothing VOI with minimum perimeter polygon.
References:
1.) Digital ImageProcessing Fourth Edition, Rafael C. Gonzalez and Richard E. Woods,
Boundary Approximations Using Minimum-Perimeter Polygons, pp. 963-968.
- Author:
- ilb
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate VOIThe voi selected by the user.private VOIThe resultant polygon and the evolution has completed.private intSquare cell length.private ModelImageSource image.Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmMinimumPerimeterPolygon(ModelImage srcImg, VOI activeVOI, int squareCellLength) Creates a new AlgorithmMinimumPerimeterPolygon object. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcalc()Prepares the data and runs the algorithm for a 2D or 3D image.private doubledet(double x1, double x2, double x3, double y1, double y2, double y3) voidfinalize()Prepares this class for destruction.Accessor that returns a voi that is a smoothed version of the original.voidStarts the smooth algorithm.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
-
activeVOI
The voi selected by the user. -
squareCellLength
private int squareCellLengthSquare cell length. -
resultVOI
The resultant polygon and the evolution has completed. -
srcImage
Source image.
-
-
Constructor Details
-
AlgorithmMinimumPerimeterPolygon
public AlgorithmMinimumPerimeterPolygon() -
AlgorithmMinimumPerimeterPolygon
Creates a new AlgorithmMinimumPerimeterPolygon object.- Parameters:
srcImg- 2D or 3D source imageactiveVOI- the selected voisquareCellLength- square cell length
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
getResultVOI
Accessor that returns a voi that is a smoothed version of the original.- Returns:
- resultVOI
-
runAlgorithm
public void runAlgorithm()Starts the smooth algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
calc
private void calc()Prepares the data and runs the algorithm for a 2D or 3D image. -
det
private double det(double x1, double x2, double x3, double y1, double y2, double y3)
-