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

General convolution filter. More...

#include <mdsConvolution.h>

Inheritance diagram for mds::img::CConvolutionFilter< I, N >:
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 CNormImageFilter< I, Nbase
 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.
typedef base::tResult tResult
 Filter response type.

Public Member Functions

tDataat (tSize x, tSize y)
 Returns reference to the kernel coefficient [x][y].
const tDataat (tSize x, tSize y) const
 CConvolutionFilter (tSize Size)
 Constructor that creates a new 2D convolution kernel.
 CConvolutionFilter (tConstDataPtr pData, tSize Size)
 Constructor.
 CConvolutionFilter (const CKernel2D &k)
 Constructor.
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
tResult getResponse (const tImage &SrcImage, tSize x, tSize y)
 Returns filter response at specified image point.
tSize getSize () const
 Returns the kernel size.
bool operator() (const tImage &SrcImage, tImage &DstImage)
 Filtering of input/source image.
virtual bool operator() (const tImage &SrcImage, tImage &DstImage)=0
 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 set (tSize x, tSize y, const tData &Value)
 Sets the kernel data.
 ~CConvolutionFilter ()
 Destructor.

Protected Member Functions

void init (tSize Size)
 Allocates data of a given size.

Protected Attributes

tSize m_YOffset
 Kernel size in y-dimension.

Detailed Description

template<class I, template< typename > class N = CDefaultFilterPolicy>
class mds::img::CConvolutionFilter< I, N >

General convolution filter.


Member Typedef Documentation

template<class I , template< typename > class N = CDefaultFilterPolicy>
typedef CNormImageFilter<I,N> mds::img::CConvolutionFilter< I, N >::base

Image filter base.

Reimplemented from mds::img::CNormImageFilter< I, N >.

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 , template< typename > class N = CDefaultFilterPolicy>
typedef base::tImage mds::img::CConvolutionFilter< I, N >::tImage

Image type.

Reimplemented from mds::img::CNormImageFilter< I, N >.

template<class I , template< typename > class N = CDefaultFilterPolicy>
typedef base::tPixel mds::img::CConvolutionFilter< I, N >::tPixel

Image pixel type.

Reimplemented from mds::img::CNormImageFilter< I, N >.

template<class I , template< typename > class N = CDefaultFilterPolicy>
typedef base::tResult mds::img::CConvolutionFilter< I, N >::tResult

Filter response type.

Reimplemented from mds::img::CNormImageFilter< I, N >.


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 , template< typename > class N = CDefaultFilterPolicy>
mds::img::CConvolutionFilter< I, N >::CConvolutionFilter ( tSize  Size)

Constructor that creates a new 2D convolution kernel.

  • Parameter 'Size' must be an odd number
template<class I , template< typename > class N = CDefaultFilterPolicy>
mds::img::CConvolutionFilter< I, N >::CConvolutionFilter ( tConstDataPtr  pData,
tSize  Size 
)

Constructor.

template<class I , template< typename > class N = CDefaultFilterPolicy>
mds::img::CConvolutionFilter< I, N >::CConvolutionFilter ( const CKernel2D k)

Constructor.

  • Filter is based on a given convolution kernel
template<class I , template< typename > class N = CDefaultFilterPolicy>
mds::img::CConvolutionFilter< I, N >::~CConvolutionFilter ( )

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

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 , template< typename > class N = CDefaultFilterPolicy>
tResult mds::img::CConvolutionFilter< I, N >::getResponse ( const tImage SrcImage,
tSize  x,
tSize  y 
)

Returns filter response at specified image point.

  • Value is not normalized!
tSize mds::img::CKernel2D::getSize ( ) const [inherited]
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 , template< typename > class N>
bool CConvolutionFilter::operator() ( const tImage SrcImage,
tImage DstImage 
)

Filtering of input/source image.

Point filter responses are written to the destination image.

  • Returns false on failure.
virtual bool mds::img::CNormImageFilter< I, N >::operator() ( const tImage SrcImage,
tImage DstImage 
) [pure virtual, inherited]

Filtering of input/source 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]
void mds::img::CKernel2D::set ( tSize  x,
tSize  y,
const tData Value 
) [inherited]

Sets the kernel data.


Member Data Documentation

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

Kernel size in y-dimension.


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