CVR-Lib last update 20 Sep 2009

cvr::fixedGridInterpolation< T > Class Template Reference

This abstract class parents all interpolation functors, whose samples have equal distances to each other (per dimension), i.e. More...

#include <cvrFixedGridInterpolation.h>

Inheritance diagram for cvr::fixedGridInterpolation< T >:

Inheritance graph
[legend]
Collaboration diagram for cvr::fixedGridInterpolation< T >:

Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 The parameters for the class fixedGridInterpolation. More...

Public Types

typedef T value_type

Public Member Functions

 fixedGridInterpolation ()
 fixedGridInterpolation (const parameters &par)
 fixedGridInterpolation (const fixedGridInterpolation &other)
virtual ~fixedGridInterpolation ()
const std::string & name () const
fixedGridInterpolationcopy (const fixedGridInterpolation &other)
fixedGridInterpolationoperator= (const fixedGridInterpolation &other)
const parametersgetParameters () const
virtual bool use (const vector< T > &vct)
virtual bool use (const matrix< T > &vct)
virtual T apply (const vector< T > &src, const float &x) const =0
virtual T apply (const float &x) const =0
virtual T apply (const matrix< T > &src, const float &row, const float &col) const =0
virtual T apply (const matrix< T > &src, const fpoint &p) const =0
virtual T apply (const float &row, const float &col) const =0
virtual T apply (const fpoint &p) const =0
interpolate (const matrix< T > &src, const float &row, const float &col) const
virtual int getRangeOfInfluence () const =0
bool setBoundaryType (const eBoundaryType boundaryType)

Protected Member Functions

Boundary access operators
These inline non-virtual methods are intended to be used by inherited classes to access the extended versions of the at() matrix access methods, for still integer indices.

zeroAt (const vector< T > &img, const int x) const
cstAt (const vector< T > &img, const int x) const
mirrAt (const vector< T > &img, const int x) const
periAt (const vector< T > &img, const int x) const
zeroAt (const matrix< T > &img, const int y, const int x) const
cstAt (const matrix< T > &img, const int y, const int x) const
mirrAt (const matrix< T > &img, const int y, const int x) const
periAt (const matrix< T > &img, const int y, const int x) const

Protected Attributes

const vector< T > * theVector_
const matrix< T > * theMatrix_


Detailed Description

template<typename T>
class cvr::fixedGridInterpolation< T >

This abstract class parents all interpolation functors, whose samples have equal distances to each other (per dimension), i.e.

data is in a vector or matrix which includes images.


Member Typedef Documentation

template<typename T>
typedef T cvr::fixedGridInterpolation< T >::value_type

Definition of the type of the elements in the applys (given type T).


Constructor & Destructor Documentation

template<typename T>
cvr::fixedGridInterpolation< T >::fixedGridInterpolation (  ) 

Default constructor.

template<typename T>
cvr::fixedGridInterpolation< T >::fixedGridInterpolation ( const parameters par  ) 

Construct a functor using the given parameters.

template<typename T>
cvr::fixedGridInterpolation< T >::fixedGridInterpolation ( const fixedGridInterpolation< T > &  other  ) 

Copy constructor.

Parameters:
other the object to be copied

template<typename T>
virtual cvr::fixedGridInterpolation< T >::~fixedGridInterpolation (  )  [virtual]

Destructor.


Member Function Documentation

template<typename T>
virtual T cvr::fixedGridInterpolation< T >::apply ( const fpoint p  )  const [pure virtual]

Returns the interpolated value of the matrix specified with use() at the real valued position p.

Parameters:
p the real valued position to be interpolated.
Returns:
the interpolated value of the matrix.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
virtual T cvr::fixedGridInterpolation< T >::apply ( const float &  row,
const float &  col 
) const [pure virtual]

Returns the interpolated value of the matrix specified with use() at the real valued position (row,col).

Parameters:
row which row
col which column
Returns:
the interpolated value of the matrix.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
virtual T cvr::fixedGridInterpolation< T >::apply ( const matrix< T > &  src,
const fpoint p 
) const [pure virtual]

Returns the interpolated value of the matrix at the real valued position p.

Parameters:
src matrix<T> with the source data.
p the real valued position to be interpolated.
Returns:
the interpolated value of the matrix.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
virtual T cvr::fixedGridInterpolation< T >::apply ( const matrix< T > &  src,
const float &  row,
const float &  col 
) const [pure virtual]

Returns the interpolated value of the matrix at the real valued position (row,col).

Parameters:
src matrix<T> with the source data.
row which row
col which column
Returns:
the interpolated value of the matrix.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
virtual T cvr::fixedGridInterpolation< T >::apply ( const float &  x  )  const [pure virtual]

