ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Private Member Functions | Private Attributes | List of all members
itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator > Class Template Reference

#include <itkGaussianDerivativeOperator.h>

+ Inheritance diagram for itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >:
+ Collaboration diagram for itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >:

Detailed Description

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
class itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >

A NeighborhoodOperator whose coefficients are a one dimensional, discrete derivative Gaussian kernel.

GaussianDerivativeOperator can be used to calculate Gaussian derivatives by taking its inner product with to a Neighborhood (NeighborhooIterator) that is swept across an image region. It is a directional operator. N successive applications oriented along each dimensional direction will calculate separable, efficient, N-D Gaussian derivatives of an image region.

GaussianDerivativeOperator takes three parameters:

(1) The floating-point variance of the desired Gaussian function.

(2) The order of the derivative to be calculated (zero order means it performs only smoothing as a standard itk::GaussianOperator)

(3) The "maximum error" allowed in the discrete Gaussian function. "Maximum errror" is defined as the difference between the area under the discrete Gaussian curve and the area under the continuous Gaussian. Maximum error affects the Gaussian operator size. Care should be taken not to make this value too small relative to the variance lest the operator size become unreasonably large.

References: The Gaussian kernel contained in this operator was described by Tony Lindeberg (Discrete Scale-Space Theory and the Scale-Space Primal Sketch. Dissertation. Royal Institute of Technology, Stockholm, Sweden. May 1991.).

Author
Ivan Macia, VICOMTech, Spain, http://www.vicomtech.es

This implementation is derived from the Insight Journal paper: http://hdl.handle.net/1926/1290

See Also
GaussianOperator
NeighborhoodOperator
NeighborhoodIterator
Neighborhood
Wiki Examples:
Examples:
WikiExamples/Operators/GaussianDerivativeOperator.cxx.

Definition at line 79 of file itkGaussianDerivativeOperator.h.

Public Types

typedef DerivativeOperator
< TPixel, VDimension,
TAllocator > 
DerivativeOperatorType
 
typedef GaussianOperator
< TPixel, VDimension,
TAllocator > 
GaussianOperatorType
 
typedef GaussianDerivativeOperator Self
 
typedef NeighborhoodOperator
< TPixel, VDimension,
TAllocator > 
Superclass
 
- Public Types inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
typedef NumericTraits< TPixel >
::RealType 
PixelRealType
 
typedef TPixel PixelType
 
typedef NeighborhoodOperator Self
 
typedef Superclass::SizeType SizeType
 
typedef SliceIterator< TPixel,
Self
SliceIteratorType
 
typedef Neighborhood< TPixel,
VDimension, TAllocator > 
Superclass
 
- Public Types inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
typedef TAllocator AllocatorType
 
typedef
AllocatorType::const_iterator 
ConstIterator
 
typedef unsigned int DimensionValueType
 
typedef AllocatorType::iterator Iterator
 
typedef SizeValueType NeighborIndexType
 
typedef Offset< VDimension > OffsetType
 
typedef TPixel PixelType
 
typedef Neighborhood Self
 
typedef SizeType::SizeValueType SizeValueType
 
typedef SliceIterator< TPixel,
Self
SliceIteratorType
 

Public Member Functions

 GaussianDerivativeOperator ()
 
 GaussianDerivativeOperator (const Self &other)
 
double GetMaximumError ()
 
Selfoperator= (const Self &other)
 
virtual void PrintSelf (std::ostream &os, Indent i) const
 
void SetMaximumError (const double maxerror)
 
void SetMaximumKernelWidth (unsigned int n)
 
void SetNormalizeAcrossScale (bool flag)
 
bool GetNormalizeAcrossScale () const
 
virtual void NormalizeAcrossScaleOn ()
 
virtual void NormalizeAcrossScaleOff ()
 
void SetVariance (const double variance)
 
double GetVariance () const
 
void SetSpacing (const double spacing)
 
double GetSpacing () const
 
void SetOrder (const unsigned int order)
 
unsigned int GetOrder () const
 
- Public Member Functions inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
virtual void CreateDirectional ()
 
virtual void CreateToRadius (const SizeType &)
 
virtual void CreateToRadius (const SizeValueType)
 
