ITK  4.3.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 | Private Member Functions | List of all members
itk::GPUGradientNDAnisotropicDiffusionFunction< TImage > Class Template Reference

#include <itkGPUGradientNDAnisotropicDiffusionFunction.h>

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

Detailed Description

template<class TImage>
class itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >

This class implements an N-dimensional version of the classic Perona-Malik anisotropic diffusion equation for scalar-valued images on the GPU. 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.

Definition at line 59 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef Superclass::ImageType ImageType
 
typedef SizeValueType NeighborhoodSizeValueType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::PixelRealType PixelRealType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef
GPUGradientNDAnisotropicDiffusionFunction 
Self
 
typedef
GPUScalarAnisotropicDiffusionFunction
< TImage > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::GPUScalarAnisotropicDiffusionFunction< TImage >
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::ImageType ImageType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::PixelRealType PixelRealType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef
GPUScalarAnisotropicDiffusionFunction 
Self
 
typedef
GPUAnisotropicDiffusionFunction
< TImage > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::GPUAnisotropicDiffusionFunction< TImage >
typedef SmartPointer< const SelfConstPointer
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef Superclass::ImageType ImageType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::PixelRealType PixelrealType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef
GPUAnisotropicDiffusionFunction 
Self
 
typedef
GPUFiniteDifferenceFunction
< TImage > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::GPUFiniteDifferenceFunction< TImage >
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::DefaultBoundaryConditionType 
DefaultBoundaryConditionType
 
typedef Superclass DifferenceFunctionType
 
typedef Superclass::FloatOffsetType FloatOffsetType
 
typedef Superclass::ImageType ImageType
 
typedef
Superclass::NeighborhoodType 
NeighborhoodType
 
typedef Superclass::PixelRealType PixelRealType
 
typedef Superclass::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef Superclass::RadiusType RadiusType
 
typedef GPUFiniteDifferenceFunction Self
 
typedef
FiniteDifferenceFunction
< TImage > 
Superclass
 
typedef Superclass::TimeStepType TimeStepType
 
- Public Types inherited from itk::FiniteDifferenceFunction< TImage >
typedef SmartPointer< const SelfConstPointer
 
typedef
ZeroFluxNeumannBoundaryCondition
< ImageType
DefaultBoundaryConditionType
 
typedef Vector< float,
itkGetStaticConstMacro(ImageDimension) > 
FloatOffsetType
 
typedef TImage ImageType
 
typedef Vector< PixelRealType,
itkGetStaticConstMacro(ImageDimension) > 
NeighborhoodScalesType
 
typedef
ConstNeighborhoodIterator
< TImage,
DefaultBoundaryConditionType
NeighborhoodType
 
typedef double PixelRealType
 
typedef ImageType::PixelType PixelType
 
typedef SmartPointer< SelfPointer
 
typedef
ConstNeighborhoodIterator
< TImage >::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 ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void GPUComputeUpdate (const typename TImage::Pointer output, typename TImage::Pointer buffer, void *globalData)
 
virtual void InitializeIteration ()
 
 itkGetOpenCLSourceFromKernelMacro (GPUGradientNDAnisotropicDiffusionFunctionKernel)
 
- Public Member Functions inherited from itk::GPUScalarAnisotropicDiffusionFunction< TImage >
virtual void GPUCalculateAverageGradientMagnitudeSquared (TImage *)
 
 itkGetOpenCLSourceFromKernelMacro (GPUScalarAnisotropicDiffusionFunctionKernel)
 
- Public Member Functions inherited from itk::GPUAnisotropicDiffusionFunction< TImage >
virtual TimeStepType ComputeGlobalTimeStep (void *) const
 
const double & GetAverageGradientMagnitudeSquared () const
 
const double & GetConductanceParameter () const
 
virtual void * GetGlobalDataPointer () const
 
const TimeStepTypeGetTimeStep () const
 
virtual void GPUCalculateAverageGradientMagnitudeSquared (ImageType *)=0
 
virtual void ReleaseGlobalDataPointer (void *) const
 
void SetAverageGradientMagnitudeSquared (const double &c)
 
void SetConductanceParameter (const double &c)
 
void SetTimeStep (const TimeStepType &t)
 
- Public Member Functions inherited from itk::GPUFiniteDifferenceFunction< TImage >
virtual void GPUAllocateMetricData (unsigned int)
 
virtual void GPUReleaseMetricData ()
 
virtual PixelType ComputeUpdate (const NeighborhoodType &, void *, const FloatOffsetType &)
 
