Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

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

#include <itkAnisotropicDiffusionFunction.h>

Inheritance diagram for itk::AnisotropicDiffusionFunction:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef AnisotropicDiffusionFunction Self
typedef FiniteDifferenceFunction<
TImage > 
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef Superclass::ImageType ImageType
typedef Superclass::PixelType PixelType
typedef Superclass::RadiusType RadiusType
typedef Superclass::NeighborhoodType NeighborhoodType
typedef Superclass::BoundaryNeighborhoodType BoundaryNeighborhoodType
typedef Superclass::TimeStepType TimeStepType
typedef Superclass::FloatOffsetType FloatOffsetType

Public Methods

virtual const char * GetClassName () const
 itkStaticConstMacro (ImageDimension, unsigned int, Superclass::ImageDimension)
virtual void CalculateAverageGradientMagnitudeSquared (ImageType *)=0
virtual TimeStepType ComputeGlobalTimeStep (void *GlobalData) const
virtual void * GetGlobalDataPointer () const
virtual void ReleaseGlobalDataPointer (void *GlobalData) 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)

Protected Methods

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

Detailed Description

template<class TImage>
class itk::AnisotropicDiffusionFunction< TImage >

This class is a virtual base for anisotropic diffusion function objects. It is a component object in the finite difference solver hierarchy (see itkFiniteDifferenceImageFilter for an overview). AnisotropicDiffusionFunction objects are used by AnisotropicDiffusionImageFilter objects to perform non-linear diffusion on itk::Images.
Overview of anisotropic diffusion
Anisotropic diffusion methods are formulated to reduce noise (or unwanted detail) in images while preserving specific image features. For many applications, there is an assumption that light-dark transitions (edges) are interesting. Standard isotropic diffusion methods move and blur light-dark boundaries. Anisotropic diffusion methods are formulated to specifically preserve edges.
Anisotropic diffusion methods can be thought of as tools for calculating multi-scale descriptions of images. Embed an image in a higher dimensional function of derived images, . This higher dimensional function represents the solution of the heat diffusion equation,

with constant and initial condition , the original image.

Extending to the case where is not a constant, but a function of , gives

Our choice of now varies the strength of diffusion anisotropically. Typically, is chosen as some function of image features to selectively preserve or remove those features. For example, edges tend to be preserved over smoother regions where is inversely scaled according to gradient magnitude as in

.

Several variations on the scheme presented above are implemented in Itk as subclasses of this equation. The equations are solved using an iterative, finite forward difference technique (see the FiniteDifferenceImageFilter class).

How to use this class
This class must be subclassed to provide the CalculateUpdate() methods of FiniteDifferenceFunction and the function CalculateAverageGradientMagnitudeSquared(), which is called before each iteration to recalibrate the conductance term.
Parameters
The parameters defined in this class apply to the basic anisotropic diffusion equation described in AnisotropicDiffusionFunction. Variations on the basic equation will be more or less sensitive to these parameters. For example, functions that perform higher-order derivative calculations may require smaller time-steps than those that only do first-derivative calculations. Wherever possibe, reasonable parameters settings are suggested in the documentation of a specific equation implementation.
TimeStep
In the anisotropic diffusion filter hierarchy, the time step is set explicitly by the user. The time step referred to here corresponds exactly to in the finite difference update equation described in FiniteDifferenceImageFilter (see itkFiniteDifferenceImageFilter for more information). Appropriate time steps for solving this type of p.d.e. depend on the dimensionality of the image and the order of the equation. Typical values are less than 0.250. A stable value for most 2 and 3d functions is 0.125.
Conductance Parameter
The conductance parameter controls the sensitivity of the conductance term in the basic anisotropic diffusion equation. It affect the conductance term in different ways depending on the particular variation on the basic equation. As a general rule, the lower the value, the more strongly the diffusion equation preserves image features (such as high gradients or curvature). A high value for conductance will cause the filter to diffuse image features more readily. Typical values range from 0.5 to 2.0 for data like the Visible Human color data, but the correct value for your application is wholly dependent on the results you want from a specific data set and the number or iterations you perform.
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:
VectorAnisotropicDiffusionFunction , ScalarAnisotropicDiffusionFunction , GradientAnisotropicDiffusionFunction , CurvatureAnisotropicDiffusionFunction , VectorGradientAnisotropicDiffusionFunction
Todo:
Automatically generate the time step value from image dimensionality and order of the equations

Definition at line 132 of file itkAnisotropicDiffusionFunction.h.


Member Typedef Documentation

