Package gov.nih.mipav.model.algorithms
Class AlgorithmEllipticFourierDescriptors
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmEllipticFourierDescriptors
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Smoothing VOI with Elliptic Fourier Descriptors. The number of coefficients can range from 1 to the number of
points in the curve divided by 2.
References:
1.) Feature Extraction invalid input: '&' Image Processing for Computer Vision, Third Edition, Mark S. Nixon and
Alberto S. Aguado, 2012, pp. 369-378.
2.) Boundary Finding with Parametrically Deformable Models by Lawrence H. Staib and James S. Duncan.
- 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 intNumber of coefficients.private VOIThe resultant polygon and the evolution has completed.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
ConstructorsConstructorDescriptionAlgorithmEllipticFourierDescriptors(ModelImage srcImg, VOI activeVOI, int coefficients) Creates a new AlgorithmEllipticFourierDescriptors object. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcalc()Prepares the data and runs the algorithm for a 2D or 3D image.voidfinalize()Prepares this class for destruction.Accessor that returns a voi that is a smoothed version of the original.voidStarts the smooth algorithm.private voidrunEllipticFourierDescriptors(float[] xPoints, float[] yPoints, float[] xSmooth, float[] ySmooth) private voidrunEllipticFourierDescriptorsOpenCurve(float[] xPoints, float[] yPoints, float[] xSmooth, float[] ySmooth) 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. -
coefficients
private int coefficientsNumber of coefficients. -
resultVOI
The resultant polygon and the evolution has completed. -
srcImage
Source image.
-
-
Constructor Details
-
AlgorithmEllipticFourierDescriptors
public AlgorithmEllipticFourierDescriptors() -
AlgorithmEllipticFourierDescriptors
Creates a new AlgorithmEllipticFourierDescriptors object.- Parameters:
srcImg- 2D or 3D source imageactiveVOI- the selected voicoefficients- number of coefficients
-
-
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. -
runEllipticFourierDescriptors
private void runEllipticFourierDescriptors(float[] xPoints, float[] yPoints, float[] xSmooth, float[] ySmooth) -
runEllipticFourierDescriptorsOpenCurve
private void runEllipticFourierDescriptorsOpenCurve(float[] xPoints, float[] yPoints, float[] xSmooth, float[] ySmooth)
-