LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::squareConvolution< T, A >::parameters Class Reference

the parameters for the class squareConvolution More...

#include <ltiSquareConvolution.h>

Inheritance diagram for lti::squareConvolution< T, A >::parameters:
Inheritance graph
[legend]
Collaboration diagram for lti::squareConvolution< T, A >::parameters:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 parameters (const int k=3)
 parameters (const parameters &other)
 ~parameters ()
const char * getTypeName () const
parameterscopy (const parameters &other)
virtual functor::parametersclone () const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)
void initSquare (const int size)

Public Attributes

rectangle kernelSize
kernelNorm

Detailed Description

template<class T, class A = T>
class lti::squareConvolution< T, A >::parameters

the parameters for the class squareConvolution


Constructor & Destructor Documentation

template<class T , class A = T>
lti::squareConvolution< T, A >::parameters::parameters ( const int  k = 3  )  [inline]

default constructor to initialize a kernel of k x k size centered at (0,0)

References lti::squareConvolution< T, A >::parameters::initSquare().

template<class T , class A = T>
lti::squareConvolution< T, A >::parameters::parameters ( const parameters other  )  [inline]

copy constructor

Parameters:
other the parameters object to be copied

Reimplemented from lti::modifier::parameters.

References lti::squareConvolution< T, A >::parameters::copy().

template<class T , class A = T>
lti::squareConvolution< T, A >::parameters::~parameters (  )  [inline, virtual]

destructor

Reimplemented from lti::functor::parameters.


Member Function Documentation

template<class T , class A = T>
virtual functor::parameters* lti::squareConvolution< T, A >::parameters::clone (  )  const [inline, virtual]

returns a pointer to a clone of the parameters

Reimplemented from lti::modifier::parameters.

References lti::modifier::parameters::parameters().

template<class T , class A = T>
parameters& lti::squareConvolution< T, A >::parameters::copy ( const parameters other  )  [inline]
template<class T , class A = T>
const char* lti::squareConvolution< T, A >::parameters::getTypeName ( void   )  const [inline, virtual]

returns name of this type

Reimplemented from lti::modifier::parameters.

template<class T , class A = T>
void lti::squareConvolution< T, A >::parameters::initSquare ( const int  size  )  [inline]

Initialize the parameters for a symmetric square kernel sizeXsize, where the sum of all elements equals one.

If the size is even, it will be "fixed" to the next odd number

References lti::trectangle< T, S >::br, lti::squareConvolution< T, A >::parameters::kernelNorm, lti::squareConvolution< T, A >::parameters::kernelSize, lti::trectangle< T, S >::ul, lti::tpoint< T >::x, and lti::tpoint< T >::y.

Referenced by lti::squareConvolution< T, A >::parameters::parameters().

template<class T , class A = T>
virtual bool lti::squareConvolution< T, A >::parameters::read ( ioHandler handler,
const bool  complete = true 
) [inline, virtual]

read the parameters from the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also read, otherwise only the data block will be read.
Returns:
true if write was successful

Reimplemented from lti::modifier::parameters.

References lti::squareConvolution< T, A >::parameters::kernelNorm, lti::squareConvolution< T, A >::parameters::kernelSize, lti::ioHandler::readBegin(), and lti::ioHandler::readEnd().

template<class T , class A = T>
virtual bool lti::squareConvolution< T, A >::parameters::write ( ioHandler handler,
const bool  complete = true 
) const [inline, virtual]

write the parameters in the given ioHandler

Parameters:
handler the ioHandler to be used
complete if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written.
Returns:
true if write was successful

Reimplemented from lti::modifier::parameters.

References lti::squareConvolution< T, A >::parameters::kernelNorm, lti::squareConvolution< T, A >::parameters::kernelSize, lti::ioHandler::writeBegin(), and lti::ioHandler::writeEnd().


Member Data Documentation

template<class T , class A = T>
T lti::squareConvolution< T, A >::parameters::kernelNorm

The norm is the value which will be considered as "1.0" for the elements of the kernel.

The default value is 9 (for a 3x3 kernel). You can consider the square filter always as a kernel with nxn "ones". After the convolution, the resulting image will be divide by this value. The implementation combines the convolution with this normalization!

Referenced by lti::squareConvolution< T, A >::parameters::copy(), lti::squareConvolution< T, A >::parameters::initSquare(), lti::squareConvolution< T, A >::parameters::read(), and lti::squareConvolution< T, A >::parameters::write().

template<class T , class A = T>
rectangle lti::squareConvolution< T, A >::parameters::kernelSize

The rectangular kernel will have the value "1/kernelNorm" between the limits specified by this rectangle.

When convolving a vector, the "y" coordinates of this kernelSize will be ignored. Default value: rectangle(-1,-1,1,1), i.e. a 3x3 kernel

Referenced by lti::squareConvolution< T, A >::parameters::copy(), lti::squareConvolution< T, A >::parameters::initSquare(), lti::squareConvolution< T, A >::parameters::read(), and lti::squareConvolution< T, A >::parameters::write().


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

Generated on Sat Apr 10 15:27:55 2010 for LTI-Lib by Doxygen 1.6.1