virtual void FlipAxes ()
 
unsigned long GetDirection () const
 
 NeighborhoodOperator ()
 
 NeighborhoodOperator (const Self &orig)
 
void ScaleCoefficients (PixelRealType)
 
void SetDirection (const unsigned long &direction)
 
Selfoperator= (const Self &orig)
 
- Public Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
NeighborIndexType GetCenterNeighborhoodIndex () const
 
TPixel GetCenterValue () const
 
virtual NeighborIndexType GetNeighborhoodIndex (const OffsetType &) const
 
OffsetType GetOffset (NeighborIndexType i) const
 
const SizeType GetRadius () const
 
SizeValueType GetRadius (DimensionValueType n) const
 
SizeValueType GetSize (DimensionValueType n) const
 
SizeType GetSize () const
 
std::slice GetSlice (unsigned int) const
 
OffsetValueType GetStride (DimensionValueType axis) const
 
 itkTypeMacroNoParent (Neighborhood)
 
 Neighborhood (const Self &other)
 
bool operator!= (const Self &other) const
 
Selfoperator= (const Self &other)
 
bool operator== (const Self &other) const
 
void Print (std::ostream &os) const
 
void SetRadius (const SizeType &)
 
void SetRadius (const SizeValueType)
 
NeighborIndexType Size () const
 
virtual ~Neighborhood ()
 
 Neighborhood ()
 
Iterator End ()
 
Iterator Begin ()
 
ConstIterator End () const
 
ConstIterator Begin () const
 
TPixel & operator[] (NeighborIndexType i)
 
const TPixel & operator[] (NeighborIndexType i) const
 
TPixel & GetElement (NeighborIndexType i)
 
void SetRadius (const SizeValueType *rad)
 
AllocatorTypeGetBufferReference ()
 
const AllocatorTypeGetBufferReference () const
 
TPixel & operator[] (const OffsetType &o)
 
const TPixel & operator[] (const OffsetType &o) const
 

Protected Types

typedef
Superclass::CoefficientVector 
CoefficientVector
 
- Protected Types inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
typedef std::vector
< PixelRealType
CoefficientVector
 

Protected Member Functions

void Fill (const CoefficientVector &coeff)
 
CoefficientVector GenerateCoefficients ()
 
- Protected Member Functions inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
virtual void FillCenteredDirectional (const CoefficientVector &)
 
void InitializeToZero ()
 
- Protected Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
virtual void Allocate (NeighborIndexType i)
 
virtual void ComputeNeighborhoodOffsetTable ()
 
virtual void ComputeNeighborhoodStrideTable ()
 
void SetSize ()
 

Static Protected Member Functions

static double ModifiedBesselI (int, double)
 
static double ModifiedBesselI0 (double)
 
static double ModifiedBesselI1 (double)
 

Private Member Functions

CoefficientVector GenerateGaussianCoefficients () const
 
const char * GetNameOfClass () const
 

Private Attributes

double m_MaximumError
 
unsigned int m_MaximumKernelWidth
 
bool m_NormalizeAcrossScale
 
unsigned int m_Order
 
double m_Spacing
 
double m_Variance
 

Additional Inherited Members

- Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
typedef::itk::Size< VDimension > RadiusType
 
typedef::itk::Size< VDimension > SizeType
 
- Static Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
static const unsigned int NeighborhoodDimension = VDimension
 

Member Typedef Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef Superclass::CoefficientVector itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::CoefficientVector
protected

Definition at line 159 of file itkGaussianDerivativeOperator.h.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef DerivativeOperator< TPixel, VDimension, TAllocator > itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::DerivativeOperatorType

Definition at line 90 of file itkGaussianDerivativeOperator.h.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef GaussianOperator< TPixel, VDimension, TAllocator > itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GaussianOperatorType

Neighborhood operator types.

Definition at line 89 of file itkGaussianDerivativeOperator.h.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef GaussianDerivativeOperator itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::Self

Standard class typedefs.

Definition at line 85 of file itkGaussianDerivativeOperator.h.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef NeighborhoodOperator< TPixel, VDimension, TAllocator > itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::Superclass

