last update 20 Sep 2009 |
#include <cvrNearestNeighborInterpolation.h>
Public Member Functions | |
nearestNeighborInterpolation () | |
nearestNeighborInterpolation (const eBoundaryType boundaryType) | |
nearestNeighborInterpolation (const nearestNeighborInterpolation< T > &other) | |
virtual | ~nearestNeighborInterpolation () |
int | getRangeOfInfluence () const |
virtual const std::string & | name () const |
T | apply (const vector< T > &src, const float &x) const |
T | apply (const float &x) const |
T | apply (const matrix< T > &src, const float &row, const float &col) const |
T | apply (const matrix< T > &src, const point< float > &p) const |
T | apply (const float &row, const float &col) const |
T | apply (const point< float > &p) const |
T | interpolate (const matrix< T > &src, const float row, const float col) const |
T | interpolateUnchk (const matrix< T > &src, const float row, const float col) const |
nearestNeighborInterpolation & | copy (const nearestNeighborInterpolation &other) |
virtual nearestNeighborInterpolation < T > * | clone () const |
virtual nearestNeighborInterpolation < T > * | newInstance () const |
const parameters & | getParameters () const |
The type T of the template is the type of the elements of the vector or matrix used.
cvr::nearestNeighborInterpolation< T >::nearestNeighborInterpolation | ( | ) |
default constructor
cvr::nearestNeighborInterpolation< T >::nearestNeighborInterpolation | ( | const eBoundaryType | boundaryType | ) |
Construct an interpolator with the given boundary type.
cvr::nearestNeighborInterpolation< T >::nearestNeighborInterpolation | ( | const nearestNeighborInterpolation< T > & | other | ) |
virtual cvr::nearestNeighborInterpolation< T >::~nearestNeighborInterpolation | ( | ) | [virtual] |
destructor
T cvr::nearestNeighborInterpolation< T >::apply | ( | const point< float > & | p | ) | const [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. |
Implements cvr::fixedGridInterpolation< T >.
T cvr::nearestNeighborInterpolation< T >::apply | ( | const float & | row, | |
const float & | col | |||
) | const [virtual] |
Returns the interpolated value of the matrix specified with use() at the real valued position (row,col).
row | which row | |
col | which column |
Implements cvr::fixedGridInterpolation< T >.
T cvr::nearestNeighborInterpolation< T >::apply | ( | const matrix< T > & | src, | |
const point< float > & | p | |||
) | const [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. |
Implements cvr::fixedGridInterpolation< T >.
T cvr::nearestNeighborInterpolation< T >::apply | ( | const matrix< T > & | src, | |
const float & | row, | |||
const float & | col | |||
) | const [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 |
Implements cvr::fixedGridInterpolation< T >.
T cvr::nearestNeighborInterpolation< T >::apply | ( | const float & | x | ) | const [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. |
Implements cvr::fixedGridInterpolation< T >.
T cvr::nearestNeighborInterpolation< T >::apply | ( | const vector< T > & | src, | |
const float & | x | |||
) | const [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. |
Implements cvr::fixedGridInterpolation< T >.
virtual nearestNeighborInterpolation<T>* cvr::nearestNeighborInterpolation< T >::clone | ( | ) | const [virtual] |
nearestNeighborInterpolation& cvr::nearestNeighborInterpolation< T >::copy | ( | const nearestNeighborInterpolation< T > & | other | ) |
const parameters& cvr::nearestNeighborInterpolation< T >::getParameters | ( | ) | const |
int cvr::nearestNeighborInterpolation< T >::getRangeOfInfluence | ( | ) | const [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 and the interpolated position is all pixels with coordinates in may be considered by the interpolation functor.
Implements cvr::fixedGridInterpolation< T >.
T cvr::nearestNeighborInterpolation< 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
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
T cvr::nearestNeighborInterpolation< T >::interpolateUnchk | ( | 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 does not check if the given coordinates and the rest of used points in the src matrix lie within the valid range. This is left to you.
This method is not virtual and can be used in time critical situations, where you prefer to take the boundary control by yourself.
src | matrix<T> with the source data. | |
row | which row | |
col | which column |
virtual const std::string& cvr::nearestNeighborInterpolation< T >::name | ( | ) | const [virtual] |
returns the name of this type ("nearestNeighborInterpolation")
Reimplemented from cvr::fixedGridInterpolation< T >.
virtual nearestNeighborInterpolation<T>* cvr::nearestNeighborInterpolation< T >::newInstance | ( | ) | const [virtual] |