General purpose Nearest-Neighbor interpolator.
More...
#include <accessors.h>
Inherits npl::NDConstView< T >.
|
| NNInterpNDView (std::shared_ptr< const NDArray > in, BoundaryConditionT bound=ZEROFLUX) |
|
| NNInterpNDView () |
|
T | operator() (double x=0, double y=0, double z=0, double t=0, double u=0, double v=0, double w=0, double q=0) |
| Gets value at array index and then casts to T. More...
|
|
T | operator() (const std::vector< float > &index) |
| Gets value at array index and then casts to T. More...
|
|
T | get (const std::vector< int64_t > &index) |
| Gets value at array index and then casts to T. More...
|
|
T | get (size_t len, int64_t *index) |
| Gets value at array index and then casts to T. More...
|
|
T | operator[] (const std::vector< int64_t > &index) |
| Gets value at array index and then casts to T. More...
|
|
T | operator() (const std::vector< double > &index) |
| Gets value at array index and then casts to T. More...
|
|
T | operator() (std::initializer_list< double > index) |
| Gets value at array index and then casts to T. More...
|
|
T | operator() (std::initializer_list< float > index) |
| Gets value at array index and then casts to T. More...
|
|
T | get (size_t len, const double *incindex) |
| Gets value at array index and then casts to T. More...
|
|
T | get (const vector< double > &cindex) |
| Gets value at array index and then casts to T. More...
|
|
void | setArray (ptr< const NDArray > in) |
|
int64_t | tlen () |
|
|
template<typename U > |
static T | castgetStatic (void *ptr) |
| This is a wrapper function that will be called to safely cast from the underlying type. More...
|
|
|
std::shared_ptr< const NDArray > | parent |
| Where to get the dat a from. Also the shared_ptr prevents dealloc. More...
|
|
T(* | castget )(void *ptr) |
| Function pointer to the correct function for casting from the underlying type. More...
|
|
template<typename T>
class npl::NNInterpNDView< T >
General purpose Nearest-Neighbor interpolator.
- Template Parameters
-
T | Type of value to cast and return |
Definition at line 1275 of file accessors.h.
template<typename T>
template<typename U >
|
inlinestaticprotectedinherited |
This is a wrapper function that will be called to safely cast from the underlying type.
- Template Parameters
-
U | Underlying type of pixel, figured out in the constructor |
- Parameters
-
ptr | Pointer to memory where the pixel is. |
- Returns
- Correctly cast value
Definition at line 467 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
- Returns
- value
Definition at line 1331 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
len | length of index array |
index | n-d index to access |
- Returns
- value
Definition at line 1349 of file accessors.h.
Gets value at array index and then casts to T.
- Returns
- value
Definition at line 1426 of file accessors.h.
Gets value at array index and then casts to T.
- Returns
- value
Definition at line 1483 of file accessors.h.
template<typename T>
T npl::NNInterpNDView< T >::operator() |
( |
double |
x = 0 , |
|
|
double |
y = 0 , |
|
|
double |
z = 0 , |
|
|
double |
t = 0 , |
|
|
double |
u = 0 , |
|
|
double |
v = 0 , |
|
|
double |
w = 0 , |
|
|
double |
q = 0 |
|
) |
| |
|
inline |
Gets value at array index and then casts to T.
- Parameters
-
x | x-dimension |
y | y-dimension |
z | z-dimension |
t | 4th dimension |
u | 5th dimension |
v | 6th dimension |
w | 7th dimension |
q | 8th dimension |
- Returns
- value Interpolated value at given position
Definition at line 1299 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
index | Position in ND-space to interpolate |
- Returns
- value Interpolated value at given position
Definition at line 1314 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
index | Position in ND-space to interpolate |
- Returns
- value Interpolated value at given position
Definition at line 1382 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
index | Position in ND-space to interpolate |
- Returns
- value Interpolated value at given position
Definition at line 1394 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
index | Position in ND-space to interpolate |
- Returns
- value Interpolated value at given position
Definition at line 1411 of file accessors.h.
Gets value at array index and then casts to T.
- Parameters
-
- Returns
- value
Definition at line 1365 of file accessors.h.
Function pointer to the correct function for casting from the underlying type.
- Parameters
-
ptr | location in memory where the pixel is stored |
Definition at line 483 of file accessors.h.
if true, then this assumes the inputs are RAS coordinates rather than indexes. Default is false
Definition at line 1494 of file accessors.h.
Where to get the dat a from. Also the shared_ptr prevents dealloc.
Definition at line 470 of file accessors.h.
The documentation for this class was generated from the following file: