last update 20 Sep 2009 |
#include <cvrFixedGridInterpolation.h>
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 |
fixedGridInterpolation & | copy (const fixedGridInterpolation &other) |
fixedGridInterpolation & | operator= (const fixedGridInterpolation &other) |
const parameters & | getParameters () 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 |
T | 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. | |
T | zeroAt (const vector< T > &img, const int x) const |
T | cstAt (const vector< T > &img, const int x) const |
T | mirrAt (const vector< T > &img, const int x) const |
T | periAt (const vector< T > &img, const int x) const |
T | zeroAt (const matrix< T > &img, const int y, const int x) const |
T | cstAt (const matrix< T > &img, const int y, const int x) const |
T | mirrAt (const matrix< T > &img, const int y, const int x) const |
T | periAt (const matrix< T > &img, const int y, const int x) const |
Protected Attributes | |
const vector< T > * | theVector_ |
const matrix< T > * | theMatrix_ |
data is in a vector or matrix which includes images.
typedef T cvr::fixedGridInterpolation< T >::value_type |
Definition of the type of the elements in the applys (given type T).
cvr::fixedGridInterpolation< T >::fixedGridInterpolation | ( | ) |
Default constructor.
cvr::fixedGridInterpolation< T >::fixedGridInterpolation | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
cvr::fixedGridInterpolation< T >::fixedGridInterpolation | ( | const fixedGridInterpolation< T > & | other | ) |
virtual cvr::fixedGridInterpolation< T >::~fixedGridInterpolation | ( | ) | [virtual] |
Destructor.
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.
p | the real valued position to be interpolated. |
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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).
row | which row | |
col | which column |
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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.
src | matrix<T> with the source data. | |
p | the real valued position to be interpolated. |
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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).
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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.
x | the real valued position to be interpolated. |
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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.
src | vector<T> with the source data. | |
x | the real valued position to be interpolated. |
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.
fixedGridInterpolation& cvr::fixedGridInterpolation< T >::copy | ( | const fixedGridInterpolation< T > & | other | ) |
T cvr::fixedGridInterpolation< T >::cstAt | ( | const matrix< T > & | img, | |
const int | y, | |||
const int | x | |||
) | const [inline, protected] |
Access with constant boundary.
T cvr::fixedGridInterpolation< T >::cstAt | ( | const vector< T > & | img, | |
const int | x | |||
) | const [inline, protected] |
Access with constant boundary.
const parameters& cvr::fixedGridInterpolation< T >::getParameters | ( | ) | const |
Returns used parameters.
Reimplemented from cvr::parametersManager.
Reimplemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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 may be considered by the interpolation functor.
Implemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< 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.
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
T cvr::fixedGridInterpolation< T >::mirrAt | ( | const matrix< T > & | img, | |
const int | y, | |||
const int | x | |||
) | const [inline, protected] |
Access with mirrored boundary.
T cvr::fixedGridInterpolation< T >::mirrAt | ( | const vector< T > & | img, | |
const int | x | |||
) | const [inline, protected] |
Access with mirrored boundary.
const std::string& cvr::fixedGridInterpolation< T >::name | ( | ) | const [virtual] |
Returns the name of this class.
Implements cvr::functor.
Reimplemented in cvr::bilinearInterpolation< T >, cvr::genericInterpolation< T >, and cvr::nearestNeighborInterpolation< T >.
fixedGridInterpolation& cvr::fixedGridInterpolation< T >::operator= | ( | const fixedGridInterpolation< T > & | other | ) |
T cvr::fixedGridInterpolation< T >::periAt | ( | const matrix< T > & | img, | |
const int | y, | |||
const int | x | |||
) | const [inline, protected] |
Access with periodic boundary.
T cvr::fixedGridInterpolation< T >::periAt | ( | const vector< T > & | img, | |
const int | x | |||
) | const [inline, protected] |
Access with periodic boundary.
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.
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.
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.
T cvr::fixedGridInterpolation< T >::zeroAt | ( | const matrix< T > & | img, | |
const int | y, | |||
const int | x | |||
) | const [inline, protected] |
Access with zero boundary.
T cvr::fixedGridInterpolation< T >::zeroAt | ( | const vector< T > & | img, | |
const int | x | |||
) | const [inline, protected] |
Access with zero boundary.
const matrix<T>* cvr::fixedGridInterpolation< T >::theMatrix_ [protected] |
the matrix in use
const vector<T>* cvr::fixedGridInterpolation< T >::theVector_ [protected] |
the vector in use