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:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmEllipticFourierDescriptors extends AlgorithmBase
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 & 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
-
-
Field Summary
Fields Modifier and Type Field Description private VOI
activeVOI
The voi selected by the user.private int
coefficients
Number of coefficients.private VOI
resultVOI
The resultant polygon and the evolution has completed.private ModelImage
srcImage
Source image.-
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 AlgorithmEllipticFourierDescriptors()
AlgorithmEllipticFourierDescriptors(ModelImage srcImg, VOI activeVOI, int coefficients)
Creates a new AlgorithmEllipticFourierDescriptors object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
calc()
Prepares the data and runs the algorithm for a 2D or 3D image.void
finalize()
Prepares this class for destruction.VOI
getResultVOI()
Accessor that returns a voi that is a smoothed version of the original.void
runAlgorithm()
Starts the smooth algorithm.private void
runEllipticFourierDescriptors(float[] xPoints, float[] yPoints, float[] xSmooth, float[] ySmooth)
private void
runEllipticFourierDescriptorsOpenCurve(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, 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
-
activeVOI
private VOI activeVOI
The voi selected by the user.
-
coefficients
private int coefficients
Number of coefficients.
-
resultVOI
private VOI resultVOI
The resultant polygon and the evolution has completed.
-
srcImage
private ModelImage srcImage
Source image.
-
-
Constructor Detail
-
AlgorithmEllipticFourierDescriptors
public AlgorithmEllipticFourierDescriptors()
-
AlgorithmEllipticFourierDescriptors
public AlgorithmEllipticFourierDescriptors(ModelImage srcImg, VOI activeVOI, int coefficients)
Creates a new AlgorithmEllipticFourierDescriptors object.- Parameters:
srcImg
- 2D or 3D source imageactiveVOI
- the selected voicoefficients
- number of coefficients
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
getResultVOI
public VOI 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:
runAlgorithm
in 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)
-
-