ITK
6.0.0
Insight Toolkit
|
#include <itkLevelSetFunction.h>
The LevelSetFunction class is a generic function object which can be used to create a level set method filter when combined with an appropriate finite difference image filter. (See FiniteDifferenceImageFilter.)
LevelSetFunction implements a generic level set function. This function is an expanded form of the basic equation developed in [1].
\(\phi_{t} + \alpha \stackrel{\rightharpoonup}{A}(\mathbf{x})\cdot\nabla\phi + \beta P(\mathbf{x})\mid\nabla\phi\mid = \gamma Z(\mathbf{x})\kappa\mid\nabla\phi\mid\)
where \( \stackrel{\rightharpoonup}{A} \) is an advection term, \( P \) is a propagation (growth) term, and \( Z \) is a spatial modifier term for the mean curvature \( \kappa \). \( \alpha \), \( \beta \), and \( \gamma \) are all scalar constants.
Terms in the equation above are supplied through virtual methods, which must be subclassed to complete an implementation. Terms can be eliminated from the equation by setting the corresponding constants to zero. A wide variety of level set methods can be implemented by subclassing this basic equation.
In ITK, the usual sign convention is that the INSIDE of a surface contains NEGATIVE values and the OUTSIDE of the surface contains POSITIVE values.
Definition at line 66 of file itkLevelSetFunction.h.
Classes | |
struct | GlobalDataStruct |
Static Public Member Functions | |
static double | GetMaximumCurvatureTimeStep () |
static double | GetMaximumPropagationTimeStep () |
static Pointer | New () |
static void | SetMaximumCurvatureTimeStep (double n) |
static void | SetMaximumPropagationTimeStep (double n) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension = Superclass::ImageDimension |
Static Public Attributes inherited from itk::FiniteDifferenceFunction< TImageType > | |
static constexpr unsigned int | ImageDimension = ImageType::ImageDimension |
Protected Member Functions | |
LevelSetFunction () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~LevelSetFunction () override=default | |
Protected Member Functions inherited from itk::FiniteDifferenceFunction< TImageType > | |
FiniteDifferenceFunction () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~FiniteDifferenceFunction () override=default | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Static Protected Member Functions | |
static VectorType | InitializeZeroVectorConstant () |
Protected Attributes | |
ScalarValueType | m_AdvectionWeight {} |
OffsetValueType | m_Center { 0 } |
ScalarValueType | m_CurvatureWeight {} |
ScalarValueType | m_EpsilonMagnitude {} |
ScalarValueType | m_LaplacianSmoothingWeight {} |
ScalarValueType | m_PropagationWeight {} |
bool | m_UseMinimalCurvature { false } |
OffsetValueType | m_xStride [Self::ImageDimension] {} |
std::slice | x_slice [Self::ImageDimension] |
Protected Attributes inherited from itk::FiniteDifferenceFunction< TImageType > | |
RadiusType | m_Radius {} |
PixelRealType | m_ScaleCoefficients [ImageDimension] {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
Static Protected Attributes | |
static double | m_DT |
static double | m_WaveDT |
static VectorType | m_ZeroVectorConstant |
using itk::LevelSetFunction< TImageType >::ConstPointer = SmartPointer<const Self> |
Definition at line 75 of file itkLevelSetFunction.h.
using itk::LevelSetFunction< TImageType >::Pointer = SmartPointer<Self> |
Definition at line 74 of file itkLevelSetFunction.h.
using itk::LevelSetFunction< TImageType >::ScalarValueType = PixelType |
Definition at line 90 of file itkLevelSetFunction.h.
using itk::LevelSetFunction< TImageType >::Self = LevelSetFunction |
Standard class type aliases.
Definition at line 72 of file itkLevelSetFunction.h.
using itk::LevelSetFunction< TImageType >::Superclass = FiniteDifferenceFunction<TImageType> |
Definition at line 73 of file itkLevelSetFunction.h.
using itk::LevelSetFunction< TImageType >::TimeStepType = double |
Convenient type alias.
Definition at line 87 of file itkLevelSetFunction.h.
using itk::LevelSetFunction< TImageType >::VectorType = FixedArray<ScalarValueType, Self::ImageDimension> |
The vector type that will be used in the calculations.
Definition at line 99 of file itkLevelSetFunction.h.
|
inlineprotected |
Definition at line 340 of file itkLevelSetFunction.h.
|
overrideprotecteddefault |
|
inlinevirtual |
Advection field. Default implementation returns a vector of zeros.
Reimplemented in itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::SegmentationLevelSetFunction< TImageType, TImageType >, and itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >.
Definition at line 126 of file itkLevelSetFunction.h.
|
virtual |
|
virtual |
|
overridevirtual |
Computes the time step for an update given a global data structure. The data used in the computation may take different forms depending on the nature of the equations. This global data cannot be kept in the instance of the equation object itself since the equation object must remain stateless for thread safety. The global data is therefore managed for each thread by the finite difference solver filters.
Implements itk::FiniteDifferenceFunction< TImageType >.
Reimplemented in itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapePriorSegmentationLevelSetFunction< TImageType, TImageType >, and itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >.
|
virtual |
|
virtual |
|
overridevirtual |
Compute the equation value.
Implements itk::FiniteDifferenceFunction< TImageType >.
Reimplemented in itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::ShapePriorSegmentationLevelSetFunction< TImageType, TImageType >.
|
inlinevirtual |
Curvature speed. Can be used to spatially modify the effects of curvature . The default implementation returns one.
Reimplemented in itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >, itk::GeodesicActiveContourLevelSetFunction< TImageType, TFeatureImageType >, itk::GeodesicActiveContourShapePriorLevelSetFunction< TImageType, TFeatureImageType >, and itk::ShapeDetectionLevelSetFunction< TImageType, TFeatureImageType >.
Definition at line 142 of file itkLevelSetFunction.h.
References itk::NumericTraits< T >::OneValue().
|
inline |
Alpha. Scales all advection term values.
Definition at line 162 of file itkLevelSetFunction.h.
|
inline |
Gamma. Scales all curvature weight values
Definition at line 188 of file itkLevelSetFunction.h.
|
inline |
Epsilon.
Definition at line 214 of file itkLevelSetFunction.h.
|
inlineoverridevirtual |
Returns a pointer to a global data structure that is passed to this object from the solver at each calculation. The idea is that the solver holds the state of any global values needed to calculate the time step, while the equation object performs the actual calculations. The global data should also be initialized in this method. Global data can be used for caching any values used or reused by the FunctionObject. Each thread should receive its own global data struct.
Implements itk::FiniteDifferenceFunction< TImageType >.
Reimplemented in itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::ShapePriorSegmentationLevelSetFunction< TImageType, TImageType >.
Definition at line 243 of file itkLevelSetFunction.h.
|
inline |
Weight of the laplacian smoothing term
Definition at line 201 of file itkLevelSetFunction.h.
|
inlinestatic |
Definition at line 318 of file itkLevelSetFunction.h.
|
inlinestatic |
Definition at line 334 of file itkLevelSetFunction.h.
|
overridevirtual |
Reimplemented from itk::FiniteDifferenceFunction< TImageType >.
Reimplemented in itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >, itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::SegmentationLevelSetFunction< TImageType, TImageType >, itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapeDetectionLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapePriorSegmentationLevelSetFunction< TImageType, TImageType >, itk::ThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::VectorThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >.
|
inline |
Beta. Scales all propagation term values.
Definition at line 175 of file itkLevelSetFunction.h.
|
inline |
Definition at line 290 of file itkLevelSetFunction.h.
|
virtual |
This method creates the appropriate member variable operators for the level-set calculations. The argument to this function is a the radius necessary for performing the level-set calculations.
Reimplemented in itk::CannySegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >, itk::GeodesicActiveContourLevelSetFunction< TImageType, TFeatureImageType >, itk::GeodesicActiveContourShapePriorLevelSetFunction< TImageType, TFeatureImageType >, itk::LaplacianSegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::SegmentationLevelSetFunction< TImageType, TImageType >, itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapeDetectionLevelSetFunction< TImageType, TFeatureImageType >, itk::ThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::VectorThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >.
|
staticprotected |
This method's only purpose is to initialize the zero vector constant.
|
inlinevirtual |
Laplacian smoothing speed. Can be used to spatially modify the effects of laplacian smoothing of the level set function
Definition at line 150 of file itkLevelSetFunction.h.
References itk::NumericTraits< T >::OneValue().
|
static |
Method for creation through the object factory.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::FiniteDifferenceFunction< TImageType >.
Reimplemented in itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >, itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapePriorSegmentationLevelSetFunction< TImageType, TImageType >, itk::ThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::VectorThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >.
|
inlinevirtual |
Propagation speed. This term controls surface expansion/contraction. Default implementation returns zero.
Reimplemented in itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >, itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::SegmentationLevelSetFunction< TImageType, TImageType >, and itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >.
Definition at line 134 of file itkLevelSetFunction.h.
|
inlineoverridevirtual |
When the finite difference solver filter has finished using a global data pointer, it passes it to this method, which frees the memory. The solver cannot free the memory because it does not know the type to which the pointer points.
Implements itk::FiniteDifferenceFunction< TImageType >.
Reimplemented in itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::ShapePriorSegmentationLevelSetFunction< TImageType, TImageType >.
Definition at line 264 of file itkLevelSetFunction.h.
|
inlinevirtual |
Alpha. Scales all advection term values.
Reimplemented in itk::LaplacianSegmentationLevelSetFunction< TImageType, TFeatureImageType >.
Definition at line 157 of file itkLevelSetFunction.h.
|
inlinevirtual |
Gamma. Scales all curvature weight values
Definition at line 183 of file itkLevelSetFunction.h.
|
inline |
|
inline |
Weight of the laplacian smoothing term
Definition at line 196 of file itkLevelSetFunction.h.
|
inlinestatic |
Set/Get the maximum constraint for the curvature term factor in the time step calculation. Changing this value from the default is not recommended or necessary, but can be used to speed up the surface evolution at the risk of creating an unstable solution.
Definition at line 312 of file itkLevelSetFunction.h.
|
inlinestatic |
Set/Get the maximum constraint for the scalar/vector term factor of the time step calculation. Changing this value from the default is not recommended or necessary, but can be used to speed up the surface evolution at the risk of creating an unstable solution.
Definition at line 328 of file itkLevelSetFunction.h.
|
inlinevirtual |
Beta. Scales all propagation term values.
Definition at line 170 of file itkLevelSetFunction.h.
|
inline |
Definition at line 284 of file itkLevelSetFunction.h.
|
inline |
Definition at line 302 of file itkLevelSetFunction.h.
|
inline |
Definition at line 296 of file itkLevelSetFunction.h.
|
staticconstexpr |
Extract some parameters from the superclass.
Definition at line 84 of file itkLevelSetFunction.h.
|
protected |
Alpha.
Definition at line 379 of file itkLevelSetFunction.h.
|
protected |
The offset of the center pixel in the neighborhood.
Definition at line 360 of file itkLevelSetFunction.h.
|
protected |
Gamma.
Definition at line 385 of file itkLevelSetFunction.h.
|
staticprotected |
Definition at line 354 of file itkLevelSetFunction.h.
|
protected |
Epsilon magnitude controls the lower limit for gradient magnitude.
Definition at line 376 of file itkLevelSetFunction.h.
|
protected |
Laplacian smoothing term
Definition at line 388 of file itkLevelSetFunction.h.
|
protected |
Beta.
Definition at line 382 of file itkLevelSetFunction.h.
|
protected |
Definition at line 365 of file itkLevelSetFunction.h.
|
staticprotected |
Constants used in the time step calculation.
Definition at line 353 of file itkLevelSetFunction.h.
|
protected |
Stride length along the y-dimension.
Definition at line 363 of file itkLevelSetFunction.h.
|
staticprotected |
Zero vector constant.
Definition at line 373 of file itkLevelSetFunction.h.
|
protected |
Slices for the ND neighborhood.
Definition at line 357 of file itkLevelSetFunction.h.