ITK  4.1.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
itk::LevelSetFunction< TImageType > Class Template Reference

#include <itkLevelSetFunction.h>

+ Inheritance diagram for itk::LevelSetFunction< TImageType >:
+ Collaboration diagram for itk::LevelSetFunction< TImageType >:

List of all members.

Classes

struct  GlobalDataStruct

Public Types

typedef SmartPointer< const SelfConstPointer
typedef Superclass::FloatOffsetType FloatOffsetType
typedef Superclass::ImageType ImageType
typedef
Superclass::NeighborhoodScalesType 
NeighborhoodScalesType
typedef
Superclass::NeighborhoodType 
NeighborhoodType
typedef Superclass::PixelRealType PixelRealType
typedef Superclass::PixelType PixelType
typedef SmartPointer< SelfPointer
typedef Superclass::RadiusType RadiusType
typedef PixelType ScalarValueType
typedef LevelSetFunction Self
typedef
FiniteDifferenceFunction
< TImageType > 
Superclass
typedef double TimeStepType
typedef FixedArray
< ScalarValueType,
itkGetStaticConstMacro(ImageDimension) > 
VectorType

Public Member Functions

virtual VectorType AdvectionField (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual ScalarValueType Compute3DMinimalCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
virtual ScalarValueType ComputeCurvatureTerm (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
virtual TimeStepType ComputeGlobalTimeStep (void *GlobalData) const
virtual ScalarValueType ComputeMeanCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
virtual ScalarValueType ComputeMinimalCurvature (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *gd=0)
virtual PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &=FloatOffsetType(0.0))
virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual ScalarValueType CurvatureSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual void * GetGlobalDataPointer () const
virtual const char * GetNameOfClass () const
bool GetUseMinimalCurvature () const
virtual void Initialize (const RadiusType &r)
virtual ScalarValueType LaplacianSmoothingSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual ScalarValueType PropagationSpeed (const NeighborhoodType &, const FloatOffsetType &, GlobalDataStruct *=0) const
virtual void ReleaseGlobalDataPointer (void *GlobalData) const
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

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 Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension

Protected Member Functions

 LevelSetFunction ()
void PrintSelf (std::ostream &s, Indent indent) const
virtual ~LevelSetFunction ()

Static Protected Member Functions

static VectorType InitializeZeroVectorConstant ()

Protected Attributes

ScalarValueType m_AdvectionWeight
OffsetValueType m_Center
ScalarValueType m_CurvatureWeight
ScalarValueType m_EpsilonMagnitude
ScalarValueType m_PropagationWeight
bool m_UseMinimalCurvature
OffsetValueType m_xStride [itkGetStaticConstMacro(ImageDimension)]
std::slice x_slice [itkGetStaticConstMacro(ImageDimension)]

Static Protected Attributes

static double m_DT
static double m_WaveDT
static VectorType m_ZeroVectorConstant
ScalarValueType m_LaplacianSmoothingWeight
 LevelSetFunction (const Self &)
void operator= (const Self &)

Detailed Description

template<class TImageType>
class itk::LevelSetFunction< TImageType >

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.

Warning:
You MUST call Initialize() in the constructor of subclasses of this object to set it up properly to do level-set Calculations. The argument that you pass Initialize is the radius of the neighborhood needed to perform the calculations. If your subclass does not do any additional neighborhood processing, then the default radius should be 1 in each direction.
REFERENCES
[1] Sethian, J.A. Level Set Methods. Cambridge University Press. 1996.

Definition at line 66 of file itkLevelSetFunction.h.


Member Typedef Documentation

template<class TImageType >
typedef SmartPointer< const Self > itk::LevelSetFunction< TImageType >::ConstPointer
template<class TImageType >
typedef Superclass::FloatOffsetType itk::LevelSetFunction< TImageType >::FloatOffsetType
template<class TImageType >
typedef Superclass::ImageType itk::LevelSetFunction< TImageType >::ImageType
template<class TImageType >
typedef Superclass::NeighborhoodScalesType itk::LevelSetFunction< TImageType >::NeighborhoodScalesType

The type of data structure that holds the scales with which the neighborhood is weighted to properly account for spacing and neighborhood radius.

Reimplemented from itk::FiniteDifferenceFunction< TImageType >.

Reimplemented in itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >.

Definition at line 93 of file itkLevelSetFunction.h.

template<class TImageType >
typedef Superclass::NeighborhoodType itk::LevelSetFunction< TImageType >::NeighborhoodType
template<class TImageType >
typedef Superclass::PixelRealType itk::LevelSetFunction< TImageType >::PixelRealType
template<class TImageType >
typedef Superclass::PixelType itk::LevelSetFunction< TImageType >::PixelType
template<class TImageType >
typedef SmartPointer< Self > itk::LevelSetFunction< TImageType >::Pointer
template<class TImageType >
typedef Superclass::RadiusType itk::LevelSetFunction< TImageType >::RadiusType
template<class TImageType >
typedef PixelType itk::LevelSetFunction< TImageType >::ScalarValueType
template<class TImageType >
typedef LevelSetFunction itk::LevelSetFunction< TImageType >::Self
template<class TImageType >
typedef FiniteDifferenceFunction< TImageType > itk::LevelSetFunction< TImageType >::Superclass
template<class TImageType >
typedef double itk::LevelSetFunction< TImageType >::TimeStepType
template<class TImageType >
typedef FixedArray< ScalarValueType, itkGetStaticConstMacro(ImageDimension) > itk::LevelSetFunction< TImageType >::VectorType

The vector type that will be used in the calculations.

Reimplemented in itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >.

Definition at line 98 of file itkLevelSetFunction.h.


Constructor & Destructor Documentation

template<class TImageType >
itk::LevelSetFunction< TImageType >::LevelSetFunction ( ) [inline, protected]

Definition at line 298 of file itkLevelSetFunction.h.

template<class TImageType >
virtual itk::LevelSetFunction< TImageType >::~LevelSetFunction ( ) [inline, protected, virtual]

Definition at line 307 of file itkLevelSetFunction.h.

template<class TImageType >
itk::LevelSetFunction< TImageType >::LevelSetFunction ( const Self ) [private]

Laplacean smoothing term


Member Function Documentation

template<class TImageType >
virtual VectorType itk::LevelSetFunction< TImageType >::AdvectionField ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct = 0 
) const [inline, virtual]

