MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
mds::img::CGaussFilter< I > Class Template Reference

Gaussian smoothing filter. More...

#include <mdsGaussian.h>

Inheritance diagram for mds::img::CGaussFilter< I >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE }
 Check that I is an image. More...
typedef CImageFilter< I > base
 Image filter base.
typedef mds::base::CData
< tConvKernelData
data
 Data base.
typedef data::tConstDataPtr tConstDataPtr
 Pointer to the constant data.
typedef data::tData tData
 Data type.
typedef data::tDataPtr tDataPtr
 Pointer to the data.
typedef base::tImage tImage
 Image type.
typedef base::tPixel tPixel
 Image pixel type.

Public Member Functions

tDataat (tSize x, tSize y)
 Returns reference to the kernel coefficient [x][y].
const tDataat (tSize x, tSize y) const
 CGaussFilter (double dSigma)
 Constructor that creates Gaussian filter having a specified standard deviation ("sigma" parameter).
 CGaussFilter (tSize Size)
 Constructor that creates Gaussian filter having the standard deviation corresponding to a given kernel size.
void create (tSize Size)
 Creates a new 2D convolution kernel.
tDataPtr getPtr (tSize x, tSize y)
 Returns pointer to a specified kernel coefficient [x][y].
tConstDataPtr getPtr (tSize x, tSize y) const
tDataPtr getPtr ()
 Returns pointer to the kernel data.
tConstDataPtr getPtr () const
tPixel getResponse (const tImage &SrcImage, tSize x, tSize y)
 Returns filter response at specified image point.
double getSigma () const
 Returns filter standard deviation.
tSize getSize () const
 Returns filter standard deviation.
bool operator() (const tImage &SrcImage, tImage &DstImage)
 Filtering of input/source image.
tDataoperator() (tSize i)
 Returns reference to the subscripted element [i].
const tDataoperator() (tSize i) const
tDataoperator() (tSize x, tSize y)
 Returns reference to the kernel coefficient [x][y].
const tDataoperator() (tSize x, tSize y) const
void resize (tSize Size)
 Sets the filter size.
void set (tSize x, tSize y, const tData &Value)
 Sets the kernel data.
void setSigma (double dSigma)
 Sets the filter standard deviation.
 ~CGaussFilter ()
 Destructor.

Static Public Member Functions

static double getGaussianFuncValue (double dX, double dY, double dSigma)
 Returns value of the Gaussian function.
static tSize sigma2Size (double dSigma)
 Returns kernel size corresponding to a given sigma parameter.
static double size2Sigma (tSize Size)
 Returns sigma parametr according to a given kernel size.

Protected Member Functions

void init (tSize Size)
 Allocates data of a given size.
void initKernel (double dSigma)
 Computes the Gaussian filter kernel.

Protected Attributes

double m_dSigma
 Standard deviation ("sigma") of the Gaussian filter.
tSize m_YOffset
 Kernel size in y-dimension.

Detailed Description

template<class I>
class mds::img::CGaussFilter< I >

Gaussian smoothing filter.


Member Typedef Documentation

template<class I>
typedef CImageFilter<I> mds::img::CGaussFilter< I >::base

Image filter base.

Reimplemented from mds::base::CData< tConvKernelData >.

Data base.

Pointer to the constant data.

Reimplemented from mds::base::CData< tConvKernelData >.

Data type.

Reimplemented from mds::base::CData< tConvKernelData >.

Pointer to the data.

Reimplemented from mds::base::CData< tConvKernelData >.

template<class I>
typedef base::tImage mds::img::CGaussFilter< I >::tImage

Image type.

Reimplemented from mds::img::CImageFilter< I >.

template<class I>
typedef base::tPixel mds::img::CGaussFilter< I >::tPixel

Image pixel type.

Reimplemented from mds::img::CImageFilter< I >.


Member Enumeration Documentation

template<class I>
anonymous enum [inherited]

Check that I is an image.

You will see name of this enum somewhere in compiler error message if the type I is not image.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_IMAGE 

Constructor & Destructor Documentation

template<class I>
mds::img::CGaussFilter< I >::CGaussFilter ( double  dSigma)

