Class LseGeodesicActiveContour2


public class LseGeodesicActiveContour2 extends LseEvolve2
A level-set evolver for 2D images. The PDE to be solved numerically for I(x,t) is:

   dI/dt = -a*Dot(A(x),grad(I)) -b*F(x)*|grad(I)| + c*F(x)*K(x,t)*|grad(I)|, t > 0
   I(x,0) = I0(x)

where the feature image is typically

   F(x) = 1/(1+|grad(convolve(G,I0))|) or F(x) = exp(-|grad(convolve(G,I0))|)

where G(x,t) is the Gaussian kernel and where K(x,t) is the curvature of I(x,t). The advection is

   A(x) = -grad(convolve(G,I0))

The constant a is the advection weight, the constant b is the propagation weight and the constant c is the curvature weight.
Version:
0.1 November 7, 2006
Author:
David Eberly
  • Field Details

    • m_fZeroTolerance

      protected float m_fZeroTolerance
      The threshold below which the feature image values are clamped to this tolerance. The value is hard-coded as 1e-06.
    • m_aafFeature

      protected float[][] m_aafFeature
      The feature image to control the segmentation.
    • m_aakAdvection

      protected float[][][] m_aakAdvection
      The advection field to control the segmentation.
  • Constructor Details

    • LseGeodesicActiveContour2

      public LseGeodesicActiveContour2(int iXBound, int iYBound, float fXSpacing, float fYSpacing, float[] afData, boolean[] abMask, float fBorderValue, int eScaleType, float[] afFeature, float[][] akAdvection, float fAdvectionWeight, float fPropagationWeight, float fCurvatureWeight)
      Create a new level-set evolver for 2D images.
      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.
      afData - The image elements, stored in lexicographical order.
      abMask - The image mask, stored in lexicographical order. A pixel value is processed by the PDE solver only when the mask value is false.
      fBorderValue - Specifies how to handle the image value. When set to Float.MAX_VALUE, Neumann conditions are in use, in which case zero-valued derivatives are assumed on the image border. Otherwise, Dirichlet conditions are used, in which case the image is assumed to be constant on the border with value specified by fBorderValue.
      eScaleType - The type of scaling to apply to the input image. The choices are NONE, UNIT, SYMMETRIC, or PRESERVE_ZERO.
      afFeature - The feature image to control the evolution.
      akAdvection - The advection field to control the evolution.
      fAdvectionWeight - The advection coefficient 'a' in the PDE that controls the evolution.
      fPropagationWeight - The propagation coefficient 'b' in the PDE that controls the evolution.
      fCurvatureWeight - The curvature coefficient 'c' in the PDE that controls the evolution.
  • Method Details

    • computeAdvection

      protected float[] computeAdvection(int iX, int iY)
      Compute the advection at pixel (x,y). In this evolver, the advection is obtained simply by a lookup into the advection image.
      Overrides:
      computeAdvection in class LseEvolve2
      Parameters:
      iX - The x-coordinate of the pixel.
      iY - The y-coordinate of the pixel.
      Returns:
      The advection at the pixel.
    • computePropagationSpeed

      protected float computePropagationSpeed(int iX, int iY)
      Compute the propagation speed at pixel (x,y). In this evolver, the propagation speed is obtained simply by a lookup into the feature image.
      Overrides:
      computePropagationSpeed in class LseEvolve2
      Parameters:
      iX - The x-coordinate of the pixel.
      iY - The y-coordinate of the pixel.
      Returns:
      The propagation speed at the pixel.
    • computeCurvatureSpeed

      protected float computeCurvatureSpeed(int iX, int iY)
      Compute the curvature speed at pixel (x,y). In this evolver, the curvature speed is obtained simply by a lookup into the feature image.
      Overrides:
      computeCurvatureSpeed in class LseEvolve2
      Parameters:
      iX - The x-coordinate of the pixel.
      iY - The y-coordinate of the pixel.
      Returns:
      The curvature speed at the pixel.