Returns the interpolated value of the vector specified with use() at the real valued position x.

Parameters:
x the real valued position to be interpolated.
Returns:
the interpolated value of the vector.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
virtual T cvr::fixedGridInterpolation< T >::apply ( const vector< T > &  src,
const float &  x 
) const [pure virtual]

Returns the interpolated value of the vector at the real valued position x.

Parameters:
src vector<T> with the source data.
x the real valued position to be interpolated.
Returns:
the interpolated value of the vector.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
fixedGridInterpolation& cvr::fixedGridInterpolation< T >::copy ( const fixedGridInterpolation< T > &  other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

template<typename T>
T cvr::fixedGridInterpolation< T >::cstAt ( const matrix< T > &  img,
const int  y,
const int  x 
) const [inline, protected]

Access with constant boundary.

template<typename T>
T cvr::fixedGridInterpolation< T >::cstAt ( const vector< T > &  img,
const int  x 
) const [inline, protected]

Access with constant boundary.

template<typename T>
const parameters& cvr::fixedGridInterpolation< T >::getParameters (  )  const

template<typename T>
virtual int cvr::fixedGridInterpolation< T >::getRangeOfInfluence (  )  const [pure virtual]

This method returns which pixel range around the interpolated postition is considered by the interpolation functor.

This is very useful for other functors to decide whether they should call the interpolate() methods or the faster interpolateUnchk() methods.

If the returned value is a and the interpolated position is (x,y) all pixels with coordinates in $ [x-a .. x+a] \times [y-a .. y+a] $ may be considered by the interpolation functor.

Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.

template<typename T>
T cvr::fixedGridInterpolation< T >::interpolate ( const matrix< T > &  src,
const float &  row,
const float &  col 
) const [inline]

Returns the interpolated value of the matrix at the real valued position (row,col).

This method is NOT virtual and can be used if this interpolation type is used as template parameter in time critical situations.

If not reimplemented in the inherited class, the virtual apply method with the same signature will be called.

Parameters:
src matrix<T> with the source data.
row which row
col which column
Returns:
the interpolated value of the matrix.

template<typename T>
T cvr::fixedGridInterpolation< T >::mirrAt ( const matrix< T > &  img,
const int  y,
const int  x 
) const [inline, protected]

Access with mirrored boundary.

template<typename T>
T cvr::fixedGridInterpolation< T >::mirrAt ( const vector< T > &  img,
const int  x 
) const [inline, protected]

Access with mirrored boundary.

template<typename T>
const std::string& cvr::fixedGridInterpolation< T >::name (  )  const [virtual]

template<typename T>
fixedGridInterpolation& cvr::fixedGridInterpolation< T >::operator= ( const fixedGridInterpolation< T > &  other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

template<typename T>
T cvr::fixedGridInterpolation< T >::periAt ( const matrix< T > &  img,
const int  y,
const int  x 
) const [inline, protected]

Access with periodic boundary.

template<typename T>
T cvr::fixedGridInterpolation< T >::periAt ( const vector< T > &  img,
const int  x 
) const [inline, protected]

Access with periodic boundary.

template<typename T>
bool cvr::fixedGridInterpolation< T >::setBoundaryType ( const eBoundaryType  boundaryType  ) 

Shortcut for setting the boundary type of a functor derived from modifier.

Note: The boundaryType is modified via direct access to the internal parameters object.

template<typename T>
virtual bool cvr::fixedGridInterpolation< T >::use ( const matrix< T > &  vct  )  [virtual]

all the next apply methods will return the interpolated values of the given matrix.

template<typename T>
virtual bool cvr::fixedGridInterpolation< T >::use ( const vector< T > &  vct  )  [virtual]

all the next apply methods will return the interpolated values of the given vector.

template<typename T>
T cvr::fixedGridInterpolation< T >::zeroAt ( const matrix< T > &  img,
const int  y,
const int  x 
) const [inline, protected]

Access with zero boundary.

template<typename T>
T cvr::fixedGridInterpolation< T >::zeroAt ( const vector< T > &  img,
const int  x 
) const [inline, protected]

Access with zero boundary.


Member Data Documentation

template<typename T>
const matrix<T>* cvr::fixedGridInterpolation< T >::theMatrix_ [protected]

the matrix in use

template<typename T>
const vector<T>* cvr::fixedGridInterpolation< T >::theVector_ [protected]

the vector in use


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

Generated on Sun Sep 20 22:08:58 2009 for CVR-Lib by Doxygen 1.5.8