Definition at line 86 of file itkGaussianDerivativeOperator.h.

Constructor & Destructor Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GaussianDerivativeOperator ( )

Constructor.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GaussianDerivativeOperator ( const Self other)

Copy constructor

Member Function Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::Fill ( const CoefficientVector coeff)
inlineprotectedvirtual
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
CoefficientVector itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GenerateCoefficients ( )
protectedvirtual

Calculates operator coefficients.

Implements itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
CoefficientVector itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GenerateGaussianCoefficients ( ) const
private
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetMaximumError ( )
inline
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
const char* itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetNameOfClass ( ) const
inlineprivatevirtual

For compatibility with itkWarningMacro

Reimplemented from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >.

Definition at line 187 of file itkGaussianDerivativeOperator.h.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
bool itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetNormalizeAcrossScale ( ) const
inline

Set/Get the flag for calculating scale-space normalized derivatives.

Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.

Definition at line 111 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_NormalizeAcrossScale.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
unsigned int itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetOrder ( ) const
inline

Sets/Get the order of the derivative.

Definition at line 151 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Order.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetSpacing ( ) const
inline

Set/Get the spacing for the direction of this kernel.

Definition at line 124 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Spacing.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetVariance ( void  ) const
inline

Set/Get the variance of the Gaussian kernel.

Definition at line 119 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Variance.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
static double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI ( int  ,
double   
)
staticprotected

Returns the value of the modified Bessel function Ik(x) at a point x>=0, where k>=2.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
static double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI0 ( double  )
staticprotected

Returns the value of the modified Bessel function I0(x) at a point x >= 0.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
static double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI1 ( double  )
staticprotected

Returns the value of the modified Bessel function I1(x) at a point x, x real.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
virtual void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::NormalizeAcrossScaleOff ( )
virtual

Set/Get the flag for calculating scale-space normalized derivatives.

Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
virtual void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::NormalizeAcrossScaleOn ( )
virtual

Set/Get the flag for calculating scale-space normalized derivatives.

Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
Self& itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::operator= ( const Self other)

Assignment operator

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
virtual void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::PrintSelf ( std::ostream &  os,
Indent  i 
) const
virtual

Prints member variables

Reimplemented from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetMaximumError ( const double  maxerror)
inline

Set/Get the desired maximum error of the gaussian approximation. Maximum error is the difference between the area under the discrete Gaussian curve and the area under the continuous Gaussian. Maximum error affects the Gaussian operator size. The value is clamped between 0.00001 and 0.99999.

Definition at line 131 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_MaximumError.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetMaximumKernelWidth ( unsigned int  n)
inline

Sets/Get a limit for growth of the kernel. Small maximum error values with large variances will yield very large kernel sizes. This value can be used to truncate a kernel in such instances. A warning will be given on truncation of the kernel.

Definition at line 144 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_MaximumKernelWidth.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetNormalizeAcrossScale ( bool  flag)
inline

Set/Get the flag for calculating scale-space normalized derivatives.

Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.

Definition at line 110 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_NormalizeAcrossScale.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetOrder ( const unsigned int  order)
inline

Sets/Get the order of the derivative.

Definition at line 150 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Order.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetSpacing ( const double  spacing)
inline

Set/Get the spacing for the direction of this kernel.

Definition at line 123 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Spacing.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetVariance ( const double  variance)
inline

Set/Get the variance of the Gaussian kernel.

Definition at line 118 of file itkGaussianDerivativeOperator.h.

References itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Variance.

Member Data Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_MaximumError
private

Difference between the areas under the curves of the continuous and discrete Gaussian functions.

Definition at line 200 of file itkGaussianDerivativeOperator.h.

Referenced by itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GetMaximumError(), and itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetMaximumError().

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
unsigned int itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_MaximumKernelWidth
private

Maximum kernel size allowed. This value is used to truncate a kernel that has grown too large. A warning is given when the specified maximum error causes the kernel to exceed this size.

Definition at line 205 of file itkGaussianDerivativeOperator.h.

Referenced by itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::SetMaximumKernelWidth().

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
bool itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_NormalizeAcrossScale
private
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
unsigned int itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Order
private
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Spacing
private
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::m_Variance
private

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