- Public Member Functions inherited from itk::FiniteDifferenceFunction< TImage >
const NeighborhoodScalesType ComputeNeighborhoodScales () const
 
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
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::GPUScalarAnisotropicDiffusionFunction< TImage >
static const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::GPUAnisotropicDiffusionFunction< TImage >
static const unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::GPUFiniteDifferenceFunction< TImage >
static const unsigned int ImageDimension
 
- Static Public Attributes inherited from itk::FiniteDifferenceFunction< TImage >
static const unsigned int ImageDimension
 

Protected Member Functions

 GPUGradientNDAnisotropicDiffusionFunction ()
 
 ~GPUGradientNDAnisotropicDiffusionFunction ()
 
- Protected Member Functions inherited from itk::GPUScalarAnisotropicDiffusionFunction< TImage >
 GPUScalarAnisotropicDiffusionFunction ()
 
 ~GPUScalarAnisotropicDiffusionFunction ()
 
- Protected Member Functions inherited from itk::GPUAnisotropicDiffusionFunction< TImage >
 GPUAnisotropicDiffusionFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 ~GPUAnisotropicDiffusionFunction ()
 
- Protected Member Functions inherited from itk::GPUFiniteDifferenceFunction< TImage >
 GPUFiniteDifferenceFunction ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 ~GPUFiniteDifferenceFunction ()
 
- Protected Member Functions inherited from itk::FiniteDifferenceFunction< TImage >
 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 ()
 

Protected Attributes

DerivativeOperator< PixelType,
itkGetStaticConstMacro(ImageDimension) > 
dx_op
 
NeighborhoodSizeValueType m_Center
 
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]
 

Static Protected Attributes

static double m_MIN_NORM
 

Private Member Functions

 GPUGradientNDAnisotropicDiffusionFunction (const Self &)
 
void operator= (const Self &)
 

Additional Inherited Members

- Protected Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Member Typedef Documentation

template<class TImage>
typedef SmartPointer< const Self > itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::ConstPointer

Inherit some parameters from the superclass type.

Definition at line 74 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
typedef SmartPointer< Self > itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::Pointer

Standard class typedefs.

Definition at line 64 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

Constructor & Destructor Documentation

template<class TImage>
itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::~GPUGradientNDAnisotropicDiffusionFunction ( )
inlineprotected

Member Function Documentation

template<class TImage>
virtual::itk::LightObject::Pointer itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::CreateAnother ( void  ) 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<class TImage>
virtual const char* itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods)

Reimplemented from itk::GPUScalarAnisotropicDiffusionFunction< TImage >.

template<class TImage>
virtual void itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::GPUComputeUpdate ( const typename TImage::Pointer  output,
typename TImage::Pointer  buffer,
void *  globalData 
)
virtual

Compute the equation value.

Implements itk::GPUFiniteDifferenceFunction< TImage >.

template<class TImage>
virtual void itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::InitializeIteration ( )
inlinevirtual

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

Reimplemented from itk::GPUFiniteDifferenceFunction< TImage >.

Definition at line 98 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::itkGetOpenCLSourceFromKernelMacro ( GPUGradientNDAnisotropicDiffusionFunctionKernel  )

Get OpenCL Kernel source as a string, creates a GetOpenCLSource method

template<class TImage>
static Pointer itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::New ( )
static
template<class TImage>
void itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::operator= ( const Self )
private

Member Data Documentation

template<class TImage>
DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) > itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::dx_op
protected

Derivative operator.

Definition at line 118 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
const unsigned int itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::ImageDimension = Superclass::ImageDimension
static

Inherit some parameters from the superclass type.

Definition at line 88 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
NeighborhoodSizeValueType itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::m_Center
protected
template<class TImage>
NeighborhoodInnerProduct< ImageType > itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::m_InnerProduct
protected

Inner product function.

Definition at line 110 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
PixelType itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::m_K
protected

Modified global average gradient magnitude term.

Definition at line 121 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
double itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::m_MIN_NORM
staticprotected
template<class TImage>
NeighborhoodSizeValueType itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::m_Stride[ImageDimension]
protected
template<class TImage>
std::slice itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::x_slice[ImageDimension]
protected

Slices for the ND neighborhood.

Definition at line 113 of file itkGPUGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
std::slice itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::xa_slice[ImageDimension][ImageDimension]
protected
template<class TImage>
std::slice itk::GPUGradientNDAnisotropicDiffusionFunction< TImage >::xd_slice[ImageDimension][ImageDimension]
protected

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