SimpleITK  1.2.4
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
itk::simple::RecursiveGaussianImageFilter Class Reference

Base class for computing IIR convolution with an approximation of a Gaussian kernel. More...

#include <sitkRecursiveGaussianImageFilter.h>

+ Inheritance diagram for itk::simple::RecursiveGaussianImageFilter:
+ Collaboration diagram for itk::simple::RecursiveGaussianImageFilter:

Public Types

enum  OrderType {
  ZeroOrder,
  FirstOrder,
  SecondOrder
}
 
typedef typelist::Append< BasicPixelIDTypeList, VectorPixelIDTypeList >::Type PixelIDTypeList
 
typedef RecursiveGaussianImageFilter Self
 
- Public Types inherited from itk::simple::ImageFilter< 1 >
typedef ImageFilter Self
 
- Public Types inherited from itk::simple::ProcessObject
typedef ProcessObject Self
 

Public Member Functions

Image Execute (const Image &image1)
 
Image Execute (const Image &image1, double sigma, bool normalizeAcrossScale, RecursiveGaussianImageFilter::OrderType order, unsigned int direction)
 
unsigned int GetDirection () const
 
std::string GetName () const
 
bool GetNormalizeAcrossScale () const
 
OrderType GetOrder () const
 
double GetSigma () const
 
SelfNormalizeAcrossScaleOff ()
 
SelfNormalizeAcrossScaleOn ()
 
 RecursiveGaussianImageFilter ()
 
SelfSetDirection (unsigned int Direction)
 
SelfSetNormalizeAcrossScale (bool NormalizeAcrossScale)
 
SelfSetOrder (OrderType Order)
 
SelfSetSigma (double Sigma)
 
std::string ToString () const
 
virtual ~RecursiveGaussianImageFilter ()
 
- Public Member Functions inherited from itk::simple::ImageFilter< 1 >
 ImageFilter ()
 
virtual ~ImageFilter ()=0
 
- Public Member Functions inherited from itk::simple::ProcessObject
virtual void Abort ()
 
virtual int AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd)
 Add a Command Object to observer the event. More...
 
virtual float GetProgress () const
 An Active Measurement of the progress of execution. More...
 
virtual bool HasCommand (itk::simple::EventEnum event) const
 Query of this object has any registered commands for event. More...
 
 ProcessObject ()
 
virtual void RemoveAllCommands ()
 Remove all registered commands. More...
 
virtual ~ProcessObject ()
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
virtual bool GetDebug () const
 
virtual void SetDebug (bool debugFlag)
 
virtual void SetNumberOfThreads (unsigned int n)
 
virtual unsigned int GetNumberOfThreads () const
 

Private Types

typedef Image(Self::* MemberFunctionType) (const Image &image1)
 

Private Member Functions

template<class TImageType >
Image ExecuteInternal (const Image &image1)
 

Private Attributes

unsigned int m_Direction
 
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
 
bool m_NormalizeAcrossScale
 
OrderType m_Order
 
double m_Sigma
 

Friends

struct detail::MemberFunctionAddressor< MemberFunctionType >
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::simple::ProcessObject
static bool GetGlobalDefaultDebug ()
 
static void GlobalDefaultDebugOff ()
 
static void GlobalDefaultDebugOn ()
 
static void SetGlobalDefaultDebug (bool debugFlag)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static void SetGlobalWarningDisplay (bool flag)
 
static bool GetGlobalWarningDisplay ()
 
static void SetGlobalDefaultNumberOfThreads (unsigned int n)
 
static unsigned int GetGlobalDefaultNumberOfThreads ()
 
static double GetGlobalDefaultCoordinateTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultCoordinateTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
static double GetGlobalDefaultDirectionTolerance ()
 Access the global tolerance to determine congruent spaces. More...
 
static void SetGlobalDefaultDirectionTolerance (double)
 Access the global tolerance to determine congruent spaces. More...
 
- Protected Member Functions inherited from itk::simple::ProcessObject
virtual unsigned long AddITKObserver (const itk::EventObject &, itk::Command *)
 
virtual itk::ProcessObjectGetActiveProcess ()
 
virtual void OnActiveProcessDelete ()
 
virtual void onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT
 
virtual void PreUpdate (itk::ProcessObject *p)
 
virtual void RemoveITKObserver (EventCommand &e)
 
- Protected Member Functions inherited from itk::simple::NonCopyable
 NonCopyable ()
 
- Static Protected Member Functions inherited from itk::simple::ImageFilter< 1 >
static void FixNonZeroIndex (TImageType *img)
 
