Class LseFastMarch3
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.levelset.LseFastMarch
-
- gov.nih.mipav.model.algorithms.levelset.LseFastMarch3
-
public class LseFastMarch3 extends LseFastMarch
The fast-marching method for 3D images. This is based on material from J. Sethian's book, Level Set Methods and Fast Marching Methods.- Version:
- 0.1 November 7, 2006
- Author:
- David Eberly
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_iXBm1XBm1 = XBound - 1protected intm_iXBoundThe x-bound of the image, call it XBound.protected intm_iXYBoundXYBound = XBound*YBoundprotected intm_iYBm1YBm1 = YBound - 1protected intm_iYBoundThe y-bound of the image, call it YBound.protected intm_iZBm1ZBm1 = ZBound - 1protected intm_iZBoundThe z-bound of the image, call it ZBound.-
Fields inherited from class gov.nih.mipav.model.algorithms.levelset.LseFastMarch
m_afInvSpeed, m_afTime, m_akTrial, m_fMaxTime, m_fMinTime, m_iQuantity, m_kHeap
-
-
Constructor Summary
Constructors Constructor Description LseFastMarch3(int iXBound, int iYBound, int iZBound, float[] afSpeed, int[] aiSeeds)Create a new fast marching object for a 3D image.LseFastMarch3(int iXBound, int iYBound, int iZBound, float fSpeed, int[] aiSeeds)Create a new fast marching object for a 3D image.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcomputeTime(int i)Compute the visitation time for an image element.int[]getBoundary()Get the indices of the boundary points of the current region.intgetXBound()Get the x-bound for the image.intgetYBound()Get the y-bound for the image.intgetZBound()Get the z-bound for the image.intindex(int iX, int iY, int iZ)Compute the 1-dimensional index for the voxel (x,y,z).protected voidinitialize(int iXBound, int iYBound, int iZBound)Initialization of the 3D fast marching object.booleanisBoundary(int i)An image element is a boundary point when it is on the boundary of the current region.voiditerate()Run one iteration of the fast marching algorithm.-
Methods inherited from class gov.nih.mipav.model.algorithms.levelset.LseFastMarch
computeTimeExtremes, getInterior, getMaxTime, getMinTime, getQuantity, getTime, initialize, initializeSpeed, initializeSpeed, isFar, isInterior, isTrial, isValid, isZeroSpeed, setTime
-
-
-
-
Field Detail
-
m_iXBound
protected int m_iXBound
The x-bound of the image, call it XBound.
-
m_iYBound
protected int m_iYBound
The y-bound of the image, call it YBound.
-
m_iZBound
protected int m_iZBound
The z-bound of the image, call it ZBound.
-
m_iXYBound
protected int m_iXYBound
XYBound = XBound*YBound
-
m_iXBm1
protected int m_iXBm1
XBm1 = XBound - 1
-
m_iYBm1
protected int m_iYBm1
YBm1 = YBound - 1
-
m_iZBm1
protected int m_iZBm1
ZBm1 = ZBound - 1
-
-
Constructor Detail
-
LseFastMarch3
public LseFastMarch3(int iXBound, int iYBound, int iZBound, float[] afSpeed, int[] aiSeeds)Create a new fast marching object for a 3D image.- Parameters:
iXBound- The x-bound of the image.iYBound- The y-bound of the image.iZBound- The z-bound of the image.afSpeed- The speeds of the image elements.aiSeeds- The initial region points.
-
LseFastMarch3
public LseFastMarch3(int iXBound, int iYBound, int iZBound, float fSpeed, int[] aiSeeds)Create a new fast marching object for a 3D image.- Parameters:
iXBound- The x-bound of the image.iYBound- The y-bound of the image.iZBound- The z-bound of the image.fSpeed- The common speed of the image elements.aiSeeds- The initial region points.
-
-
Method Detail
-
getXBound
public final int getXBound()
Get the x-bound for the image.- Returns:
- The x-bound for the image.
-
getYBound
public final int getYBound()
Get the y-bound for the image.- Returns:
- The y-bound for the image.
-
getZBound
public final int getZBound()
Get the z-bound for the image.- Returns:
- The z-bound for the image.
-
index
public final int index(int iX, int iY, int iZ)Compute the 1-dimensional index for the voxel (x,y,z).- Parameters:
iX- The x-coordinate of the voxel.iY- The y-coordinate of the voxel.iZ- The z-coordinate of the voxel.- Returns:
- The 1-dimensional index for the voxel.
-
getBoundary
public int[] getBoundary()
Get the indices of the boundary points of the current region.- Specified by:
getBoundaryin classLseFastMarch- Returns:
- The array of indices of the boundary points.
-
isBoundary
public boolean isBoundary(int i)
An image element is a boundary point when it is on the boundary of the current region.- Specified by:
isBoundaryin classLseFastMarch- Parameters:
i- The index of the image element.- Returns:
- The Boolean result indicating whether or not the image element is a boundary point.
-
iterate
public void iterate()
Run one iteration of the fast marching algorithm.- Specified by:
iteratein classLseFastMarch
-
initialize
protected void initialize(int iXBound, int iYBound, int iZBound)Initialization of the 3D fast marching object.- Parameters:
iXBound- The x-bound of the image.iYBound- The y-bound of the image.iZBound- The z-bound of the image.fXSpacing- The x-spacing of the image.fYSpacing- The y-spacing of the image.fZSpacing- The z-spacing of the image.
-
computeTime
protected void computeTime(int i)
Compute the visitation time for an image element. In most cases, the time is a root to a quadratic equation that is derived from the finite-difference method used to propagate the region boundary using the inverse speeds.- Parameters:
i- The index of the image element.
-
-