template<class TImage>
typedef Superclass::BoundaryNeighborhoodType itk::AnisotropicDiffusionFunction< TImage >::BoundaryNeighborhoodType
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 151 of file itkAnisotropicDiffusionFunction.h.

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

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 141 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef Superclass::FloatOffsetType itk::AnisotropicDiffusionFunction< TImage >::FloatOffsetType
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 153 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef Superclass::ImageType itk::AnisotropicDiffusionFunction< TImage >::ImageType
 

Inherit some parameters from the superclass type

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 147 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef Superclass::NeighborhoodType itk::AnisotropicDiffusionFunction< TImage >::NeighborhoodType
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 150 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef Superclass::PixelType itk::AnisotropicDiffusionFunction< TImage >::PixelType
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 148 of file itkAnisotropicDiffusionFunction.h.

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

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 140 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef Superclass::RadiusType itk::AnisotropicDiffusionFunction< TImage >::RadiusType
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 149 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef AnisotropicDiffusionFunction itk::AnisotropicDiffusionFunction< TImage >::Self
 

Standard class typedefs.

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 138 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef FiniteDifferenceFunction<TImage> itk::AnisotropicDiffusionFunction< TImage >::Superclass
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 139 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
typedef Superclass::TimeStepType itk::AnisotropicDiffusionFunction< TImage >::TimeStepType
 

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

Definition at line 152 of file itkAnisotropicDiffusionFunction.h.


Constructor & Destructor Documentation

template<class TImage>
itk::AnisotropicDiffusionFunction< TImage >::AnisotropicDiffusionFunction   [inline, protected]
 

Definition at line 203 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
itk::AnisotropicDiffusionFunction< TImage >::~AnisotropicDiffusionFunction   [inline, protected]
 

Definition at line 209 of file itkAnisotropicDiffusionFunction.h.


Member Function Documentation

template<class TImage>
virtual void itk::AnisotropicDiffusionFunction< TImage >::CalculateAverageGradientMagnitudeSquared ImageType   [pure virtual]
 

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 *    GlobalData const [inline, virtual]
 

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 190 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
const double& itk::AnisotropicDiffusionFunction< TImage >::GetAverageGradientMagnitudeSquared   const [inline]
 

Set/Get the average gradient magnitude squared.

Definition at line 182 of file itkAnisotropicDiffusionFunction.h.

Referenced by itk::GradientNDAnisotropicDiffusionFunction< TImage >::InitializeIteration().

template<class TImage>
virtual const char* itk::AnisotropicDiffusionFunction< TImage >::GetClassName   const [virtual]
 

Run-time type information (and related methods)

Reimplemented from itk::FiniteDifferenceFunction< TImage >.

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

template<class TImage>
const double& itk::AnisotropicDiffusionFunction< TImage >::GetConductanceParameter   const [inline]
 

Set/Get the conductance parameter. The conductance parameter

Definition at line 177 of file itkAnisotropicDiffusionFunction.h.

Referenced by itk::GradientNDAnisotropicDiffusionFunction< TImage >::InitializeIteration().

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

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 195 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
const TimeStepType& itk::AnisotropicDiffusionFunction< TImage >::GetTimeStep   const [inline]
 

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 170 of file itkAnisotropicDiffusionFunction.h.

template<class TImage>
itk::AnisotropicDiffusionFunction< TImage >::itkStaticConstMacro ImageDimension   ,
unsigned    int,
Superclass::ImageDimension   
 

Inherit some parameters from the superclass type

Reimplemented in itk::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >, and itk::VectorGradientNDAnisotropicDiffusionFunction< TImage >.

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

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::CurvatureNDAnisotropicDiffusionFunction< TImage >, itk::GradientNDAnisotropicDiffusionFunction< TImage >, itk::ScalarAnisotropicDiffusionFunction< TImage >, itk::VectorAnisotropicDiffusionFunction< TImage >, and itk::VectorCurvatureNDAnisotropicDiffusionFunction< TImage >.

Definition at line 211 of file itkAnisotropicDiffusionFunction.h.

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

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

Implements itk::FiniteDifferenceFunction< TImage >.

Definition at line 199 of file itkAnisotropicDiffusionFunction.h.

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

Set/Get the average gradient magnitude squared.

Definition at line 184 of file itkAnisotropicDiffusionFunction.h.

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

Set/Get the conductance parameter. The conductance parameter

Definition at line 175 of file itkAnisotropicDiffusionFunction.h.

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

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 168 of file itkAnisotropicDiffusionFunction.h.


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:13:52 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000