ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType > Class Template Reference

#include <itkSegmentationLevelSetFunction.h>

Detailed Description

template<typename TImageType, typename TFeatureImageType = TImageType>
class itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >

This object defines the API for a class of function objects which perform level set based segmentations. The SegmentationLevelSetImageFilter objects use these SegmentationLevelSetFunction objects to perform the numerical calculations which move a level set front to lock onto image features.
In order to create a working function object, you must subclass the CalculateSpeedImage method to produce a "feature image" that is used by the parent LevelSetFunction class as the PropagationSpeed for its calculations.
See also
SegmentationLevelSetImageFilter
LevelSetFunction

Definition at line 47 of file itkSegmentationLevelSetFunction.h.

+ Inheritance diagram for itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >:
+ Collaboration diagram for itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using ContinuousIndexType = typename InterpolatorType::ContinuousIndexType
 
using FeatureImageType = TFeatureImageType
 
using FeatureScalarType = typename FeatureImageType::PixelType
 
using IndexType = typename ImageType::IndexType
 
using InterpolatorType = LinearInterpolateImageFunction< ImageType >
 
using Pointer = SmartPointer< Self >
 
using Self = SegmentationLevelSetFunction
 
using Superclass = LevelSetFunction< TImageType >
 
using VectorImageType = Image< VectorType, Self::ImageDimension >
 
using VectorInterpolatorType = VectorLinearInterpolateImageFunction< VectorImageType >
 
- Public Types inherited from itk::LevelSetFunction< TImageType >
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using ScalarValueType = PixelType
 
using Self = LevelSetFunction
 
using Superclass = FiniteDifferenceFunction< TImageType >
 
using TimeStepType = double
 
using VectorType = FixedArray< ScalarValueType, Self::ImageDimension >
 
- Public Types inherited from itk::FiniteDifferenceFunction< TImageType >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TImageType
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TImageType, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TImageType >::RadiusType
 
using Self = FiniteDifferenceFunction
 
using Superclass = LightObject
 
using TimeStepType = double
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual void AllocateAdvectionImage ()
 
virtual void AllocateSpeedImage ()
 
virtual void CalculateAdvectionImage ()
 
virtual void CalculateSpeedImage ()
 
const char * GetNameOfClass () const override
 
void Initialize (const RadiusType &r) override
 
virtual void ReverseExpansionDirection ()
 
virtual const FeatureImageTypeGetFeatureImage () const
 
virtual void SetFeatureImage (const FeatureImageType *f)
 
virtual ImageTypeGetSpeedImage ()
 
void SetSpeedImage (ImageType *s)
 
virtual VectorImageTypeGetAdvectionImage () const
 
void SetAdvectionImage (VectorImageType *s)
 
- Public Member Functions inherited from itk::LevelSetFunction< TImageType >
virtual ScalarValueType Compute3DMinimalCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
virtual ScalarValueType ComputeCurvatureTerm (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
TimeStepType ComputeGlobalTimeStep (void *GlobalData) const override
 
virtual ScalarValueType ComputeMeanCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
virtual ScalarValueType ComputeMinimalCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
 
PixelType ComputeUpdate (const NeighborhoodType &it, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0)) override
 
virtual ScalarValueType CurvatureSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=nullptr) const
 
void * GetGlobalDataPointer () const override
 
bool GetUseMinimalCurvature () const
 
virtual ScalarValueType LaplacianSmoothingSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
 
void ReleaseGlobalDataPointer (void *GlobalData) const override
 
void SetUseMinimalCurvature (bool b)
 
void UseMinimalCurvatureOff ()
 
void UseMinimalCurvatureOn ()
 
virtual void SetAdvectionWeight (const ScalarValueType a)
 
ScalarValueType GetAdvectionWeight () const
 
virtual void SetPropagationWeight (const ScalarValueType p)
 
ScalarValueType GetPropagationWeight () const
 
virtual void SetCurvatureWeight (const ScalarValueType c)
 
ScalarValueType GetCurvatureWeight () const
 
void SetLaplacianSmoothingWeight (const ScalarValueType c)
 
ScalarValueType GetLaplacianSmoothingWeight () const
 
void SetEpsilonMagnitude (const ScalarValueType e)
 
ScalarValueType GetEpsilonMagnitude () const
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TImageType >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
virtual void InitializeIteration ()
 
void SetRadius (const RadiusType &r)
 
void SetScaleCoefficients (const PixelRealType vals[ImageDimension])
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual Pointer CreateAnother () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Attributes

static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::LevelSetFunction< TImageType >
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

VectorType AdvectionField (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const override
 
ScalarValueType PropagationSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd) const override
 
 SegmentationLevelSetFunction ()
 
 ~SegmentationLevelSetFunction () override=default
 
