ITK  5.0.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
itk::GradientNDAnisotropicDiffusionFunction< TImage > Class Template Reference

#include <itkGradientNDAnisotropicDiffusionFunction.h>

+ Inheritance diagram for itk::GradientNDAnisotropicDiffusionFunction< TImage >:
+ Collaboration diagram for itk::GradientNDAnisotropicDiffusionFunction< TImage >:

Detailed Description

template<typename TImage>
class itk::GradientNDAnisotropicDiffusionFunction< TImage >

This class implements an N-dimensional version of the classic Perona-Malik anisotropic diffusion equation for scalar-valued images. See itkAnisotropicDiffusionFunction for an overview of the anisotropic diffusion framework and equation.

The conductance term for this implementation is chosen as a function of the gradient magnitude of the image at each point, reducing the strength of diffusion at edge pixels.

\[C(\mathbf{x}) = e^{-(\frac{\parallel \nabla U(\mathbf{x}) \parallel}{K})^2}\]

.

The numerical implementation of this equation is similar to that described in the Perona-Malik paper below, but uses a more robust technique for gradient magnitude estimation and has been generalized to N-dimensions.
References
Pietro Perona and Jalhandra Malik, ``Scale-space and edge detection using anisotropic diffusion,'' IEEE Transactions on Pattern Analysis Machine Intelligence, vol. 12, pp. 629-639, 1990.
See Also
AnisotropicDiffusionFunction
VectorAnisotropicDiffusionFunction
VectorGradientAnisotropicDiffusionFunction
CurvatureNDAnisotropicDiffusionFunction

Definition at line 61 of file itkGradientNDAnisotropicDiffusionFunction.h.

Public Types

using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using ImageType = typename Superclass::ImageType
 
using NeighborhoodSizeValueType = SizeValueType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelRealType = typename Superclass::PixelRealType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = GradientNDAnisotropicDiffusionFunction
 
using Superclass = ScalarAnisotropicDiffusionFunction< TImage >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::ScalarAnisotropicDiffusionFunction< TImage >
using ConstPointer = SmartPointer< const Self >
 
using ImageType = typename Superclass::ImageType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelRealType = typename Superclass::PixelRealType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = ScalarAnisotropicDiffusionFunction
 
using Superclass = AnisotropicDiffusionFunction< TImage >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::AnisotropicDiffusionFunction< TImage >
using ConstPointer = SmartPointer< const Self >
 
using FloatOffsetType = typename Superclass::FloatOffsetType
 
using ImageType = typename Superclass::ImageType
 
using NeighborhoodType = typename Superclass::NeighborhoodType
 
using PixelrealType = typename Superclass::PixelRealType
 
using PixelType = typename Superclass::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename Superclass::RadiusType
 
using Self = AnisotropicDiffusionFunction
 
using Superclass = FiniteDifferenceFunction< TImage >
 
using TimeStepType = typename Superclass::TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TImage >
using ConstPointer = SmartPointer< const Self >
 
using DefaultBoundaryConditionType = ZeroFluxNeumannBoundaryCondition< ImageType >
 
using FloatOffsetType = Vector< float, Self::ImageDimension >
 
using ImageType = TImage
 
using NeighborhoodScalesType = Vector< PixelRealType, Self::ImageDimension >
 
using NeighborhoodType = ConstNeighborhoodIterator< TImage, DefaultBoundaryConditionType >
 
using PixelRealType = double
 
using PixelType = typename ImageType::PixelType
 
using Pointer = SmartPointer< Self >
 
using RadiusType = typename ConstNeighborhoodIterator< TImage >::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

PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0)) override
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
void InitializeIteration () override
 
- Public Member Functions inherited from itk::ScalarAnisotropicDiffusionFunction< TImage >
void CalculateAverageGradientMagnitudeSquared (TImage *) override
 
- Public Member Functions inherited from itk::AnisotropicDiffusionFunction< TImage >
virtual void CalculateAverageGradientMagnitudeSquared (ImageType *)=0
 
TimeStepType ComputeGlobalTimeStep (void *) const override
 
const double & GetAverageGradientMagnitudeSquared () const
 
const double & GetConductanceParameter () const
 
void * GetGlobalDataPointer () const override
 
const TimeStepTypeGetTimeStep () const
 
void ReleaseGlobalDataPointer (void *) const override
 
void SetAverageGradientMagnitudeSquared (const double &c)
 
void SetConductanceParameter (const double &c)
 
void SetTimeStep (const TimeStepType &t)
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TImage >
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
 
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::ScalarAnisotropicDiffusionFunction< TImage >
static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::AnisotropicDiffusionFunction< TImage >
static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TImage >
static constexpr unsigned int ImageDimension
 

Protected Member Functions

 GradientNDAnisotropicDiffusionFunction ()
 
 ~GradientNDAnisotropicDiffusionFunction () override=default
 
