gov.nih.mipav.model.algorithms
Class AlgorithmCellTrackingAGVF

java.lang.Object
  extended by java.lang.Thread
      extended by gov.nih.mipav.model.algorithms.AlgorithmBase
          extended by gov.nih.mipav.model.algorithms.AlgorithmAGVF
              extended by 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

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmAGVF
boundaryIterations, extents, xDim, yDim, zDim
 
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, srcImage, threadStopped
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
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.AlgorithmAGVF
algorithmPerformed, cleanLine, cleanup, getBilinear, getResultVOI, runAlgorithm, setPropagation
 
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
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 magnitude
srcImg - 2D or 3D source image
sigmas - describe the scale of the gaussian in each dimension
gvfIterations - iterations in calculating GVF field
boundaryIterations - iterations in calculating boundary
k - GVF constant
smoothness - factor for smoothing points on contour (see AlgorithmAGVF)
srcVOI - VOI that is to be evolved
do25D - only applies to 3D, if true do slice by slice
radiusConstraint - The user-defined cell radius
shapeConstraint - The contribution of the shape constraint in the minimization
sizeConstraint - The contribution of the size constraint in the minimization
resamplingConstraint - The contribution of the resampling constraint in the minimization
bDilate - Whether to dilate the cell radius before optimizing
fDilation - dilation factor (multiple of the cell radius)
fDx - The initial cell velocity (x-component)
fDy - The initial cell velocity (y-component)
Method Detail

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 contour
yPoints - y coordinates that describe the contour
u - x component of the GVF
v - y component of the GVF
resultGon - resultant polygon