Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes

itk::GradientNDAnisotropicDiffusionFunction< TImage > Class Template Reference
[Finite Difference FunctionsImage Enhancement Filters]

#include <itkGradientNDAnisotropicDiffusionFunction.h>

Inheritance diagram for itk::GradientNDAnisotropicDiffusionFunction< TImage >:
Inheritance graph
[legend]
Collaboration diagram for itk::GradientNDAnisotropicDiffusionFunction< TImage >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
typedef
ZeroFluxNeumannBoundaryCondition
< ImageType
DefaultBoundaryConditionType
typedef Superclass::FloatOffsetType FloatOffsetType
typedef Superclass::ImageType ImageType
typedef Vector< PixelRealType,
itkGetStaticConstMacro(ImageDimension)> 
NeighborhoodScalesType
typedef
Superclass::NeighborhoodType 
NeighborhoodType
typedef Superclass::PixelRealType PixelrealType
typedef Superclass::PixelRealType PixelRealType
typedef Superclass::PixelType PixelType
typedef SmartPointer< SelfPointer
typedef Superclass::RadiusType RadiusType
typedef
GradientNDAnisotropicDiffusionFunction 
Self
typedef
ScalarAnisotropicDiffusionFunction
< TImage > 
Superclass
typedef Superclass::TimeStepType TimeStepType

Public Member Functions

virtual void CalculateAverageGradientMagnitudeSquared (TImage *)
virtual void CalculateAverageGradientMagnitudeSquared (ImageType *)=0
virtual TimeStepType ComputeGlobalTimeStep (void *) const
const NeighborhoodScalesType ComputeNeighborhoodScales () const
virtual PixelType ComputeUpdate (const NeighborhoodType &neighborhood, void *globalData, const FloatOffsetType &offset=FloatOffsetType(0.0))
virtual Pointer CreateAnother () const
virtual void Delete ()
virtual void * GetGlobalDataPointer () const
virtual const char * GetNameOfClass () const
const RadiusTypeGetRadius () const
virtual int GetReferenceCount () const
virtual void InitializeIteration ()
void Print (std::ostream &os, Indent indent=0) const
virtual void Register () const
virtual void ReleaseGlobalDataPointer (void *) const
void SetRadius (const RadiusType &r)
virtual void SetReferenceCount (int)
virtual void UnRegister () const

void SetTimeStep (const TimeStepType &t)
const TimeStepTypeGetTimeStep () const

void SetConductanceParameter (const double &c)
const double & GetConductanceParameter () const

const double & GetAverageGradientMagnitudeSquared () const
void SetAverageGradientMagnitudeSquared (const double &c)

void SetScaleCoefficients (PixelRealType vals[ImageDimension])

Static Public Member Functions

static void BreakOnError ()
static Pointer New ()

Static Public Attributes

static const unsigned int ImageDimension = Superclass::ImageDimension

Protected Types

typedef int InternalReferenceCountType

Protected Member Functions

 GradientNDAnisotropicDiffusionFunction ()
void PrintSelf (std::ostream &os, Indent indent) const
 ~GradientNDAnisotropicDiffusionFunction ()

virtual void PrintHeader (std::ostream &os, Indent indent) const
virtual void PrintTrailer (std::ostream &os, Indent indent) const

Protected Attributes

DerivativeOperator< PixelType,
itkGetStaticConstMacro(ImageDimension)> 
dx_op
unsigned long m_Center
NeighborhoodInnerProduct
< ImageType
m_InnerProduct
PixelType m_K
RadiusType m_Radius
InternalReferenceCountType m_ReferenceCount
SimpleFastMutexLock m_ReferenceCountLock
PixelRealType m_ScaleCoefficients [ImageDimension]
unsigned long 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

Detailed Description

template<class 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 59 of file itkGradientNDAnisotropicDiffusionFunction.h.


Member Typedef Documentation

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

The default boundary condition for finite difference functions that is used unless overridden in the Evaluate() method.

Definition at line 92 of file itkFiniteDifferenceFunction.h.

A floating point offset from an image grid location. Used for interpolation among grid values in a neighborhood.

Reimplemented from itk::AnisotropicDiffusionFunction< TImage >.

Definition at line 83 of file itkGradientNDAnisotropicDiffusionFunction.h.

Inherit some parameters from the superclass type.

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

Definition at line 74 of file itkGradientNDAnisotropicDiffusionFunction.h.

typedef int itk::LightObject::InternalReferenceCountType [protected, inherited]

Define the type of the reference count according to the target. This allows the use of atomic operations

Definition at line 139 of file itkLightObject.h.

typedef Vector<PixelRealType,itkGetStaticConstMacro(ImageDimension)> itk::FiniteDifferenceFunction< TImage >::NeighborhoodScalesType [inherited]

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

Reimplemented in itk::CurvatureFlowFunction< TImage >.

Definition at line 103 of file itkFiniteDifferenceFunction.h.

The type of data structure that is passed to this function object to evaluate at a pixel that does not lie on a data set boundary.

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

