ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::NormalVectorDiffusionFunction< TSparseImageType > Class Template Reference

#include <itkNormalVectorDiffusionFunction.h>

+ Inheritance diagram for itk::NormalVectorDiffusionFunction< TSparseImageType >:
+ Collaboration diagram for itk::NormalVectorDiffusionFunction< TSparseImageType >:

Detailed Description

template<typename TSparseImageType>
class itk::NormalVectorDiffusionFunction< TSparseImageType >

This class defines all the necessary functionality for performing isotropic and anisotropic diffusion operations on vector neighborhoods from a sparse image.

This class implements the actual computations for performing isotropic and anisotropic diffusion operations on a neighborhood of unit length vectors. Moreover, this processing is intrinsic to a manifold as specified by the ManifoldNormal member variables in the nodes of the sparse image.
Since the only difference between isotropic and anisotropic diffusion is the exectution of 1 extra line of code, we have implemented both in this class and made the choice between the two depend on a parameter (see below).
PARAMETERS
The choice between is isotropic/anisotropic diffusion is made by the parameter NormalProcessType. A value of 0 corresponds to isotropic diffusion whereas a value of 1 corresponds to anisotropic diffusion. If anisotropic diffusion is chosen, the parameter ConductanceParameter should be set. This conductance parameter determines the level of feature preservation.
IMPORTANT
This class works on SparseImage neighborhoods. Before using this class please read the documentation for SparseImage. Also the documentation for ImplicitManifoldNormalVectorField class will be helpful in understanding how to use this class as a function object.

Definition at line 60 of file itkNormalVectorDiffusionFunction.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef Superclass::IndexType IndexType
 
typedef
Superclass::NeighborhoodScalesType 
NeighborhoodScalesType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::NodeType NodeType
 
typedef Superclass::NodeValueType NodeValueType
 
typedef
Superclass::NormalVectorType 
NormalVectorType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef
NormalVectorDiffusionFunction 
Self
 
typedef Superclass::SparseImageType SparseImageType
 
typedef
NormalVectorFunctionBase
< TSparseImageType > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::NormalVectorFunctionBase< TSparseImageType >
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef Superclass::IndexType IndexType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef SparseImageType::NodeType NodeType
 
typedef NodeType::NodeValueType NodeValueType
 
typedef NodeType::NodeDataType NormalVectorType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef NormalVectorFunctionBase Self
 
typedef Superclass::SparseImageType SparseImageType
 
typedef
FiniteDifferenceSparseImageFunction
< TSparseImageType > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef SparseImageType::IndexType IndexType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef NodeType::NodeDataType NodeDataType
 
typedef SparseImageType::NodeType NodeType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef
FiniteDifferenceSparseImageFunction 
Self
 
typedef Superclass::ImageType SparseImageType
 
typedef
FiniteDifferenceFunction
< TSparseImageType > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TSparseImageType >
typedef SmartPointer< const SelfConstPointer
 
typedef
ZeroFluxNeumannBoundaryCondition
< ImageType
DefaultBoundaryConditionType
 
typedef Vector< float,
itkGetStaticConstMacro(ImageDimension) > 
FloatOffsetType
 
typedef TSparseImageType ImageType
 
typedef Vector< PixelRealType,
itkGetStaticConstMacro(ImageDimension) > 
NeighborhoodScalesType
 
typedef
ConstNeighborhoodIterator
< TSparseImageType,
DefaultBoundaryConditionType
NeighborhoodType
 
typedef double PixelRealType
 
typedef ImageType::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef
ConstNeighborhoodIterator
< TSparseImageType >
::RadiusType 
RadiusType
 
typedef FiniteDifferenceFunction Self
 
typedef LightObject Superclass
 
typedef double TimeStepType
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual NormalVectorType ComputeSparseUpdate (NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset) const override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
NodeValueType GetConductanceParameter () const
 
NodeValueType GetFluxStopConstant () const
 
virtual const char * GetNameOfClass () const
 
int GetNormalProcessType () const
 
virtual void PrecomputeSparseUpdate (NeighborhoodType &it) const override
 
void SetNormalProcessType (int npt)
 
void SetConductanceParameter (NodeValueType cp)
 
- Public Member Functions inherited from itk::NormalVectorFunctionBase< TSparseImageType >
virtual TimeStepType ComputeGlobalTimeStep (void *) const override
 
TimeStepType GetTimeStep () const
 