- Static Protected Member Functions inherited from itk::simple::ProcessObject
template<class TImageType >
static TImageType::ConstPointer CastImageToITK (const Image &img)
 
template<class TImageType >
static Image CastITKToImage (TImageType *img)
 
template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector>
static Image CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img)
 
static const itk::EventObjectGetITKEventObject (EventEnum e)
 
template<typename T >
static std::ostream & ToStringHelper (std::ostream &os, const T &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const signed char &v)
 
static std::ostream & ToStringHelper (std::ostream &os, const unsigned char &v)
 

Detailed Description

Base class for computing IIR convolution with an approximation of a Gaussian kernel.

\[ \frac{ 1 }{ \sigma \sqrt{ 2 \pi } } \exp{ \left( - \frac{x^2}{ 2 \sigma^2 } \right) } \]

RecursiveGaussianImageFilter is the base class for recursive filters that approximate convolution with the Gaussian kernel. This class implements the recursive filtering method proposed by R.Deriche in IEEE-PAMI Vol.12, No.1, January 1990, pp 78-87, "Fast Algorithms for Low-Level Vision"

Details of the implementation are described in the technical report: R. Deriche, "Recursively Implementing The Gaussian and Its Derivatives", INRIA, 1993, ftp://ftp.inria.fr/INRIA/tech-reports/RR/RR-1893.ps.gz

Further improvements of the algorithm are described in: G. Farneback & C.-F. Westin, "On Implementation of Recursive Gaussian Filters", so far unpublished.

As compared to itk::DiscreteGaussianImageFilter , this filter tends to be faster for large kernels, and it can take the derivative of the blurred image in one step. Also, note that we have itk::RecursiveGaussianImageFilter::SetSigma() , but itk::DiscreteGaussianImageFilter::SetVariance() .

See also
DiscreteGaussianImageFilter
itk::simple::RecursiveGaussian for the procedural interface
itk::RecursiveGaussianImageFilter for the Doxygen on the original ITK class.

Definition at line 53 of file sitkRecursiveGaussianImageFilter.h.

Member Typedef Documentation

typedef Image(Self::* itk::simple::RecursiveGaussianImageFilter::MemberFunctionType) (const Image &image1)
private

Setup for member function dispatching

Definition at line 157 of file sitkRecursiveGaussianImageFilter.h.

Define the pixels types supported by this filter

Definition at line 65 of file sitkRecursiveGaussianImageFilter.h.

Definition at line 55 of file sitkRecursiveGaussianImageFilter.h.

Member Enumeration Documentation

Enumerator
ZeroOrder 
FirstOrder 
SecondOrder 

Definition at line 108 of file sitkRecursiveGaussianImageFilter.h.

Constructor & Destructor Documentation

virtual itk::simple::RecursiveGaussianImageFilter::~RecursiveGaussianImageFilter ( )
virtual

Destructor

itk::simple::RecursiveGaussianImageFilter::RecursiveGaussianImageFilter ( )

Default Constructor that takes no arguments and initializes default parameters

Member Function Documentation

Image itk::simple::RecursiveGaussianImageFilter::Execute ( const Image image1)

Execute the filter on the input image

Image itk::simple::RecursiveGaussianImageFilter::Execute ( const Image image1,
double  sigma,
bool  normalizeAcrossScale,
RecursiveGaussianImageFilter::OrderType  order,
unsigned int  direction 
)

Execute the filter on the input image with the given parameters

template<class TImageType >
Image itk::simple::RecursiveGaussianImageFilter::ExecuteInternal ( const Image image1)
private
unsigned int itk::simple::RecursiveGaussianImageFilter::GetDirection ( ) const
inline

Definition at line 138 of file sitkRecursiveGaussianImageFilter.h.

std::string itk::simple::RecursiveGaussianImageFilter::GetName ( ) const
inlinevirtual

Name of this class

Implements itk::simple::ProcessObject.

Definition at line 140 of file sitkRecursiveGaussianImageFilter.h.

bool itk::simple::RecursiveGaussianImageFilter::GetNormalizeAcrossScale ( ) const
inline

Definition at line 106 of file sitkRecursiveGaussianImageFilter.h.

OrderType itk::simple::RecursiveGaussianImageFilter::GetOrder ( ) const
inline

Set/Get the Order of the Gaussian to convolve with.

  • ZeroOrder is equivalent to convolving with a Gaussian. This is the default.
  • FirstOrder is equivalent to convolving with the first derivative of a Gaussian.
  • SecondOrder is equivalent to convolving with the second derivative of a Gaussian.