- Protected Member Functions inherited from itk::ScalarAnisotropicDiffusionFunction< TImage >
 ScalarAnisotropicDiffusionFunction ()=default
 
 ~ScalarAnisotropicDiffusionFunction () override=default
 
- Protected Member Functions inherited from itk::AnisotropicDiffusionFunction< TImage >
 AnisotropicDiffusionFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~AnisotropicDiffusionFunction () override=default
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TImage >
 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

NeighborhoodSizeValueType m_Center
 
DerivativeOperator< PixelType,
Self::ImageDimension
m_DerivativeOperator
 
NeighborhoodInnerProduct
< ImageType
m_InnerProduct
 
PixelType m_K
 
NeighborhoodSizeValueType m_Stride [ImageDimension]
 
std::slice x_slice [ImageDimension]
 
std::slice xa_slice [ImageDimension][ImageDimension]
 
std::slice xd_slice [ImageDimension][ImageDimension]
 
- Protected Attributes inherited from itk::FiniteDifferenceFunction< TImage >
RadiusType m_Radius
 
PixelRealType m_ScaleCoefficients [ImageDimension]
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Static Protected Attributes

static double m_MIN_NORM
 

Member Typedef Documentation

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::ConstPointer = SmartPointer< const Self >

Definition at line 71 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::FloatOffsetType = typename Superclass::FloatOffsetType

Definition at line 87 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::ImageType = typename Superclass::ImageType

Inherit some parameters from the superclass type.

Definition at line 81 of file itkGradientNDAnisotropicDiffusionFunction.h.

Definition at line 89 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::NeighborhoodType = typename Superclass::NeighborhoodType

Definition at line 86 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::PixelRealType = typename Superclass::PixelRealType

Definition at line 83 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::PixelType = typename Superclass::PixelType

Definition at line 82 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::Pointer = SmartPointer< Self >

Definition at line 70 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::RadiusType = typename Superclass::RadiusType

Definition at line 85 of file itkGradientNDAnisotropicDiffusionFunction.h.

Standard class type aliases.

Definition at line 68 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::Superclass = ScalarAnisotropicDiffusionFunction< TImage >

Definition at line 69 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
using itk::GradientNDAnisotropicDiffusionFunction< TImage >::TimeStepType = typename Superclass::TimeStepType

Definition at line 84 of file itkGradientNDAnisotropicDiffusionFunction.h.

Constructor & Destructor Documentation

template<typename TImage>
itk::GradientNDAnisotropicDiffusionFunction< TImage >::GradientNDAnisotropicDiffusionFunction ( )
protected
template<typename TImage>
itk::GradientNDAnisotropicDiffusionFunction< TImage >::~GradientNDAnisotropicDiffusionFunction ( )
overrideprotecteddefault

Member Function Documentation

template<typename TImage>
PixelType itk::GradientNDAnisotropicDiffusionFunction< TImage >::ComputeUpdate ( const NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType offset = FloatOffsetType(0.0) 
)
override

Compute the equation value.

template<typename TImage>
virtual::itk::LightObject::Pointer itk::GradientNDAnisotropicDiffusionFunction< TImage >::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 TImage>
virtual const char* itk::GradientNDAnisotropicDiffusionFunction< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

template<typename TImage>
void itk::GradientNDAnisotropicDiffusionFunction< TImage >::InitializeIteration ( )
inlineoverridevirtual

This method is called prior to each iteration of the solver.

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Definition at line 101 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
static Pointer itk::GradientNDAnisotropicDiffusionFunction< TImage >::New ( )
static

Member Data Documentation

template<typename TImage>
constexpr unsigned int itk::GradientNDAnisotropicDiffusionFunction< TImage >::ImageDimension = Superclass::ImageDimension
static

Inherit some parameters from the superclass type.

Definition at line 92 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
NeighborhoodSizeValueType itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_Center
protected

Definition at line 125 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
DerivativeOperator< PixelType, Self::ImageDimension > itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_DerivativeOperator
protected

Derivative operator.

Definition at line 120 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
NeighborhoodInnerProduct< ImageType > itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_InnerProduct
protected

Inner product function.

Definition at line 112 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
PixelType itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_K
protected

Modified global average gradient magnitude term.

Definition at line 123 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
double itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_MIN_NORM
staticprotected

Definition at line 128 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
NeighborhoodSizeValueType itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_Stride[ImageDimension]
protected

Definition at line 126 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
std::slice itk::GradientNDAnisotropicDiffusionFunction< TImage >::x_slice[ImageDimension]
protected

Slices for the ND neighborhood.

Definition at line 115 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
std::slice itk::GradientNDAnisotropicDiffusionFunction< TImage >::xa_slice[ImageDimension][ImageDimension]
protected

Definition at line 116 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<typename TImage>
std::slice itk::GradientNDAnisotropicDiffusionFunction< TImage >::xd_slice[ImageDimension][ImageDimension]
protected

Definition at line 117 of file itkGradientNDAnisotropicDiffusionFunction.h.


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