Definition at line 82 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<class TImage >
typedef Superclass::PixelRealType itk::AnisotropicDiffusionFunction< TImage >::PixelrealType [inherited]

Definition at line 152 of file itkAnisotropicDiffusionFunction.h.

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

Standard class typedefs.

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

Definition at line 64 of file itkGradientNDAnisotropicDiffusionFunction.h.

Define the TimeStepType to always be double.

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

Definition at line 80 of file itkGradientNDAnisotropicDiffusionFunction.h.


Constructor & Destructor Documentation

template<class TImage>
itk::GradientNDAnisotropicDiffusionFunction< TImage >::GradientNDAnisotropicDiffusionFunction (  )  [protected]
template<class TImage>
itk::GradientNDAnisotropicDiffusionFunction< TImage >::~GradientNDAnisotropicDiffusionFunction (  )  [inline, protected]

Definition at line 103 of file itkGradientNDAnisotropicDiffusionFunction.h.


Member Function Documentation

static void itk::LightObject::BreakOnError (  )  [static, inherited]

This method is called when itkExceptionMacro executes. It allows the debugger to break on error.

template<class TImage >
virtual void itk::ScalarAnisotropicDiffusionFunction< TImage >::CalculateAverageGradientMagnitudeSquared ( TImage *   )  [virtual, inherited]
template<class TImage >
virtual void itk::AnisotropicDiffusionFunction< TImage >::CalculateAverageGradientMagnitudeSquared ( ImageType  )  [pure virtual, inherited]

This method is called before each iteration. It calculates a scalar value that is the average of the gradient magnitude squared at each pixel in the output image (intermediate solution). The average gradient magnitude value is typically used in the anisotropic diffusion equations to calibrate the conductance term.

template<class TImage >
virtual TimeStepType itk::AnisotropicDiffusionFunction< TImage >::ComputeGlobalTimeStep ( void *   )  const [inline, virtual, inherited]

Returns the time step supplied by the user. We don't need to use the global data supplied since we are returning a fixed value.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 205 of file itkAnisotropicDiffusionFunction.h.

const NeighborhoodScalesType itk::FiniteDifferenceFunction< TImage >::ComputeNeighborhoodScales (  )  const [inherited]

Compute the scales that weight the neighborhood during difference operations to properly account for spacing and neighborhood radius

template<class TImage>
virtual PixelType itk::GradientNDAnisotropicDiffusionFunction< TImage >::ComputeUpdate ( const NeighborhoodType neighborhood,
void *  globalData,
const FloatOffsetType offset = FloatOffsetType(0.0) 
) [virtual]

Compute the equation value.

Implements itk::FiniteDifferenceFunction< TImage >.

virtual Pointer itk::LightObject::CreateAnother (  )  const [virtual, inherited]
virtual void itk::LightObject::Delete (  )  [virtual, inherited]

Delete an itk object. This method should always be used to delete an object when the new operator was used to create it. Using the C delete method will not work with reference counting.

template<class TImage >
const double& itk::AnisotropicDiffusionFunction< TImage >::GetAverageGradientMagnitudeSquared (  )  const [inline, inherited]

Set/Get the average gradient magnitude squared.

Definition at line 193 of file itkAnisotropicDiffusionFunction.h.

template<class TImage >
const double& itk::AnisotropicDiffusionFunction< TImage >::GetConductanceParameter (  )  const [inline, inherited]

Set/Get the conductance parameter. The conductance parameter.

Definition at line 186 of file itkAnisotropicDiffusionFunction.h.

template<class TImage >
virtual void* itk::AnisotropicDiffusionFunction< TImage >::GetGlobalDataPointer (  )  const [inline, virtual, inherited]

The anisotropic diffusion classes don't use this particular parameter so it's safe to return a null value.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 212 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
virtual const char* itk::GradientNDAnisotropicDiffusionFunction< TImage >::GetNameOfClass (  )  const [virtual]

Run-time type information (and related methods)

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

const RadiusType& itk::FiniteDifferenceFunction< TImage >::GetRadius ( void   )  const [inline, inherited]

Returns the radius of the neighborhood this FiniteDifferenceFunction needs to perform its calculations.

Definition at line 146 of file itkFiniteDifferenceFunction.h.

virtual int itk::LightObject::GetReferenceCount (  )  const [inline, virtual, inherited]

Gets the reference count on this object.

Definition at line 106 of file itkLightObject.h.

template<class TImage >
const TimeStepType& itk::AnisotropicDiffusionFunction< TImage >::GetTimeStep (  )  const [inline, inherited]

Set/Get the time step. For this class of anisotropic diffusion filters, the time-step is supplied by the user and remains fixed for all updates.

Definition at line 175 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
virtual void itk::GradientNDAnisotropicDiffusionFunction< TImage >::InitializeIteration (  )  [inline, virtual]

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

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Definition at line 95 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
static Pointer itk::GradientNDAnisotropicDiffusionFunction< TImage >::New (  )  [static]

Method for creation through the object factory.

Reimplemented from itk::LightObject.

