Jet
v1.3.3
|
2-D nearest array sampler class. More...
#include <jet/array_samplers2.h>
Public Member Functions | |
NearestArraySampler (const ConstArrayAccessor2< T > &accessor, const Vector2< R > &gridSpacing, const Vector2< R > &gridOrigin) | |
Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element. More... | |
NearestArraySampler (const NearestArraySampler &other) | |
Copy constructor. More... | |
T | operator() (const Vector2< R > &pt) const |
Returns sampled value at point pt . More... | |
void | getCoordinate (const Vector2< R > &pt, Point2UI *index) const |
Returns the nearest array index for point x . More... | |
std::function< T(const Vector2< R > &)> | functor () const |
Returns a funtion object that wraps this instance. More... | |
2-D nearest array sampler class.
This class provides nearest sampling interface for a given 2-D array.
T | - The value type to sample. |
R | - The real number type. |
|
explicit |
Constructs a sampler using array accessor, spacing between the elements, and the position of the first array element.
[in] | accessor | The array accessor. |
[in] | gridSpacing | The grid spacing. |
[in] | gridOrigin | The grid origin. |
jet::NearestArraySampler< T, R, 2 >::NearestArraySampler | ( | const NearestArraySampler< T, R, 2 > & | other | ) |
Copy constructor.
std::function<T(const Vector2<R>&)> jet::NearestArraySampler< T, R, 2 >::functor | ( | ) | const |
Returns a funtion object that wraps this instance.
void jet::NearestArraySampler< T, R, 2 >::getCoordinate | ( | const Vector2< R > & | pt, |
Point2UI * | index | ||
) | const |
Returns the nearest array index for point x
.
T jet::NearestArraySampler< T, R, 2 >::operator() | ( | const Vector2< R > & | pt | ) | const |
Returns sampled value at point pt
.