void SetTimeStep (const TimeStepType &ts)
 
virtual void * GetGlobalDataPointer () const override
 
virtual void ReleaseGlobalDataPointer (void *) const override
 
- Public Member Functions inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
virtual PixelType ComputeUpdate (const NeighborhoodType &, void *, const FloatOffsetType &) override
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
const RadiusTypeGetRadius () const
 
void GetScaleCoefficients (PixelRealType vals[ImageDimension]) const
 
virtual void InitializeIteration ()
 
void SetRadius (const RadiusType &r)
 
void SetScaleCoefficients (PixelRealType vals[ImageDimension])
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 
virtual void Register () const
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () const noexcept
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::NormalVectorFunctionBase< TSparseImageType >
static const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
static const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
static const unsigned int ImageDimension
 

Protected Member Functions

 NormalVectorDiffusionFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~NormalVectorDiffusionFunction ()
 
NodeValueType FluxStopFunction (const NodeValueType v) const
 
- Protected Member Functions inherited from itk::NormalVectorFunctionBase< TSparseImageType >
 NormalVectorFunctionBase ()
 
 ~NormalVectorFunctionBase ()
 
- Protected Member Functions inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
 FiniteDifferenceSparseImageFunction ()
 
 ~FiniteDifferenceSparseImageFunction ()
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
 FiniteDifferenceFunction ()
 
 ~FiniteDifferenceFunction ()
 
- 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 ()
 

Private Member Functions

 NormalVectorDiffusionFunction (const Self &) ITK_DELETE_FUNCTION
 
void operator= (const Self &) ITK_DELETE_FUNCTION
 

Private Attributes

NodeValueType m_ConductanceParameter
 
NodeValueType m_FluxStopConstant
 
int m_NormalProcessType
 

Additional Inherited Members

- Protected Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TSparseImageType >
typedef SmartPointer< const Self > itk::NormalVectorDiffusionFunction< TSparseImageType >::ConstPointer

Definition at line 68 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::FloatOffsetType itk::NormalVectorDiffusionFunction< TSparseImageType >::FloatOffsetType

Definition at line 84 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::IndexType itk::NormalVectorDiffusionFunction< TSparseImageType >::IndexType

Definition at line 85 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::NeighborhoodScalesType itk::NormalVectorDiffusionFunction< TSparseImageType >::NeighborhoodScalesType

Definition at line 83 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::NeighborhoodType itk::NormalVectorDiffusionFunction< TSparseImageType >::NeighborhoodType

Definition at line 82 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::NodeType itk::NormalVectorDiffusionFunction< TSparseImageType >::NodeType

Definition at line 87 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::NodeValueType

Definition at line 88 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::NormalVectorType itk::NormalVectorDiffusionFunction< TSparseImageType >::NormalVectorType

Definition at line 89 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef SmartPointer< Self > itk::NormalVectorDiffusionFunction< TSparseImageType >::Pointer

Definition at line 67 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::RadiusType itk::NormalVectorDiffusionFunction< TSparseImageType >::RadiusType

Definition at line 81 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef NormalVectorDiffusionFunction itk::NormalVectorDiffusionFunction< TSparseImageType >::Self

Standard class typedef.

Definition at line 65 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::SparseImageType itk::NormalVectorDiffusionFunction< TSparseImageType >::SparseImageType

Definition at line 86 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef NormalVectorFunctionBase< TSparseImageType > itk::NormalVectorDiffusionFunction< TSparseImageType >::Superclass

Definition at line 66 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
typedef Superclass::TimeStepType itk::NormalVectorDiffusionFunction< TSparseImageType >::TimeStepType

Typedefs from the superclass.

Definition at line 77 of file itkNormalVectorDiffusionFunction.h.

Constructor & Destructor Documentation

template<typename TSparseImageType >
itk::NormalVectorDiffusionFunction< TSparseImageType >::NormalVectorDiffusionFunction ( )
protected
template<typename TSparseImageType >
itk::NormalVectorDiffusionFunction< TSparseImageType >::~NormalVectorDiffusionFunction ( )
inlineprotected

Definition at line 138 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
itk::NormalVectorDiffusionFunction< TSparseImageType >::NormalVectorDiffusionFunction ( const Self )
private

Member Function Documentation

template<typename TSparseImageType >
virtual NormalVectorType itk::NormalVectorDiffusionFunction< TSparseImageType >::ComputeSparseUpdate ( NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType offset 
) const
overridevirtual