void itk::LightObject::Print ( std::ostream &  os,
Indent  indent = 0 
) const [inherited]

Cause the object to print itself out.

Referenced by itk::WeakPointer< ProcessObject >::Print().

virtual void itk::LightObject::PrintHeader ( std::ostream &  os,
Indent  indent 
) const [protected, virtual, inherited]

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.

template<class TImage >
void itk::AnisotropicDiffusionFunction< TImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const [inline, protected, virtual, inherited]

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::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::VectorAnisotropicDiffusionFunction< TImage >, and itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >.

Definition at line 232 of file itkAnisotropicDiffusionFunction.h.

References HardConnectedComponentImageFilter::PrintSelf().

virtual void itk::LightObject::PrintTrailer ( std::ostream &  os,
Indent  indent 
) const [protected, virtual, inherited]

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.

virtual void itk::LightObject::Register (  )  const [virtual, inherited]

Increase the reference count (mark as used by another object).

Reimplemented in itk::Object.

template<class TImage >
virtual void itk::AnisotropicDiffusionFunction< TImage >::ReleaseGlobalDataPointer ( void *   )  const [inline, virtual, inherited]

Does nothing. No global data is used in this class of equations.

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 218 of file itkAnisotropicDiffusionFunction.h.

template<class TImage >
void itk::AnisotropicDiffusionFunction< TImage >::SetAverageGradientMagnitudeSquared ( const double &  c  )  [inline, inherited]

Set/Get the average gradient magnitude squared.

Definition at line 197 of file itkAnisotropicDiffusionFunction.h.

template<class TImage >
void itk::AnisotropicDiffusionFunction< TImage >::SetConductanceParameter ( const double &  c  )  [inline, inherited]

Set/Get the conductance parameter. The conductance parameter.

Definition at line 182 of file itkAnisotropicDiffusionFunction.h.

void itk::FiniteDifferenceFunction< TImage >::SetRadius ( const RadiusType r  )  [inline, inherited]

Sets the radius of the neighborhood this FiniteDifferenceFunction needs to perform its calculations.

Definition at line 141 of file itkFiniteDifferenceFunction.h.

virtual void itk::LightObject::SetReferenceCount ( int   )  [virtual, inherited]

Sets the reference count on this object. This is a dangerous method, use it with care.

Reimplemented in itk::Object.

void itk::FiniteDifferenceFunction< TImage >::SetScaleCoefficients ( PixelRealType  vals[ImageDimension]  )  [inline, inherited]

Set the ScaleCoefficients for the difference operators. The defaults a 1.0. These can be set to take the image spacing into account.

Definition at line 152 of file itkFiniteDifferenceFunction.h.

template<class TImage >
void itk::AnisotropicDiffusionFunction< TImage >::SetTimeStep ( const TimeStepType t  )  [inline, inherited]

Set/Get the time step. For this class of anisotropic diffusion filters, the time-step is supplied by the user and remains fixed for all updates.

Definition at line 171 of file itkAnisotropicDiffusionFunction.h.

virtual void itk::LightObject::UnRegister (  )  const [virtual, inherited]

Decrease the reference count (release by another object).

Reimplemented in itk::Object.


Member Data Documentation

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

Derivative operator.

Definition at line 114 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
const unsigned int itk::GradientNDAnisotropicDiffusionFunction< TImage >::ImageDimension = Superclass::ImageDimension [static]

Inherit some parameters from the superclass type.

Reimplemented from itk::ScalarAnisotropicDiffusionFunction< TImage >.

Definition at line 86 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
unsigned long itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_Center [protected]

Definition at line 119 of file itkGradientNDAnisotropicDiffusionFunction.h.

Inner product function.

Definition at line 106 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
PixelType itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_K [protected]

Modified global average gradient magnitude term.

Definition at line 117 of file itkGradientNDAnisotropicDiffusionFunction.h.

template<class TImage>
double itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_MIN_NORM [static, protected]

Definition at line 122 of file itkGradientNDAnisotropicDiffusionFunction.h.

RadiusType itk::FiniteDifferenceFunction< TImage >::m_Radius [protected, inherited]

Definition at line 203 of file itkFiniteDifferenceFunction.h.

Number of uses of this object by other objects.

Definition at line 144 of file itkLightObject.h.

Mutex lock to protect modification to the reference count

Definition at line 147 of file itkLightObject.h.

Definition at line 204 of file itkFiniteDifferenceFunction.h.

template<class TImage>
unsigned long itk::GradientNDAnisotropicDiffusionFunction< TImage >::m_Stride[ImageDimension] [protected]

Definition at line 120 of file itkGradientNDAnisotropicDiffusionFunction.h.

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

Slices for the ND neighborhood.

Definition at line 109 of file itkGradientNDAnisotropicDiffusionFunction.h.

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

Definition at line 110 of file itkGradientNDAnisotropicDiffusionFunction.h.

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

Definition at line 111 of file itkGradientNDAnisotropicDiffusionFunction.h.


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

Generated at Mon Jul 12 2010 22:46:17 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000