ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public 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 >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using IndexType = typename Superclass::IndexType
 
using NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using NodeType = typename Superclass::NodeType
 
using NodeValueType = typename Superclass::NodeValueType
 
using NormalVectorType = typename Superclass::NormalVectorType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = NormalVectorDiffusionFunction
 
using SparseImageType = typename Superclass::SparseImageType
 
using Superclass = NormalVectorFunctionBase< TSparseImageType >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::NormalVectorFunctionBase< TSparseImageType >
using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using IndexType = typename Superclass::IndexType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using NodeType = typename SparseImageType::NodeType
 
using NodeValueType = typename NodeType::NodeValueType
 
using NormalVectorType = typename NodeType::NodeDataType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = NormalVectorFunctionBase
 
using SparseImageType = typename Superclass::SparseImageType
 
using Superclass = FiniteDifferenceSparseImageFunction< TSparseImageType >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using IndexType = typename SparseImageType::IndexType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using NodeDataType = typename NodeType::NodeDataType
 
using NodeType = typename SparseImageType::NodeType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = FiniteDifferenceSparseImageFunction
 
using SparseImageType = typename Superclass::ImageType
 
using Superclass = FiniteDifferenceFunction< TSparseImageType >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TSparseImageType >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TSparseImageType
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TSparseImageType, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TSparseImageType >::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 ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
int GetNormalProcessType () const
 
void SetNormalProcessType (int npt)
 
- Public Member Functions inherited from itk::NormalVectorFunctionBase< TSparseImageType >
void * GetGlobalDataPointer () const override
 
void ReleaseGlobalDataPointer (void *) const override
 
TimeStepType ComputeGlobalTimeStep (void *) const override
 
void SetTimeStep (const TimeStepType &ts)
 
TimeStepType GetTimeStep () const
 
- Public Member Functions inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
PixelType ComputeUpdate (const NeighborhoodType &, void *, const FloatOffsetType &) override
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
virtual PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))=0
 
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 constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::NormalVectorFunctionBase< TSparseImageType >
static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
static constexpr unsigned int ImageDimension
 
NodeValueType m_ConductanceParameter
 
NodeValueType m_FluxStopConstant
 
int m_NormalProcessType
 
void SetConductanceParameter (NodeValueType cp)
 
NodeValueType GetConductanceParameter () const
 
NodeValueType GetFluxStopConstant () const
 
void PrecomputeSparseUpdate (NeighborhoodType &it) const override
 
NormalVectorType ComputeSparseUpdate (NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset) const override
 
 NormalVectorDiffusionFunction ()
 
 ~NormalVectorDiffusionFunction () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
NodeValueType FluxStopFunction (const NodeValueType v) const
 

Additional Inherited Members

- Protected Member Functions inherited from itk::NormalVectorFunctionBase< TSparseImageType >
 NormalVectorFunctionBase ()
 
 ~NormalVectorFunctionBase () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
- Protected Member Functions inherited from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >
 FiniteDifferenceSparseImageFunction ()=default
 
 ~FiniteDifferenceSparseImageFunction () override=default
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TSparseImageType >
 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 PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TSparseImageType >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

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

Member Typedef Documentation

◆ ConstPointer

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

Definition at line 69 of file itkNormalVectorDiffusionFunction.h.

◆ FloatOffsetType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::FloatOffsetType = typename Superclass::FloatOffsetType

Definition at line 85 of file itkNormalVectorDiffusionFunction.h.

◆ IndexType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::IndexType = typename Superclass::IndexType

Definition at line 86 of file itkNormalVectorDiffusionFunction.h.

◆ NeighborhoodScalesType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::NeighborhoodScalesType = typename Superclass::NeighborhoodScalesType

Definition at line 84 of file itkNormalVectorDiffusionFunction.h.

◆ NeighborhoodType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::NeighborhoodType = typename Superclass::NeighborhoodType

Definition at line 83 of file itkNormalVectorDiffusionFunction.h.

◆ NodeType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::NodeType = typename Superclass::NodeType

Definition at line 88 of file itkNormalVectorDiffusionFunction.h.

◆ NodeValueType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::NodeValueType = typename Superclass::NodeValueType

Definition at line 89 of file itkNormalVectorDiffusionFunction.h.

◆ NormalVectorType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::NormalVectorType = typename Superclass::NormalVectorType

