edu.jhu.cs.cisst.algorithms.segmentation.gac
Class GeodesicActiveContour2D

java.lang.Object
  extended by edu.jhu.ece.iacl.jist.pipeline.AbstractCalculation
      extended by edu.jhu.cs.cisst.algorithms.segmentation.gac.GeodesicActiveContour2D

public class GeodesicActiveContour2D
extends AbstractCalculation

The Class GeodesicActiveContour2D segments an image using the sparse matrix method. Regions where the level set positive are outside the segmented region, and regions where the level set is negative are inside the segmented region.


Field Summary
protected  java.util.LinkedList<GridPoint2D> activePoints
          The active points.
protected  int cols
          The columns.
protected  double diceThreshold
          The dice threshold.
protected  float[][] distField
          The distance field.
protected  ImageDataFloat distFieldImage
          The distance field image.
protected  java.util.LinkedList<ActiveContourForce2D> forces
          The forces.
protected  GridPoint2D[][] gridPoints
          The grid points.
protected  ImageData image
          The reference image.
protected  int innerIterations
          The inner iterations.
protected  int insideCount
          The inside point count.
protected  java.util.LinkedList<GridPoint2D>[] insidePoints
          The inside points.
protected  int maxLayers
          The maximum number of layers.
protected  double maxSpeed
          The max speed.
protected  int negToPosCount
          The negative to positive transition count.
protected static int[] neighborsX
          The 6-connected neighbors x.
protected static int[] neighborsY
          The 6-connected neighbors y.
protected  int outerIterations
          The outer iterations.
protected  java.util.LinkedList<GridPoint2D>[] outsidePoints
          The outside points.
protected  int posToNegCount
          The positive to negative transition count.
protected  int rows
          The rows.
 
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.AbstractCalculation
monitor
 
Constructor Summary
GeodesicActiveContour2D(ImageData referenceImage)
          Instantiates a new geodesic active contour.
 
Method Summary
 void add(ActiveContourForce2D force)
          Adds the force.
 java.util.LinkedList<ActiveContourForce2D> getForces()
          Gets the forces.
 ImageDataFloat getLevelSet()
          Gets the level set.
static java.lang.String getVersion()
          Gets the version.
protected  void init(ImageData referenceImage)
          Initializes the solver.
protected  void initNarrowBand(ImageDataFloat initialLevelSet)
          Initializes the narrow band.
 void setDiceThreshold(double diceThreshold)
          Sets the dice threshold.
 void setInnerIterations(int innerIterations)
          Sets the inner iterations.
 void setMaxLayers(int maxLayers)
          Sets the maximum number of layers.
 void setOuterIterations(int outerIterations)
          Sets the outer iterations.
 ImageDataFloat solve(ImageDataFloat initialLevelset)
          Solve.
 ImageDataFloat solveVerbose(ImageDataFloat initialLevelSet)
          Solve and generate verbose output.
protected  void updateNarrowBand()
          Update narrow band.
 
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.AbstractCalculation
add, addTotalUnits, decrementCompletedUnits, decrementCompletedUnits, getCompletedUnits, getCurrentLabel, getCurrentProgress, getLabel, getPerformance, getProgress, getTotalUnits, incrementCompletedUnits, incrementCompletedUnits, isCompleted, markCompleted, reset, setCompletedUnits, setCompletedUnits, setLabel, setMonitor, setTotalUnits
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxLayers

protected int maxLayers
The maximum number of layers. Do not use less than 3 layers because then inside/outside become ambiguous


insidePoints

protected java.util.LinkedList<GridPoint2D>[] insidePoints
The inside points.


outsidePoints

protected java.util.LinkedList<GridPoint2D>[] outsidePoints
The outside points.


activePoints

protected java.util.LinkedList<GridPoint2D> activePoints
The active points.


image

protected ImageData image
The reference image.


gridPoints

protected GridPoint2D[][] gridPoints
The grid points.


distField

protected float[][] distField
The distance field.


distFieldImage

protected ImageDataFloat distFieldImage
The distance field image.


rows

protected int rows
The rows.


cols

protected int cols
The columns.


insideCount

protected int insideCount
The inside point count.


diceThreshold

protected double diceThreshold
The dice threshold.


maxSpeed

protected double maxSpeed
The max speed.


innerIterations

protected int innerIterations
The inner iterations.


outerIterations

protected int outerIterations
The outer iterations.


posToNegCount

protected int posToNegCount
The positive to negative transition count.


negToPosCount

protected int negToPosCount
The negative to positive transition count.


neighborsX

protected static int[] neighborsX
The 6-connected neighbors x.


neighborsY

protected static int[] neighborsY
The 6-connected neighbors y.


forces

protected java.util.LinkedList<ActiveContourForce2D> forces
The forces.

Constructor Detail

GeodesicActiveContour2D

public GeodesicActiveContour2D(ImageData referenceImage)
Instantiates a new geodesic active contour.

Parameters:
referenceImage - the reference image
Method Detail

getVersion

public static java.lang.String getVersion()
Gets the version.

Returns:
the version

setDiceThreshold

public void setDiceThreshold(double diceThreshold)
Sets the dice threshold.

Parameters:
diceThreshold - the new dice threshold

setMaxLayers

public void setMaxLayers(int maxLayers)
Sets the maximum number of layers.

Parameters:
maxLayers - the new max layers

setInnerIterations

public void setInnerIterations(int innerIterations)
Sets the inner iterations.

Parameters:
innerIterations - the new inner iterations

setOuterIterations

public void setOuterIterations(int outerIterations)
Sets the outer iterations.

Parameters:
outerIterations - the new outer iterations

getLevelSet

public ImageDataFloat getLevelSet()
Gets the level set.

Returns:
the level set

add

public void add(ActiveContourForce2D force)
Adds the force.

Parameters:
force - the force

getForces

public java.util.LinkedList<ActiveContourForce2D> getForces()
Gets the forces.

Returns:
the forces

init

protected void init(ImageData referenceImage)
Initializes the solver.

Parameters:
referenceImage - the reference image

solve

public ImageDataFloat solve(ImageDataFloat initialLevelset)
Solve.

Parameters:
initialLevelset - the initial level set
Returns:
the final level set

solveVerbose

public ImageDataFloat solveVerbose(ImageDataFloat initialLevelSet)
Solve and generate verbose output.

Parameters:
initialLevelSet - the initial level set
Returns:
all intermediate level sets

updateNarrowBand

protected void updateNarrowBand()
Update narrow band.


initNarrowBand

protected void initNarrowBand(ImageDataFloat initialLevelSet)
Initializes the narrow band.

Parameters:
initialLevelSet - the initial level set