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

lti::convHelper2D< T, A > Class Template Reference

pre-convolution algorithm for a matrix * kernel2D The type T is the type of the elements of the vector an kernel1D The class A determines how the values should be accumulated. More...

#include <ltiConvolutionHelper.h>

Collaboration diagram for lti::convHelper2D< T, A >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 convHelper2D ()
 ~convHelper2D ()
bool setKernel (const mathObject *kern)
bool isKernelSeparable () const
void apply (const matrix< T > &src, matrix< T > &dest, const modifier::parameters &param)
void applySep (const matrix< T > &src, matrix< T > &dest, const modifier::parameters &param)
void applyMask (const matrix< T > &src, matrix< T > &dest, const modifier::parameters &param)
void setMask (const channel8 &mask)
const channel8getMask () const
A & getAccumulator ()
const A & getAccumulator () const

Detailed Description

template<class T, class A>
class lti::convHelper2D< T, A >

pre-convolution algorithm for a matrix * kernel2D The type T is the type of the elements of the vector an kernel1D The class A determines how the values should be accumulated.

The class A must have following methods:

Examples of the accumulator class can be found in: lti::dilation::accumulatorGray, lti::dilation::accumulatorBin, lti::erosion::accumulatorGray, lti::erosion::accumulatorBin, lti::convolution::accumulator

The implementation of these methods allows the efficient use of this class for the implementation of convolution, dilation and erosion.

Please note that this class is intended to be used just as a helper class. The correctness of the parameters and input data must be ensured by the "helped" classes before these methods are called.


Constructor & Destructor Documentation

template<class T , class A >
lti::convHelper2D< T, A >::convHelper2D (  ) 

default constructor

template<class T , class A >
lti::convHelper2D< T, A >::~convHelper2D (  ) 

destructor


Member Function Documentation

template<class T , class A >
void lti::convHelper2D< T, A >::apply ( const matrix< T > &  src,
matrix< T > &  dest,
const modifier::parameters param 
)

convHelpers the matrix src with the filter kernel and leaves the result in dest.

Consistency checks should be done by the apply methods!

Parameters:
src matrix to be filtered
dest result
param parameters with the boundaryType to be used
template<class T , class A >
void lti::convHelper2D< T, A >::applyMask ( const matrix< T > &  src,
matrix< T > &  dest,
const modifier::parameters param 
)

convolves the matrix src with the object depicted in the filter kernel and described by the mask.

Leaves the result in dest.

Consistency checks should be done by the apply methods!

Parameters:
src matrix to be filtered
dest result
param parameters that determine e.g. border behaviour
template<class T , class A >
void lti::convHelper2D< T, A >::applySep ( const matrix< T > &  src,
matrix< T > &  dest,
const modifier::parameters param 
)

convHelpers the matrix src with the separable filter kernel and leaves the result in dest.

Consistency checks should be done by the apply methods!

Parameters:
src matrix to be filtered
dest result
param parameters with the boundaryType to be used
template<class T , class A >
const A& lti::convHelper2D< T, A >::getAccumulator (  )  const

returns a reference to the accumulator object being used

template<class T , class A >
A& lti::convHelper2D< T, A >::getAccumulator (  ) 

returns a reference to the accumulator object being used

template<class T , class A >
const channel8* lti::convHelper2D< T, A >::getMask (  )  const

Returns a pointer to the current mask.

template<class T , class A >
bool lti::convHelper2D< T, A >::isKernelSeparable (  )  const [inline]

get kernel type

template<class T , class A >
bool lti::convHelper2D< T, A >::setKernel ( const mathObject kern  ) 

try to get a Kernel from the parameters.

If it is not possible to get it, return false; This will not copy the kernel, it just will keep a reference to it!

Parameters:
kern the mathObject with the kernel.
Returns:
true if kernel could be set and false otherwise
template<class T , class A >
void lti::convHelper2D< T, A >::setMask ( const channel8 mask  ) 

Set the mask to be used with the kernel.


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

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