- Protected Member Functions inherited from itk::LevelSetFunction< TImageType >
 LevelSetFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~LevelSetFunction () override=default
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TImageType >
 FiniteDifferenceFunction ()
 
 ~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 PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

VectorImageType::Pointer m_AdvectionImage {}
 
FeatureImageType::ConstPointer m_FeatureImage {}
 
InterpolatorType::Pointer m_Interpolator {}
 
ImageType::Pointer m_SpeedImage {}
 
VectorInterpolatorType::Pointer m_VectorInterpolator {}
 
- Protected Attributes inherited from itk::LevelSetFunction< TImageType >
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 {}
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::LevelSetFunction< TImageType >
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 Protected Member Functions inherited from itk::LevelSetFunction< TImageType >
static VectorType InitializeZeroVectorConstant ()
 
- Static Protected Attributes inherited from itk::LevelSetFunction< TImageType >
static double m_DT
 
static double m_WaveDT
 
static VectorType m_ZeroVectorConstant
 

Member Typedef Documentation

◆ ConstPointer

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::ConstPointer = SmartPointer<const Self>

Definition at line 56 of file itkSegmentationLevelSetFunction.h.

◆ ContinuousIndexType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::ContinuousIndexType = typename InterpolatorType::ContinuousIndexType

Continuous index type recognized by the interpolator

Definition at line 87 of file itkSegmentationLevelSetFunction.h.

◆ FeatureImageType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::FeatureImageType = TFeatureImageType

Definition at line 65 of file itkSegmentationLevelSetFunction.h.

◆ FeatureScalarType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::FeatureScalarType = typename FeatureImageType::PixelType

Definition at line 69 of file itkSegmentationLevelSetFunction.h.

◆ IndexType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::IndexType = typename ImageType::IndexType

Definition at line 70 of file itkSegmentationLevelSetFunction.h.

◆ InterpolatorType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::InterpolatorType = LinearInterpolateImageFunction<ImageType>

Define a scalar interpolator

Definition at line 81 of file itkSegmentationLevelSetFunction.h.

◆ Pointer

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::Pointer = SmartPointer<Self>

Definition at line 55 of file itkSegmentationLevelSetFunction.h.

◆ Self

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::Self = SegmentationLevelSetFunction

Standard class type aliases.

Definition at line 53 of file itkSegmentationLevelSetFunction.h.

◆ Superclass

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::Superclass = LevelSetFunction<TImageType>

Definition at line 54 of file itkSegmentationLevelSetFunction.h.

◆ VectorImageType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::VectorImageType = Image<VectorType, Self::ImageDimension>

Define an image type for the advection field.

Definition at line 78 of file itkSegmentationLevelSetFunction.h.

◆ VectorInterpolatorType

template<typename TImageType , typename TFeatureImageType = TImageType>
using itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::VectorInterpolatorType = VectorLinearInterpolateImageFunction<VectorImageType>

Define a vector interpolator

Definition at line 84 of file itkSegmentationLevelSetFunction.h.

Constructor & Destructor Documentation

◆ ~SegmentationLevelSetFunction()

template<typename TImageType , typename TFeatureImageType = TImageType>
itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::~SegmentationLevelSetFunction ( )
overrideprotecteddefault

◆ SegmentationLevelSetFunction()

template<typename TImageType , typename TFeatureImageType = TImageType>
itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::SegmentationLevelSetFunction ( )
inlineprotected

Definition at line 186 of file itkSegmentationLevelSetFunction.h.

References New().

Member Function Documentation

◆ AdvectionField()

template<typename TImageType , typename TFeatureImageType = TImageType>
VectorType itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::AdvectionField ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct gd 
) const
overrideprotectedvirtual

Advection field. Returns a vector from the computed advection field.

Reimplemented from itk::LevelSetFunction< TImageType >.

◆ AllocateAdvectionImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::AllocateAdvectionImage ( )
virtual

Allocates the image that will be used for the level set function's Advection field term. See LevelSetFunction for more information.

◆ AllocateSpeedImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::AllocateSpeedImage ( )
virtual

Allocates the image that will be used for the level set function's Propagation Speed term. See LevelSetFunction for more information.

◆ CalculateAdvectionImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::CalculateAdvectionImage ( )
inlinevirtual

This method must be defined in a subclass to implement a working function object. This method is called before the solver begins its work to produce the speed image used as the level set function's Advection field term. See LevelSetFunction for more information.

Reimplemented in itk::GeodesicActiveContourShapePriorLevelSetFunction< TImageType, TFeatureImageType >, itk::GeodesicActiveContourLevelSetFunction< TImageType, TFeatureImageType >, itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >, and itk::CannySegmentationLevelSetFunction< TImageType, TFeatureImageType >.

