Class 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 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:
        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,
                                  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.