Advection field. Default implementation returns a vector of zeros.

Reimplemented in itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >.

Definition at line 125 of file itkLevelSetFunction.h.

template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::Compute3DMinimalCurvature ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct gd = 0 
) [virtual]
template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::ComputeCurvatureTerm ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct gd = 0 
) [virtual]
template<class TImageType >
virtual TimeStepType itk::LevelSetFunction< TImageType >::ComputeGlobalTimeStep ( void *  GlobalData) const [virtual]

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::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >, and itk::ShapePriorSegmentationLevelSetFunction< TImageType, TFeatureImageType >.

template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::ComputeMeanCurvature ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct gd = 0 
) [virtual]
template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::ComputeMinimalCurvature ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct gd = 0 
) [virtual]
template<class TImageType >
virtual PixelType itk::LevelSetFunction< TImageType >::ComputeUpdate ( const NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType = FloatOffsetType(0.0) 
) [virtual]
template<class TImageType >
virtual::itk::LightObject::Pointer itk::LevelSetFunction< TImageType >::CreateAnother ( void  ) const [virtual]
template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::CurvatureSpeed ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct = 0 
) const [inline, virtual]
template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::GetAdvectionWeight ( ) const [inline]

Alpha. Scales all advection term values.

Definition at line 153 of file itkLevelSetFunction.h.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::GetCurvatureWeight ( ) const [inline]

Gamma. Scales all curvature weight values

Definition at line 167 of file itkLevelSetFunction.h.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::GetEpsilonMagnitude ( ) const [inline]

Epsilon.

Definition at line 181 of file itkLevelSetFunction.h.

