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

#include <itkGaussianOperator.h>

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

Detailed Description

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

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

GaussianOperator can be used to perform Gaussian blurring 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 effect separable, efficient, N-D Gaussian blurring of an image region.

GaussianOperator takes two parameters:

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

(2) 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.).

See Also
NeighborhoodOperator
NeighborhoodIterator
Neighborhood
Wiki Examples:
Examples:
Examples/Iterators/NeighborhoodIterators4.cxx, Examples/Iterators/NeighborhoodIterators5.cxx, and WikiExamples/Operators/GaussianOperator.cxx.

Definition at line 67 of file itkGaussianOperator.h.

Public Types

typedef GaussianOperator 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

 GaussianOperator ()
 
double GetMaximumError ()
 
unsigned int GetMaximumKernelWidth () const
 
virtual const char * GetNameOfClass () const
 
double GetVariance ()
 
double ModifiedBesselI (int, double)
 
double ModifiedBesselI0 (double)
 
double ModifiedBesselI1 (double)
 
void SetMaximumError (const double &max_error)
 
void SetMaximumKernelWidth (unsigned int n)
 
void SetVariance (const double &variance)
 
 GaussianOperator (const Self &other)
 
Selfoperator= (const Self &other)
 
virtual void PrintSelf (std::ostream &os, Indent i) const override
 
- 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) override
 
CoefficientVector GenerateCoefficients () override
 
- 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 ()
 

Private Attributes

double m_MaximumError
 
unsigned int m_MaximumKernelWidth
 
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::GaussianOperator< TPixel, VDimension, TAllocator >::CoefficientVector
protected

Definition at line 159 of file itkGaussianOperator.h.

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

Standard class typedefs.

Definition at line 73 of file itkGaussianOperator.h.

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

Definition at line 74 of file itkGaussianOperator.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 79 of file itkGaussianOperator.h.

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

Copy constructor

Definition at line 82 of file itkGaussianOperator.h.

Member Function Documentation

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::GaussianOperator< TPixel, VDimension, TAllocator >::Fill ( const CoefficientVector coeff)
inlineoverrideprotectedvirtual

Arranges coefficients spatially in the memory buffer.

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

Definition at line 179 of file itkGaussianOperator.h.

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
CoefficientVector itk::GaussianOperator< TPixel, VDimension, TAllocator >::GenerateCoefficients ( )
overrideprotectedvirtual

Calculates operator coefficients.

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

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::GetMaximumError ( )
inline

Returns the 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.

Definition at line 133 of file itkGaussianOperator.h.

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

Returns the maximum allowed kernel width.

Definition at line 144 of file itkGaussianOperator.h.

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
virtual const char* itk::GaussianOperator< TPixel, VDimension, TAllocator >::GetNameOfClass ( ) const
virtual
template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::GetVariance ( )
inline

Returns the variance of the Gaussian (scale) for the operator.

Definition at line 126 of file itkGaussianOperator.h.

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

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 >>
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI0 ( double  )

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 >>
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI1 ( double  )

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 >>
Self& itk::GaussianOperator< TPixel, VDimension, TAllocator >::operator= ( const Self other)
inline

Assignment operator

Definition at line 92 of file itkGaussianOperator.h.

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

Prints some debugging information.

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

Definition at line 148 of file itkGaussianOperator.h.

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

Sets 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 must be between 0.0 and 1.0.

Definition at line 115 of file itkGaussianOperator.h.

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

Sets 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 140 of file itkGaussianOperator.h.

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

Sets the desired variance of the Gaussian kernel.

Definition at line 106 of file itkGaussianOperator.h.

Member Data Documentation

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

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

Definition at line 188 of file itkGaussianOperator.h.

Referenced by itk::GaussianOperator< ScalarType, Superclass::Dimension >::GaussianOperator(), and itk::GaussianOperator< ScalarType, Superclass::Dimension >::operator=().

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
unsigned int itk::GaussianOperator< 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 193 of file itkGaussianOperator.h.

Referenced by itk::GaussianOperator< ScalarType, Superclass::Dimension >::GaussianOperator(), and itk::GaussianOperator< ScalarType, Superclass::Dimension >::operator=().

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

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