Class LseShapeDetection3
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.levelset.LsePdeFilter
-
- gov.nih.mipav.model.algorithms.levelset.LsePdeFilter3
-
- gov.nih.mipav.model.algorithms.levelset.LseEvolve3
-
- gov.nih.mipav.model.algorithms.levelset.LseShapeDetection3
-
public class LseShapeDetection3 extends LseEvolve3
A level-set evolver for 3D images. The PDE to be solved numerically for I(x,t) is:
dI/dt = -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 constant b is the propagation weight and the constant c is the curvature weight.- Version:
- 0.1 November 7, 2006
- Author:
- David Eberly
-
-
Field Summary
Fields Modifier and Type Field Description protected float[][][]
m_aaafFeature
The feature image to control the segmentation.protected float
m_fZeroTolerance
The threshold below which the feature image values are clamped to this tolerance.-
Fields inherited from class gov.nih.mipav.model.algorithms.levelset.LseEvolve3
m_aafD2, m_afAdvection, m_afD1, m_afD1Bwd, m_afD1Fwd, m_fD0, m_fGradMagSqr, m_kParameters
-
Fields inherited from class gov.nih.mipav.model.algorithms.levelset.LsePdeFilter3
m_aaabMask, m_aaafDst, m_aaafSrc, m_fFourthInvDxDy, m_fFourthInvDxDz, m_fFourthInvDyDz, m_fHalfInvDx, m_fHalfInvDy, m_fHalfInvDz, m_fInvDx, m_fInvDxDx, m_fInvDy, m_fInvDyDy, m_fInvDz, m_fInvDzDz, m_fUmmm, m_fUmmp, m_fUmmz, m_fUmpm, m_fUmpp, m_fUmpz, m_fUmzm, m_fUmzp, m_fUmzz, m_fUpmm, m_fUpmp, m_fUpmz, m_fUppm, m_fUppp, m_fUppz, m_fUpzm, m_fUpzp, m_fUpzz, m_fUzmm, m_fUzmp, m_fUzmz, m_fUzpm, m_fUzpp, m_fUzpz, m_fUzzm, m_fUzzp, m_fUzzz, m_fXSpacing, m_fYSpacing, m_fZSpacing, m_iXBound, m_iYBound, m_iZBound
-
Fields inherited from class gov.nih.mipav.model.algorithms.levelset.LsePdeFilter
m_eScaleType, m_fBorderValue, m_fMin, m_fOffset, m_fScale, m_fTimeStep, m_iQuantity, NONE, PRESERVE_ZERO, SYMMETRIC, UNIT
-
-
Constructor Summary
Constructors Constructor Description LseShapeDetection3(int iXBound, int iYBound, int iZBound, float fXSpacing, float fYSpacing, float fZSpacing, float[] afData, boolean[] abMask, float fBorderValue, int eScaleType, float[] afFeature, float fPropagationWeight, float fCurvatureWeight)
Create a new level-set evolver for 3D images.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected float
computeCurvatureSpeed(int iX, int iY, int iZ)
Compute the curvature speed at voxel (x,y,z).protected float
computePropagationSpeed(int iX, int iY, int iZ)
Compute the propagation speed at voxel (x,y,z).-
Methods inherited from class gov.nih.mipav.model.algorithms.levelset.LseEvolve3
computeAdvection, computeCurvature, computeFunction, computeLaplacianSpeed, getParameters, onPreUpdate, onUpdate
-
Methods inherited from class gov.nih.mipav.model.algorithms.levelset.LsePdeFilter3
assignDirichletImageBorder, assignDirichletMaskBorder, assignNeumannImageBorder, assignNeumannMaskBorder, getMask, getU, getUx, getUxx, getUxy, getUxz, getUy, getUyy, getUyz, getUz, getUzz, getXBound, getXSpacing, getYBound, getYSpacing, getZBound, getZSpacing, lookUp27, lookUp7, onPostUpdate, onUpdate
-
Methods inherited from class gov.nih.mipav.model.algorithms.levelset.LsePdeFilter
getBorderValue, getQuantity, getScaleType, getTimeStep, setTimeStep, update
-
-
-
-
Constructor Detail
-
LseShapeDetection3
public LseShapeDetection3(int iXBound, int iYBound, int iZBound, float fXSpacing, float fYSpacing, float fZSpacing, float[] afData, boolean[] abMask, float fBorderValue, int eScaleType, float[] afFeature, float fPropagationWeight, float fCurvatureWeight)
Create a new level-set evolver for 3D images.- 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.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.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 Detail
-
computePropagationSpeed
protected float computePropagationSpeed(int iX, int iY, int iZ)
Compute the propagation speed at voxel (x,y,z). In this evolver, the propagation speed is obtained simply by a lookup into the feature image.- Overrides:
computePropagationSpeed
in classLseEvolve3
- Parameters:
iX
- The x-coordinate of the voxel.iY
- The y-coordinate of the voxel.iZ
- The z-coordinate of the voxel.- Returns:
- The propagation speed at the voxel.
-
computeCurvatureSpeed
protected float computeCurvatureSpeed(int iX, int iY, int iZ)
Compute the curvature speed at voxel (x,y,z). In this evolver, the curvature speed is obtained simply by a lookup into the feature image.- Overrides:
computeCurvatureSpeed
in classLseEvolve3
- Parameters:
iX
- The x-coordinate of the voxel.iY
- The y-coordinate of the voxel.iZ
- The z-coordinate of the voxel.- Returns:
- The curvature speed at the voxel.
-
-