Definition at line 90 of file itkNormalVectorDiffusionFunction.h.

◆ Pointer

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::Pointer = SmartPointer<Self>

Definition at line 68 of file itkNormalVectorDiffusionFunction.h.

◆ RadiusType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::RadiusType = typename Superclass::RadiusType

Definition at line 82 of file itkNormalVectorDiffusionFunction.h.

◆ Self

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::Self = NormalVectorDiffusionFunction

Standard class type alias.

Definition at line 66 of file itkNormalVectorDiffusionFunction.h.

◆ SparseImageType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::SparseImageType = typename Superclass::SparseImageType

Definition at line 87 of file itkNormalVectorDiffusionFunction.h.

◆ Superclass

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::Superclass = NormalVectorFunctionBase<TSparseImageType>

Definition at line 67 of file itkNormalVectorDiffusionFunction.h.

◆ TimeStepType

template<typename TSparseImageType >
using itk::NormalVectorDiffusionFunction< TSparseImageType >::TimeStepType = typename Superclass::TimeStepType

Typedefs from the superclass.

Definition at line 81 of file itkNormalVectorDiffusionFunction.h.

Constructor & Destructor Documentation

◆ NormalVectorDiffusionFunction()

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

The conductance parameter used for anisotropic diffusion.

◆ ~NormalVectorDiffusionFunction()

template<typename TSparseImageType >
itk::NormalVectorDiffusionFunction< TSparseImageType >::~NormalVectorDiffusionFunction ( )
overrideprotecteddefault

The conductance parameter used for anisotropic diffusion.

Member Function Documentation

◆ ComputeSparseUpdate()

template<typename TSparseImageType >
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 >.

◆ CreateAnother()

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.

◆ FluxStopFunction()

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 160 of file itkNormalVectorDiffusionFunction.h.

References itk::NumericTraits< T >::OneValue().

◆ GetConductanceParameter()

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

This method returns the conductance parameter.

Definition at line 126 of file itkNormalVectorDiffusionFunction.h.

◆ GetFluxStopConstant()

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

This method returns the internal variable FluxStopConstant.

Definition at line 133 of file itkNormalVectorDiffusionFunction.h.

◆ GetNameOfClass()

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

Run-time type information (and related methods)

Reimplemented from itk::NormalVectorFunctionBase< TSparseImageType >.

◆ GetNormalProcessType()

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

This method returns the isotropic/anisotropic filtering parameter.

Definition at line 104 of file itkNormalVectorDiffusionFunction.h.

◆ New()

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

Standard New macro.

◆ PrecomputeSparseUpdate()

template<typename TSparseImageType >
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 >.

◆ PrintSelf()

template<typename TSparseImageType >
void itk::NormalVectorDiffusionFunction< TSparseImageType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

The conductance parameter used for anisotropic diffusion.

Reimplemented from itk::FiniteDifferenceSparseImageFunction< TSparseImageType >.

◆ SetConductanceParameter()

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 115 of file itkNormalVectorDiffusionFunction.h.

◆ SetNormalProcessType()

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 97 of file itkNormalVectorDiffusionFunction.h.

Member Data Documentation

◆ ImageDimension

template<typename TSparseImageType >
constexpr unsigned int itk::NormalVectorDiffusionFunction< TSparseImageType >::ImageDimension = Superclass::ImageDimension
staticconstexpr

Image dimension derived from the superclass.

Definition at line 75 of file itkNormalVectorDiffusionFunction.h.

◆ m_ConductanceParameter

template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::m_ConductanceParameter
private

The conductance parameter used for anisotropic diffusion.

Definition at line 176 of file itkNormalVectorDiffusionFunction.h.

◆ m_FluxStopConstant

template<typename TSparseImageType >
NodeValueType itk::NormalVectorDiffusionFunction< TSparseImageType >::m_FluxStopConstant
private

The internal variable used in the FluxStopFunction. It is computed from ConductanceParameter.

Definition at line 180 of file itkNormalVectorDiffusionFunction.h.

◆ m_NormalProcessType

template<typename TSparseImageType >
int itk::NormalVectorDiffusionFunction< TSparseImageType >::m_NormalProcessType
private

The isotropic/anisotropic filtering choice parameter.

Definition at line 183 of file itkNormalVectorDiffusionFunction.h.


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