template<class TImageType >
virtual void* itk::LevelSetFunction< TImageType >::GetGlobalDataPointer ( ) const [inline, virtual]

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 >.

Definition at line 205 of file itkLevelSetFunction.h.

References itk::LevelSetFunction< TImageType >::GlobalDataStruct::m_MaxAdvectionChange, itk::LevelSetFunction< TImageType >::GlobalDataStruct::m_MaxCurvatureChange, and itk::LevelSetFunction< TImageType >::GlobalDataStruct::m_MaxPropagationChange.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::GetLaplacianSmoothingWeight ( ) const [inline]

Weight of the laplacian smoothing term

Definition at line 174 of file itkLevelSetFunction.h.

template<class TImageType >
static double itk::LevelSetFunction< TImageType >::GetMaximumCurvatureTimeStep ( ) [inline, static]

Definition at line 278 of file itkLevelSetFunction.h.

template<class TImageType >
static double itk::LevelSetFunction< TImageType >::GetMaximumPropagationTimeStep ( ) [inline, static]

Definition at line 292 of file itkLevelSetFunction.h.

template<class TImageType >
virtual const char* itk::LevelSetFunction< TImageType >::GetNameOfClass ( ) const [virtual]
template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::GetPropagationWeight ( ) const [inline]

Beta. Scales all propagation term values.

Definition at line 160 of file itkLevelSetFunction.h.

template<class TImageType >
bool itk::LevelSetFunction< TImageType >::GetUseMinimalCurvature ( ) const [inline]

Definition at line 254 of file itkLevelSetFunction.h.

template<class TImageType >
virtual void itk::LevelSetFunction< TImageType >::Initialize ( const RadiusType r) [virtual]
template<class TImageType >
static VectorType itk::LevelSetFunction< TImageType >::InitializeZeroVectorConstant ( ) [static, protected]

This method's only purpose is to initialize the zero vector constant.

template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::LaplacianSmoothingSpeed ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct = 0 
) const [inline, virtual]

Laplacian smoothing speed. Can be used to spatially modify the effects of laplacian smoothing of the level set function

Definition at line 145 of file itkLevelSetFunction.h.

template<class TImageType >
static Pointer itk::LevelSetFunction< TImageType >::New ( ) [static]
template<class TImageType >
void itk::LevelSetFunction< TImageType >::operator= ( const Self ) [private]
template<class TImageType >
void itk::LevelSetFunction< TImageType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [protected, virtual]
template<class TImageType >
virtual ScalarValueType itk::LevelSetFunction< TImageType >::PropagationSpeed ( const NeighborhoodType ,
const FloatOffsetType ,
GlobalDataStruct = 0 
) const [inline, virtual]

Propagation speed. This term controls surface expansion/contraction. Default implementation returns zero.

Reimplemented in itk::SegmentationLevelSetFunction< TImageType, TFeatureImageType >, and itk::LevelSetFunctionWithRefitTerm< TImageType, TSparseImageType >.

Definition at line 131 of file itkLevelSetFunction.h.

template<class TImageType >
virtual void itk::LevelSetFunction< TImageType >::ReleaseGlobalDataPointer ( void *  GlobalData) const [inline, virtual]

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 >.

Definition at line 224 of file itkLevelSetFunction.h.

template<class TImageType >
virtual void itk::LevelSetFunction< TImageType >::SetAdvectionWeight ( const ScalarValueType  a) [inline, virtual]

Alpha. Scales all advection term values.

Definition at line 151 of file itkLevelSetFunction.h.

template<class TImageType >
virtual void itk::LevelSetFunction< TImageType >::SetCurvatureWeight ( const ScalarValueType  c) [inline, virtual]

Gamma. Scales all curvature weight values

Definition at line 165 of file itkLevelSetFunction.h.

template<class TImageType >
void itk::LevelSetFunction< TImageType >::SetEpsilonMagnitude ( const ScalarValueType  e) [inline]

Epsilon.

Definition at line 179 of file itkLevelSetFunction.h.