The actual update rule for the normal vectors.

Implements itk::FiniteDifferenceSparseImageFunction< TSparseImageType >.

template<typename TSparseImageType >
virtual::itk::LightObject::Pointer itk::NormalVectorDiffusionFunction< TSparseImageType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::LightObject.

template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::FluxStopFunction ( const NodeValueType  v) const
inlineprotected

The method called in anisotropic diffusion to inhibit diffusion across areas with large curvature.

Definition at line 143 of file itkNormalVectorDiffusionFunction.h.

References itk::NormalVectorDiffusionFunction< TSparseImageType >::m_FluxStopConstant, and itk::NumericTraits< T >::OneValue().

template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::GetConductanceParameter ( ) const
inline

This method returns the conductance parameter.

Definition at line 118 of file itkNormalVectorDiffusionFunction.h.

References itk::NormalVectorDiffusionFunction< TSparseImageType >::m_ConductanceParameter.

template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::GetFluxStopConstant ( ) const
inline

This method returns the internal variable FluxStopConstant.

Definition at line 122 of file itkNormalVectorDiffusionFunction.h.

References itk::NormalVectorDiffusionFunction< TSparseImageType >::m_FluxStopConstant.

template<typename TSparseImageType >
virtual const char* itk::NormalVectorDiffusionFunction< TSparseImageType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.

template<typename TSparseImageType >
int itk::NormalVectorDiffusionFunction< TSparseImageType >::GetNormalProcessType ( ) const
inline

This method returns the isotropic/anisotropic filtering parameter.

Definition at line 99 of file itkNormalVectorDiffusionFunction.h.

References itk::NormalVectorDiffusionFunction< TSparseImageType >::m_NormalProcessType.

template<typename TSparseImageType >
static Pointer itk::NormalVectorDiffusionFunction< TSparseImageType >::New ( )
static

Standard New macro.

template<typename TSparseImageType >
void itk::NormalVectorDiffusionFunction< TSparseImageType >::operator= ( const Self )
private
template<typename TSparseImageType >
virtual void itk::NormalVectorDiffusionFunction< TSparseImageType >::PrecomputeSparseUpdate ( NeighborhoodType it) const
overridevirtual

This function is called from LevelSetNormalImageFilter for all of the nodes to compute and store the flux vectors (first derivatives of the normal vectors. ComputeUpdateNormal then takes derivatives of the flux vectors. This way we avoid repeating the same flux computations.

Reimplemented from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >.

template<typename TSparseImageType >
void itk::NormalVectorDiffusionFunction< TSparseImageType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
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::NormalVectorFunctionBase< TSparseImageType >.

template<typename TSparseImageType >
void itk::NormalVectorDiffusionFunction< TSparseImageType >::SetConductanceParameter ( NodeValueType  cp)
inline

This method sets the conductance parameter used in anisotropic filtering. Useful values for processing 2D and 3D shapes are between 0.1 and 0.25. Lower values preserve more shape features, higher values smooth more. As the conductance parameter large, the processing becomes isotropic. Default is 0.

Definition at line 107 of file itkNormalVectorDiffusionFunction.h.

References itk::NormalVectorDiffusionFunction< TSparseImageType >::m_ConductanceParameter, and itk::NormalVectorDiffusionFunction< TSparseImageType >::m_FluxStopConstant.

template<typename TSparseImageType >
void itk::NormalVectorDiffusionFunction< TSparseImageType >::SetNormalProcessType ( int  npt)
inline

This method is used to choose between isotropic/anisotropic filtering. A parameter value of 0 indicates isotropic diffusion and is the default. Parameter value 1 is anisotropic diffusion. When using anisotropic diffusion the conductance parameter should also be set.

Definition at line 95 of file itkNormalVectorDiffusionFunction.h.

References itk::NormalVectorDiffusionFunction< TSparseImageType >::m_NormalProcessType.

Member Data Documentation

template<typename TSparseImageType >
const unsigned int itk::NormalVectorDiffusionFunction< TSparseImageType >::ImageDimension = Superclass::ImageDimension
static

Image dimension derived from the superclass.

Definition at line 74 of file itkNormalVectorDiffusionFunction.h.

template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::m_ConductanceParameter
private
template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::m_FluxStopConstant
private
template<typename TSparseImageType >
int itk::NormalVectorDiffusionFunction< TSparseImageType >::m_NormalProcessType
private

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