Class LseParameters
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.levelset.LseParameters
-
public class LseParameters extends java.lang.Object
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
Fields Modifier and Type Field Description private float
m_fAdvectionWeight
The advection weight 'a'.private float
m_fCurvatureWeight
The curvature weight 'c'.private float
m_fGradientEpsilon
A small, positive constant added to the gradient magnitude when it is used in a division.private float
m_fLaplacianWeight
The Laplacian weight 'd'.private float
m_fMaxAdvectionChange
The stability of the numerical PDE solver depends heavily on the data being processed.private float
m_fMaxAdvPropTimeStep
The stability of the numerical PDE solver depends heavily on the data being processed.private float
m_fMaxCurvatureChange
The stability of the numerical PDE solver depends heavily on the data being processed.private float
m_fMaxCurvatureTimeStep
The stability of the numerical PDE solver depends heavily on the data being processed.private float
m_fMaxPropagationChange
The stability of the numerical PDE solver depends heavily on the data being processed.private float
m_fPropagationWeight
The propagation weight 'b'.
-
Constructor Summary
Constructors Constructor Description LseParameters()
Creates a new LseParameters object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description float
computeTimeStep()
Compute the time step for the next PDE solver update.float
getAdvectionWeight()
Get the advection weight 'b'.float
getCurvatureWeight()
Get the curvature weight 'c'.float
getGradientEpsilon()
Get The gradient magnitude epsilon value.float
getLaplacianWeight()
Get the Laplacian weight 'd'.float
getMaxAdvectionChange()
Get the maximum advection change allowed in the PDE solver update.float
getMaxAdvPropTimeStep()
Get the maximum advection-propagation time step.float
getMaxCurvatureChange()
Get the maximum curvature change allowed in the PDE solver update.float
getMaxCurvatureTimeStep()
Get the maximum curvature time step.float
getMaxPropagationChange()
Get the maximum propagation change allowed in the PDE solver update.float
getPropagationWeight()
Get the propagation weight 'b'.void
setAdvectionWeight(float fAdvectionWeight)
Set the advection weight 'a'.void
setCurvatureWeight(float fCurvatureWeight)
Set the curvature weight 'c'.void
setGradientEpsilon(float fGradientEpsilon)
Set the gradient magnitude epsilon value.void
setLaplacianWeight(float fLaplacianWeight)
Set the Laplacian weight 'd'.void
setMaxAdvectionChange(float fMaxAdvectionChange)
Set the maximum advection change allowed in the PDE solver update.void
setMaxAdvPropTimeStep(float fMaxAdvPropTimeStep)
Set the maximum advection-propagation time step.void
setMaxCurvatureChange(float fMaxCurvatureChange)
Set the maximum curvature change allowed in the PDE solver update.void
setMaxCurvatureTimeStep(float fMaxCurvatureTimeStep)
Set the maximum curvature time step.void
setMaxPropagationChange(float fMaxPropagationChange)
Set the maximum propagation change allowed in the PDE solver update.void
setPropagationWeight(float fPropagationWeight)
Set the propagation weight 'b'.
-
-
-
Field Detail
-
m_fAdvectionWeight
private float m_fAdvectionWeight
The advection weight 'a'.
-
m_fPropagationWeight
private float m_fPropagationWeight
The propagation weight 'b'.
-
m_fCurvatureWeight
private float m_fCurvatureWeight
The curvature weight 'c'.
-
m_fLaplacianWeight
private float m_fLaplacianWeight
The Laplacian weight 'd'.
-
m_fGradientEpsilon
private float m_fGradientEpsilon
A 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_fMaxAdvPropTimeStep
The 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_fMaxCurvatureTimeStep
The 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_fMaxAdvectionChange
The 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_fMaxPropagationChange
The 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_fMaxCurvatureChange
The 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.
-
-
Method Detail
-
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.
-
-