gov.nih.mipav.model.algorithms
Class AlgorithmCellTrackingAGVF
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmAGVF
gov.nih.mipav.model.algorithms.AlgorithmCellTrackingAGVF
- All Implemented Interfaces:
- AlgorithmInterface, ActionListener, WindowListener, Runnable, EventListener
public class AlgorithmCellTrackingAGVF
- extends AlgorithmAGVF
Active Contour class optimized for Cell Tacking, based on the following paper:
"Active Contours for Cell Tracking", by Nilanjan Ray and Scott T. Acton. 5th IEEE Southwest Symposium on Image
Analysis and Interpretation (SSIAI'02), 2002.
Most functionality is inherited from AlgorithmAGVF, the runSnake function is optimized with the following
constraints for cell-tracking:
1). Constrained Gradient Vector Flow: using a Dirichlet boundary condition, the gradient inside the initial
user-defined snake is set to a user-defined velocity vector.
2). Shape-size constraint: the shape and size of the snake is constrained to be circular with a user-defined cell
radius.
3). Implicit Resampling: the points along the snake curve are minimized such that they maintain an equal distance
between points.
The gradient vector flow is calculated for each frame in the image sequence. Once the GVF is calculated, the
points inside the initial snake (either the user-defined snake for frame 0, or the snake for the previous frame) are
set to the velocity vector. runSnake then minimizes the shape-size and resampling constraints for the new GVF, based
on the user-defined constraint contributions (see the Lambda member variable). The output snake is used as the
initial guess for the next frame in the image sequence.
- See Also:
AlgorithmAGVF
,
GenerateGaussian
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase |
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, srcImage, threadStopped |
Constructor Summary |
AlgorithmCellTrackingAGVF(ModelImage resultImage,
ModelImage srcImg,
float[] sigmas,
int gvfIterations,
int boundaryIterations,
float k,
float smoothness,
VOI srcVOI,
boolean do25D,
float radiusConstraint,
float shapeConstraint,
float sizeConstraint,
float resamplingConstraint,
boolean bDilate,
float fDilation,
float fDx,
float fDy)
Creates a new AlgorithmCellTrackingAGVF object. |
Method Summary |
void |
finalize()
Prepares this class for destruction. |
protected void |
runSnake(float[] xPoints,
float[] yPoints,
float[] u,
float[] v,
Polygon resultGon)
Actual function that evolves the boundary. |
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase |
actionPerformed, addListener, addProgressChangeListener, calculatePrincipleAxis, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
AlgorithmCellTrackingAGVF
public AlgorithmCellTrackingAGVF(ModelImage resultImage,
ModelImage srcImg,
float[] sigmas,
int gvfIterations,
int boundaryIterations,
float k,
float smoothness,
VOI srcVOI,
boolean do25D,
float radiusConstraint,
float shapeConstraint,
float sizeConstraint,
float resamplingConstraint,
boolean bDilate,
float fDilation,
float fDx,
float fDy)
- Creates a new AlgorithmCellTrackingAGVF object.
- Parameters:
resultImage
- image of GVF field magnitudesrcImg
- 2D or 3D source imagesigmas
- describe the scale of the gaussian in each dimensiongvfIterations
- iterations in calculating GVF fieldboundaryIterations
- iterations in calculating boundaryk
- GVF constantsmoothness
- factor for smoothing points on contour (see AlgorithmAGVF)srcVOI
- VOI that is to be evolveddo25D
- only applies to 3D, if true do slice by sliceradiusConstraint
- The user-defined cell radiusshapeConstraint
- The contribution of the shape constraint in the minimizationsizeConstraint
- The contribution of the size constraint in the minimizationresamplingConstraint
- The contribution of the resampling constraint in the minimizationbDilate
- Whether to dilate the cell radius before optimizingfDilation
- dilation factor (multiple of the cell radius)fDx
- The initial cell velocity (x-component)fDy
- The initial cell velocity (y-component)
finalize
public void finalize()
- Prepares this class for destruction.
- Overrides:
finalize
in class AlgorithmAGVF
runSnake
protected void runSnake(float[] xPoints,
float[] yPoints,
float[] u,
float[] v,
Polygon resultGon)
- Actual function that evolves the boundary.
- Overrides:
runSnake
in class AlgorithmAGVF
- Parameters:
xPoints
- x coordinates that describe the contouryPoints
- y coordinates that describe the contouru
- x component of the GVFv
- y component of the GVFresultGon
- resultant polygon