Class LseParameters
This class is a simple wrapper for the parameters that occur in the
level-set evolution, which is controlled by the partial differential
equation:
du/dt = -a*A(x).grad(u) - b*P(x)*|grad(u)| + c*Z(x)*K(u)*|grad(u)|
+ d*Laplacian(u)
where u(x,t) is the evolved image at time t, du/dt is the time derivative
of u, grad(u) is the gradient of u with respect to the x-variable, A(x) is
the advection term with advection weight a, P(x) is the propagation
term with propagation weight b, Z(x) is the curvature term with
curvature weight c, K(u) is the mean curvature of level curves
(in 2D) or surfaces (in 3D), and Laplacian(u) is the sum of second-order
unmixed derivatives with Laplacian weight d. The notation
A(x).grad(u) indicates the dot product of the two vectors.
- Version:
- 0.1 November 7, 2006
- Author:
- David Eberly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate floatThe advection weight 'a'.private floatThe curvature weight 'c'.private floatA small, positive constant added to the gradient magnitude when it is used in a division.private floatThe Laplacian weight 'd'.private floatThe stability of the numerical PDE solver depends heavily on the data being processed.private floatThe stability of the numerical PDE solver depends heavily on the data being processed.private floatThe stability of the numerical PDE solver depends heavily on the data being processed.private floatThe stability of the numerical PDE solver depends heavily on the data being processed.private floatThe stability of the numerical PDE solver depends heavily on the data being processed.private floatThe propagation weight 'b'. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal floatCompute the time step for the next PDE solver update.final floatGet the advection weight 'b'.final floatGet the curvature weight 'c'.final floatGet The gradient magnitude epsilon value.final floatGet the Laplacian weight 'd'.final floatGet the maximum advection change allowed in the PDE solver update.final floatGet the maximum advection-propagation time step.final floatGet the maximum curvature change allowed in the PDE solver update.final floatGet the maximum curvature time step.final floatGet the maximum propagation change allowed in the PDE solver update.final floatGet the propagation weight 'b'.final voidsetAdvectionWeight(float fAdvectionWeight) Set the advection weight 'a'.final voidsetCurvatureWeight(float fCurvatureWeight) Set the curvature weight 'c'.final voidsetGradientEpsilon(float fGradientEpsilon) Set the gradient magnitude epsilon value.final voidsetLaplacianWeight(float fLaplacianWeight) Set the Laplacian weight 'd'.final voidsetMaxAdvectionChange(float fMaxAdvectionChange) Set the maximum advection change allowed in the PDE solver update.final voidsetMaxAdvPropTimeStep(float fMaxAdvPropTimeStep) Set the maximum advection-propagation time step.final voidsetMaxCurvatureChange(float fMaxCurvatureChange) Set the maximum curvature change allowed in the PDE solver update.final voidsetMaxCurvatureTimeStep(float fMaxCurvatureTimeStep) Set the maximum curvature time step.final voidsetMaxPropagationChange(float fMaxPropagationChange) Set the maximum propagation change allowed in the PDE solver update.final voidsetPropagationWeight(float fPropagationWeight) Set the propagation weight 'b'.
-
Field Details
-
m_fAdvectionWeight
private float m_fAdvectionWeightThe advection weight 'a'. -
m_fPropagationWeight
private float m_fPropagationWeightThe propagation weight 'b'. -
m_fCurvatureWeight
private float m_fCurvatureWeightThe curvature weight 'c'. -
m_fLaplacianWeight
private float m_fLaplacianWeightThe Laplacian weight 'd'. -
m_fGradientEpsilon
private float m_fGradientEpsilonA small, positive constant added to the gradient magnitude when it is used in a division. This guards against divisions by zero. -
m_fMaxAdvPropTimeStep
private float m_fMaxAdvPropTimeStepThe stability of the numerical PDE solver depends heavily on the data being processed. The time step must be carefully controlled to be small enough to ensure stability. These parameters are modified during the PDE solver update to reflect the current state of the image data. The modified values are used in computeTimeStep() to calculate the time step to be used by the next PDE solver update. -
m_fMaxCurvatureTimeStep
private float m_fMaxCurvatureTimeStepThe stability of the numerical PDE solver depends heavily on the data being processed. The time step must be carefully controlled to be small enough to ensure stability. These parameters are modified during the PDE solver update to reflect the current state of the image data. The modified values are used in computeTimeStep() to calculate the time step to be used by the next PDE solver update. -
m_fMaxAdvectionChange
private float m_fMaxAdvectionChangeThe stability of the numerical PDE solver depends heavily on the data being processed. The time step must be carefully controlled to be small enough to ensure stability. These parameters are modified during the PDE solver update to reflect the current state of the image data. The modified values are used in computeTimeStep() to calculate the time step to be used by the next PDE solver update. -
m_fMaxPropagationChange
private float m_fMaxPropagationChangeThe stability of the numerical PDE solver depends heavily on the data being processed. The time step must be carefully controlled to be small enough to ensure stability. These parameters are modified during the PDE solver update to reflect the current state of the image data. The modified values are used in computeTimeStep() to calculate the time step to be used by the next PDE solver update. -
m_fMaxCurvatureChange
private float m_fMaxCurvatureChangeThe stability of the numerical PDE solver depends heavily on the data being processed. The time step must be carefully controlled to be small enough to ensure stability. These parameters are modified during the PDE solver update to reflect the current state of the image data. The modified values are used in computeTimeStep() to calculate the time step to be used by the next PDE solver update.
-
-
Constructor Details
-
LseParameters
public LseParameters()Creates a new LseParameters object.
-
-
Method Details
-
setAdvectionWeight
public final void setAdvectionWeight(float fAdvectionWeight) Set the advection weight 'a'.- Parameters:
fAdvectionWeight- The desired advection weight.
-
getAdvectionWeight
public final float getAdvectionWeight()Get the advection weight 'b'.- Returns:
- The current advection weight.
-
setPropagationWeight
public final void setPropagationWeight(float fPropagationWeight) Set the propagation weight 'b'.- Parameters:
fPropagationWeight- The desired propagation weight.
-
getPropagationWeight
public final float getPropagationWeight()Get the propagation weight 'b'.- Returns:
- The current propagation weight.
-
setCurvatureWeight
public final void setCurvatureWeight(float fCurvatureWeight) Set the curvature weight 'c'.- Parameters:
fCurvatureWeight- The desired curvature weight.
-
getCurvatureWeight
public final float getCurvatureWeight()Get the curvature weight 'c'.- Returns:
- The current curvature weight.
-
setLaplacianWeight
public final void setLaplacianWeight(float fLaplacianWeight) Set the Laplacian weight 'd'.- Parameters:
fLaplacianWeight- The desired Laplacian weight. The value must be nonnegative. If it is positive, the Laplacian term adds some diffusion to the equation, which tends to stabilize the numerical calculations.
-
getLaplacianWeight
public final float getLaplacianWeight()Get the Laplacian weight 'd'.- Returns:
- The current Laplacian weight.
-
setGradientEpsilon
public final void setGradientEpsilon(float fGradientEpsilon) Set the gradient magnitude epsilon value. This value guards against a division by z zero-valued gradient magnitude in the curvature calculations.- Parameters:
fGradientEpsilon- The gradient magnitude epsilon value. The number must be positive.
-
getGradientEpsilon
public final float getGradientEpsilon()Get The gradient magnitude epsilon value.- Returns:
- The current gradient magnitude epsilon value.
-
setMaxAdvPropTimeStep
public final void setMaxAdvPropTimeStep(float fMaxAdvPropTimeStep) Set the maximum advection-propagation time step. The default value is 0.25. At this time, there is no reason to change its value.- Parameters:
fMaxAdvPropTimeStep- The desired maximum advection-propagation time step.
-
getMaxAdvPropTimeStep
public final float getMaxAdvPropTimeStep()Get the maximum advection-propagation time step.- Returns:
- The current maximum advection-propagation time step.
-
setMaxCurvatureTimeStep
public final void setMaxCurvatureTimeStep(float fMaxCurvatureTimeStep) Set the maximum curvature time step. The default value is 0.25. At this time, there is no reason to change its value.- Parameters:
fMaxCurvatureTimeStep- The desired maximum curvature time step.
-
getMaxCurvatureTimeStep
public final float getMaxCurvatureTimeStep()Get the maximum curvature time step.- Returns:
- The current maximum curvature time step.
-
setMaxAdvectionChange
public final void setMaxAdvectionChange(float fMaxAdvectionChange) Set the maximum advection change allowed in the PDE solver update.- Parameters:
fMaxAdvectionChange- The desired maximum advection change.
-
getMaxAdvectionChange
public final float getMaxAdvectionChange()Get the maximum advection change allowed in the PDE solver update.- Returns:
- The current maximum advection change.
-
setMaxPropagationChange
public final void setMaxPropagationChange(float fMaxPropagationChange) Set the maximum propagation change allowed in the PDE solver update.- Parameters:
fMaxPropagationChange- The desired maximum propagation change.
-
getMaxPropagationChange
public final float getMaxPropagationChange()Get the maximum propagation change allowed in the PDE solver update.- Returns:
- The current maximum propagation change.
-
setMaxCurvatureChange
public final void setMaxCurvatureChange(float fMaxCurvatureChange) Set the maximum curvature change allowed in the PDE solver update.- Parameters:
fMaxCurvatureChange- The desired maximum curvature change.
-
getMaxCurvatureChange
public final float getMaxCurvatureChange()Get the maximum curvature change allowed in the PDE solver update.- Returns:
- The current maximum curvature change.
-
computeTimeStep
public final float computeTimeStep()Compute the time step for the next PDE solver update. The time step is based on the current state of the system that is represented by the members of this class. This state is modified in the LseEvolve2 function computeFunction(x,y) and in the LseEvolve3 member function computeFunction(x,y,z).- Returns:
- The next time step to be used by the PDE solver update.
-