Constructor that creates Gaussian filter having a specified standard deviation ("sigma" parameter).

template<class I>
mds::img::CGaussFilter< I >::CGaussFilter ( tSize  Size)

Constructor that creates Gaussian filter having the standard deviation corresponding to a given kernel size.

template<class I>
mds::img::CGaussFilter< I >::~CGaussFilter ( )

Destructor.


Member Function Documentation

tData& mds::img::CKernel2D::at ( tSize  x,
tSize  y 
) [inherited]

Returns reference to the kernel coefficient [x][y].

  • Kernel data viewed as two dimensional array.
const tData& mds::img::CKernel2D::at ( tSize  x,
tSize  y 
) const [inherited]
void mds::img::CKernel2D::create ( tSize  Size) [inherited]

Creates a new 2D convolution kernel.

Reimplemented from mds::base::CData< tConvKernelData >.

template<class I >
double CGaussFilter::getGaussianFuncValue ( double  dX,
double  dY,
double  dSigma 
) [static]

Returns value of the Gaussian function.

tDataPtr mds::img::CKernel2D::getPtr ( tSize  x,
tSize  y 
) [inherited]

Returns pointer to a specified kernel coefficient [x][y].

tConstDataPtr mds::img::CKernel2D::getPtr ( tSize  x,
tSize  y 
) const [inherited]

Returns pointer to the kernel data.

Reimplemented from mds::base::CData< tConvKernelData >.

template<class I>
tPixel mds::img::CGaussFilter< I >::getResponse ( const tImage SrcImage,
tSize  x,
tSize  y 
)

Returns filter response at specified image point.

  • Value is not normalized!
template<class I>
double mds::img::CGaussFilter< I >::getSigma ( ) const

Returns filter standard deviation.

template<class I>
tSize mds::img::CGaussFilter< I >::getSize ( ) const

Returns filter standard deviation.

Reimplemented from mds::img::CKernel2D.

void mds::img::CKernel2D::init ( tSize  Size) [protected, inherited]

Allocates data of a given size.

  • This method is primarily designed for kernel data allocation when the default constructor was used.
  • Provides no checking of the existing data and its (de,re)allocation.
  • Avoid of using it!
template<class I >
void CGaussFilter::initKernel ( double  dSigma) [protected]

Computes the Gaussian filter kernel.

template<class I >
bool CGaussFilter::operator() ( const tImage SrcImage,
tImage DstImage 
) [virtual]

Filtering of input/source image.

Point filter responses are written to the destination image.

  • Returns false on failure.

Implements mds::img::CImageFilter< I >.

tData& mds::base::CData< tConvKernelData >::operator() ( tSize  i) [inherited]

Returns reference to the subscripted element [i].

Reimplemented in mds::img::CKernel1D.

const tData& mds::base::CData< tConvKernelData >::operator() ( tSize  i) const [inherited]

Reimplemented in mds::img::CKernel1D.

tData& mds::img::CKernel2D::operator() ( tSize  x,
tSize  y 
) [inherited]

Returns reference to the kernel coefficient [x][y].

  • Kernel data are viewed as two dimensional.
const tData& mds::img::CKernel2D::operator() ( tSize  x,
tSize  y 
) const [inherited]
template<class I >
void CGaussFilter::resize ( tSize  Size)

Sets the filter size.

void mds::img::CKernel2D::set ( tSize  x,
tSize  y,
const tData Value 
) [inherited]

Sets the kernel data.

template<class I >
void CGaussFilter::setSigma ( double  dSigma)

Sets the filter standard deviation.

template<class I >
tSize CGaussFilter::sigma2Size ( double  dSigma) [static]

Returns kernel size corresponding to a given sigma parameter.

template<class I >
double CGaussFilter::size2Sigma ( tSize  Size) [static]

Returns sigma parametr according to a given kernel size.


Member Data Documentation

template<class I>
double mds::img::CGaussFilter< I >::m_dSigma [protected]

Standard deviation ("sigma") of the Gaussian filter.

tSize mds::img::CKernel2D::m_YOffset [protected, inherited]

Kernel size in y-dimension.


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