References itk::Math::e.

template<class TImageType >
void itk::LevelSetFunction< TImageType >::SetLaplacianSmoothingWeight ( const ScalarValueType  c) [inline]

Weight of the laplacian smoothing term

Definition at line 172 of file itkLevelSetFunction.h.

template<class TImageType >
static void itk::LevelSetFunction< TImageType >::SetMaximumCurvatureTimeStep ( double  n) [inline, static]

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 273 of file itkLevelSetFunction.h.

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

template<class TImageType >
static void itk::LevelSetFunction< TImageType >::SetMaximumPropagationTimeStep ( double  n) [inline, static]

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 287 of file itkLevelSetFunction.h.

template<class TImageType >
virtual void itk::LevelSetFunction< TImageType >::SetPropagationWeight ( const ScalarValueType  p) [inline, virtual]

Beta. Scales all propagation term values.

Definition at line 158 of file itkLevelSetFunction.h.

template<class TImageType >
void itk::LevelSetFunction< TImageType >::SetUseMinimalCurvature ( bool  b) [inline]

Definition at line 249 of file itkLevelSetFunction.h.

template<class TImageType >
void itk::LevelSetFunction< TImageType >::UseMinimalCurvatureOff ( ) [inline]

Definition at line 264 of file itkLevelSetFunction.h.

template<class TImageType >
void itk::LevelSetFunction< TImageType >::UseMinimalCurvatureOn ( ) [inline]

Definition at line 259 of file itkLevelSetFunction.h.


Member Data Documentation

template<class TImageType >
const unsigned int itk::LevelSetFunction< TImageType >::ImageDimension = Superclass::ImageDimension [static]
template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::m_AdvectionWeight [protected]

Alpha.

Definition at line 336 of file itkLevelSetFunction.h.

template<class TImageType >
OffsetValueType itk::LevelSetFunction< TImageType >::m_Center [protected]

The offset of the center pixel in the neighborhood.

Reimplemented in itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >.

Definition at line 318 of file itkLevelSetFunction.h.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::m_CurvatureWeight [protected]

Gamma.

Definition at line 342 of file itkLevelSetFunction.h.

template<class TImageType >
double itk::LevelSetFunction< TImageType >::m_DT [static, protected]

Definition at line 312 of file itkLevelSetFunction.h.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::m_EpsilonMagnitude [protected]

Epsilon magnitude controls the lower limit for gradient magnitude.

Definition at line 333 of file itkLevelSetFunction.h.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::m_LaplacianSmoothingWeight [protected]

Laplacean smoothing term

Definition at line 345 of file itkLevelSetFunction.h.

template<class TImageType >
ScalarValueType itk::LevelSetFunction< TImageType >::m_PropagationWeight [protected]

Beta.

Definition at line 339 of file itkLevelSetFunction.h.

template<class TImageType >
bool itk::LevelSetFunction< TImageType >::m_UseMinimalCurvature [protected]

Definition at line 323 of file itkLevelSetFunction.h.

template<class TImageType >
double itk::LevelSetFunction< TImageType >::m_WaveDT [static, protected]

Constants used in the time step calculation.

Definition at line 311 of file itkLevelSetFunction.h.

template<class TImageType >
OffsetValueType itk::LevelSetFunction< TImageType >::m_xStride[itkGetStaticConstMacro(ImageDimension)] [protected]

Stride length along the y-dimension.

Reimplemented in itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >.

Definition at line 321 of file itkLevelSetFunction.h.

template<class TImageType >
VectorType itk::LevelSetFunction< TImageType >::m_ZeroVectorConstant [static, protected]

Zero vector constant.

Definition at line 330 of file itkLevelSetFunction.h.

template<class TImageType >
std::slice itk::LevelSetFunction< TImageType >::x_slice[itkGetStaticConstMacro(ImageDimension)] [protected]

Slices for the ND neighborhood.

Reimplemented in itk::CurvesLevelSetFunction< TImageType, TFeatureImageType >.

Definition at line 315 of file itkLevelSetFunction.h.


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