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

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

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

#include <ltiConvolutionHelper.h>

List of all members.

Public Member Functions

 convHelper1D ()
 ~convHelper1D ()
bool setKernel (const mathObject *kern)
void apply (const vector< T > &src, vector< T > &dest, const modifier::parameters &param)
void applyCol (const matrix< T > &src, matrix< T > &dest, const modifier::parameters &param)
void applyRow (const matrix< T > &src, matrix< T > &dest, const modifier::parameters &param)
A & getAccumulator ()
const A & getAccumulator () const

Detailed Description

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

pre-convolution algorithm for a vector * kernel1D The type T is the type of the elements of the vector and 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::convHelper1D< T, A >::convHelper1D (  ) 

default constructor

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

destructor


Member Function Documentation

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

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

Consistency checks should be done by the apply methods!

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

convHelpers the columns of 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 destination matrix for the result
param parameters with the boundaryType to be used
template<class T , class A >
void lti::convHelper1D< T, A >::applyRow ( const matrix< T > &  src,
matrix< T > &  dest,
const modifier::parameters param 
)

convHelpers the rows of 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 destination matrix for the result
param parameters with the boundaryType to be used
template<class T , class A >
const A& lti::convHelper1D< T, A >::getAccumulator (  )  const

returns a reference to the accumulator object being used

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

returns a reference to the accumulator object being used

template<class T , class A >
bool lti::convHelper1D< 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

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