Class LseFastMarch2

java.lang.Object
gov.nih.mipav.model.algorithms.levelset.LseFastMarch
gov.nih.mipav.model.algorithms.levelset.LseFastMarch2

public class LseFastMarch2 extends LseFastMarch
The fast-marching method for 2D 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 Details

    • 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_iXBm1

      protected int m_iXBm1
      XBm1 = XBound - 1
    • m_iYBm1

      protected int m_iYBm1
      YBm1 = YBound - 1
  • Constructor Details

    • LseFastMarch2

      public LseFastMarch2(int iXBound, int iYBound, float[] afSpeed, int[] aiSeeds)
      Create a new fast marching object for a 2D image.
      Parameters:
      iXBound - The x-bound of the image.
      iYBound - The y-bound of the image.
      afSpeed - The speeds of the image elements.
      aiSeeds - The initial region points.
    • LseFastMarch2

      public LseFastMarch2(int iXBound, int iYBound, float fSpeed, int[] aiSeeds)
      Create a new fast marching object for a 2D image.
      Parameters:
      iXBound - The x-bound of the image.
      iYBound - The y-bound of the image.
      fSpeed - The common speed of the image elements.
      aiSeeds - The initial region points.
  • Method Details

    • 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.
    • index

      public final int index(int iX, int iY)
      Compute the 1-dimensional index for the pixel (x,y).
      Parameters:
      iX - The x-coordinate of the pixel.
      iY - The y-coordinate of the pixel.
      Returns:
      The 1-dimensional index for the pixel.
    • getBoundary

      public int[] getBoundary()
      Get the indices of the boundary points of the current region.
      Specified by:
      getBoundary in class LseFastMarch
      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:
      isBoundary in class LseFastMarch
      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:
      iterate in class LseFastMarch
    • initialize

      protected void initialize(int iXBound, int iYBound)
      Initialization of the 2D fast marching object.
      Parameters:
      iXBound - The x-bound of the image.
      iYBound - The y-bound of the image.
      fXSpacing - The x-spacing of the image.
      fYSpacing - The y-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.