Definition at line 130 of file sitkRecursiveGaussianImageFilter.h.

double itk::simple::RecursiveGaussianImageFilter::GetSigma ( ) const
inline

Set/Get the Sigma, measured in world coordinates, of the Gaussian kernel. The default is 1.0. An exception will be generated if the Sigma value is less than or equal to zero.

Definition at line 77 of file sitkRecursiveGaussianImageFilter.h.

Self& itk::simple::RecursiveGaussianImageFilter::NormalizeAcrossScaleOff ( )
inline

Definition at line 102 of file sitkRecursiveGaussianImageFilter.h.

Self& itk::simple::RecursiveGaussianImageFilter::NormalizeAcrossScaleOn ( )
inline

Set the value of NormalizeAcrossScale to true or false respectfully.

Definition at line 101 of file sitkRecursiveGaussianImageFilter.h.

Self& itk::simple::RecursiveGaussianImageFilter::SetDirection ( unsigned int  Direction)
inline

Definition at line 134 of file sitkRecursiveGaussianImageFilter.h.

Self& itk::simple::RecursiveGaussianImageFilter::SetNormalizeAcrossScale ( bool  NormalizeAcrossScale)
inline

Set/Get the flag for normalizing the gaussian over scale-space.

This flag enables the analysis of the differential shape of features independent of their size ( both pixels and physical size ). Following the notation of Tony Lindeberg:

Let

\[ L(x; t) = g(x; t) \ast f(x) \]

be the scale-space representation of image

\[ f(x) \]

where

\[ g(x; t) = \frac{1}{ \sqrt{ 2 \pi t} } \exp{ \left( -\frac{x^2}{ 2 t } \right) } \]

is the Gaussian function and

\[\ast\]

denotes convolution. This is a change from above with

\[ t = \sigma^2 \]

.

Then the normalized derivative operator for normalized coordinates across scale is:

\[ \partial_\xi = \sqrt{t} \partial_x \]

The resulting scaling factor is

\[ \sigma^N \]

where N is the order of the derivative.

When this flag is ON the filter will be normalized in such a way that the values of derivatives are not biased by the size of the object. That is to say the maximum value a feature reaches across scale is independent of the scale of the object.

For analyzing an image across scale-space you want to enable this flag. It is disabled by default.

Note
Not all scale space axioms are satisfied by this filter, some are only approximated. Particularly, at fine scales ( say less than 1 pixel ) other methods such as a discrete Gaussian kernel should be considered.

Definition at line 98 of file sitkRecursiveGaussianImageFilter.h.

Self& itk::simple::RecursiveGaussianImageFilter::SetOrder ( OrderType  Order)
inline

Set/Get the Order of the Gaussian to convolve with.

  • ZeroOrder is equivalent to convolving with a Gaussian. This is the default.
  • FirstOrder is equivalent to convolving with the first derivative of a Gaussian.
  • SecondOrder is equivalent to convolving with the second derivative of a Gaussian.

Definition at line 119 of file sitkRecursiveGaussianImageFilter.h.

Self& itk::simple::RecursiveGaussianImageFilter::SetSigma ( double  Sigma)
inline

Set/Get the Sigma, measured in world coordinates, of the Gaussian kernel. The default is 1.0. An exception will be generated if the Sigma value is less than or equal to zero.

Definition at line 72 of file sitkRecursiveGaussianImageFilter.h.

std::string itk::simple::RecursiveGaussianImageFilter::ToString ( ) const
virtual

Print ourselves out

Reimplemented from itk::simple::ProcessObject.

Friends And Related Function Documentation

Definition at line 161 of file sitkRecursiveGaussianImageFilter.h.

Member Data Documentation

unsigned int itk::simple::RecursiveGaussianImageFilter::m_Direction
private

Definition at line 173 of file sitkRecursiveGaussianImageFilter.h.

nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > itk::simple::RecursiveGaussianImageFilter::m_MemberFactory
private

Definition at line 163 of file sitkRecursiveGaussianImageFilter.h.

bool itk::simple::RecursiveGaussianImageFilter::m_NormalizeAcrossScale
private

Definition at line 169 of file sitkRecursiveGaussianImageFilter.h.

OrderType itk::simple::RecursiveGaussianImageFilter::m_Order
private

Definition at line 171 of file sitkRecursiveGaussianImageFilter.h.

double itk::simple::RecursiveGaussianImageFilter::m_Sigma
private

Definition at line 167 of file sitkRecursiveGaussianImageFilter.h.


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