Definition at line 141 of file itkSegmentationLevelSetFunction.h.

◆ CalculateSpeedImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::CalculateSpeedImage ( )
inlinevirtual

◆ GetAdvectionImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual VectorImageType* itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::GetAdvectionImage ( ) const
inlinevirtual

Get/Set the image used as the advection field in the level set equation

Definition at line 114 of file itkSegmentationLevelSetFunction.h.

◆ GetFeatureImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual const FeatureImageType* itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::GetFeatureImage ( ) const
inlinevirtual

Set/Get the image which will be used to calculate the speed function.

Definition at line 91 of file itkSegmentationLevelSetFunction.h.

◆ GetNameOfClass()

template<typename TImageType , typename TFeatureImageType = TImageType>
const char* itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::GetNameOfClass ( ) const
overridevirtual

◆ GetSpeedImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual ImageType* itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::GetSpeedImage ( )
inlinevirtual

Get/Set the image used as the speed function in the level set equation

Definition at line 104 of file itkSegmentationLevelSetFunction.h.

◆ Initialize()

template<typename TImageType , typename TFeatureImageType = TImageType>
void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::Initialize ( const RadiusType r)
overridevirtual

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 from itk::LevelSetFunction< TImageType >.

Reimplemented in itk::VectorThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >, itk::ShapeDetectionLevelSetFunction< TImageType, TFeatureImageType >, and itk::ThresholdSegmentationLevelSetFunction< TImageType, TFeatureImageType >.

Referenced by itk::SegmentationLevelSetImageFilter< TInputImage, TFeatureImage, TOutputPixelType >::SetSegmentationFunction().

◆ PropagationSpeed()

template<typename TImageType , typename TFeatureImageType = TImageType>
ScalarValueType itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::PropagationSpeed ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct gd 
) const
overrideprotectedvirtual

Returns the propagation speed from the precalculated speed image.

Reimplemented from itk::LevelSetFunction< TImageType >.

◆ ReverseExpansionDirection()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::ReverseExpansionDirection ( )
virtual

Determines whether Positive or Negative speed terms will cause surface expansion. This method flips the sign of all of the speed, advection, etc terms. By convention, filters should be written so that POSITIVE speed terms cause surface expansion. Calling this method will toggle between the standard POSITIVE EXPANSION convention and the nonstandard NEGATIVE EXPANSION convention.

IMPORTANT: When adding terms to the level-set equation through subclassing you may need to override this function so that your new terms will be properly adjusted.

◆ SetAdvectionImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::SetAdvectionImage ( VectorImageType s)

Get/Set the image used as the advection field in the level set equation

◆ SetFeatureImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
virtual void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::SetFeatureImage ( const FeatureImageType f)
inlinevirtual

Set/Get the image which will be used to calculate the speed function.

Definition at line 96 of file itkSegmentationLevelSetFunction.h.

◆ SetSpeedImage()

template<typename TImageType , typename TFeatureImageType = TImageType>
void itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::SetSpeedImage ( ImageType s)

Get/Set the image used as the speed function in the level set equation

Member Data Documentation

◆ ImageDimension

template<typename TImageType , typename TFeatureImageType = TImageType>
constexpr unsigned int itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::ImageDimension = Superclass::ImageDimension
staticconstexpr

Extract some parameters from the superclass.

Definition at line 75 of file itkSegmentationLevelSetFunction.h.

◆ m_AdvectionImage

template<typename TImageType , typename TFeatureImageType = TImageType>
VectorImageType::Pointer itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::m_AdvectionImage {}
protected

The image holding the advection field for front propagation

Definition at line 175 of file itkSegmentationLevelSetFunction.h.

◆ m_FeatureImage

template<typename TImageType , typename TFeatureImageType = TImageType>
FeatureImageType::ConstPointer itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::m_FeatureImage {}
protected

The image whose features will be used to create a speed image

Definition at line 169 of file itkSegmentationLevelSetFunction.h.

◆ m_Interpolator

template<typename TImageType , typename TFeatureImageType = TImageType>
InterpolatorType::Pointer itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::m_Interpolator {}
protected

Definition at line 194 of file itkSegmentationLevelSetFunction.h.

◆ m_SpeedImage

template<typename TImageType , typename TFeatureImageType = TImageType>
ImageType::Pointer itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::m_SpeedImage {}
protected

The image holding the speed values for front propagation

Definition at line 172 of file itkSegmentationLevelSetFunction.h.

◆ m_VectorInterpolator

template<typename TImageType , typename TFeatureImageType = TImageType>
VectorInterpolatorType::Pointer itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >::m_VectorInterpolator {}
protected

Definition at line 196 of file itkSegmentationLevelSetFunction.h.


The documentation for this class was generated from the following file: