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::CVolumeGaussFilter< V > Class Template Reference

3D Gaussian smoothing filter. More...

#include <mdsGaussian.h>

Inheritance diagram for mds::img::CVolumeGaussFilter< V >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_VOLUME = V::CLASS_VOLUME }
 Check that type V is a volume. More...
typedef CVolumeFilter< V > base
 Volume 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 mds::base::CFunctor
< bool, int, int
tProgressFunc
 Progress observer (= functor).
typedef CProgressInitializer tProgressInitializer
 Helper class which can be used to call methods beginProgress() and endProgress() automatically.
typedef base::tVolume tVolume
 Volume type.
typedef base::tVoxel tVoxel
 Volume voxel type.

Public Member Functions

tDataat (tSize x, tSize y, tSize z)
 Returns reference to the kernel coefficient [x][y][z].
const tDataat (tSize x, tSize y, tSize z) const
void beginProgress ()
 This function must be called by the class realizing an operation before it starts.
void create (tSize Size)
 Creates a new 2D convolution kernel.
 CVolumeGaussFilter (double dSigma)
 Constructor that creates Gaussian filter having a specified standard deviation ("sigma" parameter).
 CVolumeGaussFilter (tSize Size)
 Constructor that creates Gaussian filter having the standard deviation corresponding to a given kernel size.
void deregisterProgressFunc ()
 Sets the default empty observer.
void endProgress ()
 The function must be called by the class realizing an operation every time the operation finishes.
int getProgressCount () const
 Returns current value of the internal progress value.
int getProgressMax () const
 Returns the maximum allowed value of the internal progress counter.
tDataPtr getPtr (tSize x, tSize y, tSize z)
 Returns pointer to a given kernel data [x][y][z].
tConstDataPtr getPtr (tSize x, tSize y, tSize z) const
tDataPtr getPtr ()
 Returns pointer to the kernel data.
tConstDataPtr getPtr () const
tVoxel getResponse (const tVolume &SrcVolume, tSize x, tSize y, tSize z)
 Returns filter response at specified volume point.
double getSigma () const
 Returns filter standard deviation.
tSize getSize () const
 Returns the kernel size.
bool operator() (const tVolume &SrcVolume, tVolume &DstVolume)
 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, tSize z)
 Returns the subscripted kernel coefficient [x][y][z].
const tDataoperator() (tSize x, tSize y, tSize z) const
bool progress (int iIncrement=1)
 Calls the registered observer.
void registerProgressFunc (const tProgressFunc &Func)
 Sets observer/functor called to inform a calling process about the current state of the running operation.
void resize (tSize Size)
 Sets the filter size.
void set (tSize x, tSize y, tSize z, const tData &Value)
 Sets the kernel data.
void setProgressMax (int iValue)
 Sets the maximal counter value.
void setSigma (double dSigma)
 Sets the filter standard deviation.
 ~CVolumeGaussFilter ()
 Destructor.

Static Public Member Functions

static double getGaussianFuncValue (double dX, double dY, double dZ, 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.
tSize m_ZOffset

Detailed Description

template<class V>
class mds::img::CVolumeGaussFilter< V >

3D Gaussian smoothing filter.


Member Typedef Documentation

template<class V >
typedef CVolumeFilter<V> mds::img::CVolumeGaussFilter< V >::base

Volume 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 >.

Progress observer (= functor).

  • You may return false from the observer if you want to terminate the running operation.
  • Parameters describe current and final state of the pending operation (counter and maximal value).
  • If the second parameter is equal to -1, termination time cannot be determined, the current state is unknown.

Helper class which can be used to call methods beginProgress() and endProgress() automatically.

Create static object of this type at the begining of a method that realizes an operation.

template<class V >
typedef base::tVolume mds::img::CVolumeGaussFilter< V >::tVolume

Volume type.

Reimplemented from mds::img::CVolumeFilter< V >.

template<class V >
typedef base::tVoxel mds::img::CVolumeGaussFilter< V >::tVoxel

Volume voxel type.

Reimplemented from mds::img::CVolumeFilter< V >.


Member Enumeration Documentation

template<class V>
anonymous enum [inherited]

Check that type V is a volume.

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

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_VOLUME 

Constructor & Destructor Documentation

template<class V >
mds::img::CVolumeGaussFilter< V >::CVolumeGaussFilter ( double  dSigma)

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

template<class V >
mds::img::CVolumeGaussFilter< V >::CVolumeGaussFilter ( tSize  Size)

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

template<class V >
mds::img::CVolumeGaussFilter< V >::~CVolumeGaussFilter ( )

Destructor.


Member Function Documentation

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

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

  • Kernel data are viewed as three dimensional.
const tData& mds::img::CKernel3D::at ( tSize  x,
tSize  y,
tSize  z 
) const [inherited]
void mds::mod::CProgress::beginProgress ( ) [inherited]

This function must be called by the class realizing an operation before it starts.

void mds::img::CKernel3D::create ( tSize  Size) [inherited]

Creates a new 2D convolution kernel.

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

Sets the default empty observer.

void mds::mod::CProgress::endProgress ( ) [inherited]

The function must be called by the class realizing an operation every time the operation finishes.

  • Sets the default observer.
template<class V >
double CVolumeGaussFilter::getGaussianFuncValue ( double  dX,
double  dY,
double  dZ,
double  dSigma 
) [static]

Returns value of the Gaussian function.

Returns current value of the internal progress value.

Returns the maximum allowed value of the internal progress counter.

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

Returns pointer to a given kernel data [x][y][z].

  • 3D version.
tConstDataPtr mds::img::CKernel3D::getPtr ( tSize  x,
tSize  y,
tSize  z 
) const [inherited]

Returns pointer to the kernel data.

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

template<class V >
tVoxel mds::img::CVolumeGaussFilter< V >::getResponse ( const tVolume SrcVolume,
tSize  x,
tSize  y,
tSize  z 
)

Returns filter response at specified volume point.

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

Returns filter standard deviation.

tSize mds::img::CKernel3D::getSize ( ) const [inherited]

Returns the kernel size.

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

void mds::img::CKernel3D::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 V >
void CVolumeGaussFilter::initKernel ( double  dSigma) [protected]

Computes the Gaussian filter kernel.

template<class V >
bool CVolumeGaussFilter::operator() ( const tVolume SrcVolume,
tVolume DstVolume 
) [virtual]

Filtering of input/source image.

Point filter responses are written to the destination image.

  • Returns false on failure.

Implements mds::img::CVolumeFilter< V >.

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::CKernel3D::operator() ( tSize  x,
tSize  y,
tSize  z 
) [inherited]

Returns the subscripted kernel coefficient [x][y][z].

  • Kernel data are viewed as three dimensional.
const tData& mds::img::CKernel3D::operator() ( tSize  x,
tSize  y,
tSize  z 
) const [inherited]
bool mds::mod::CProgress::progress ( int  iIncrement = 1) [inherited]

Calls the registered observer.

  • Returns false if the running operation should be terminated as soon as possible.
  • It must be called periodically by the class realizing the operation.
void mds::mod::CProgress::registerProgressFunc ( const tProgressFunc Func) [inherited]

Sets observer/functor called to inform a calling process about the current state of the running operation.

  • This function should be called before any operation starts.
template<class V >
void CVolumeGaussFilter::resize ( tSize  Size)

Sets the filter size.

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

Sets the kernel data.

  • 3D version.
void mds::mod::CProgress::setProgressMax ( int  iValue) [inherited]

Sets the maximal counter value.

template<class V >
void CVolumeGaussFilter::setSigma ( double  dSigma)

Sets the filter standard deviation.

template<class V >
tSize CVolumeGaussFilter::sigma2Size ( double  dSigma) [static]

Returns kernel size corresponding to a given sigma parameter.

template<class V >
double CVolumeGaussFilter::size2Sigma ( tSize  Size) [static]

Returns sigma parametr according to a given kernel size.


Member Data Documentation

template<class V >
double mds::img::CVolumeGaussFilter< V >::m_dSigma [protected]

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

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

Kernel size.

tSize mds::img::CKernel3D::m_ZOffset [protected, inherited]

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