The purpose of this class is to view an image as a 3D+vector dimension image rather than a 4+D image. Therefore all dimensions above the third are cast as a vector. If there is demand I may create a matrixx verion as well.
More...
#include <accessors.h>
Inherits npl::NDView< T >.
|
| Vector3DView (std::shared_ptr< NDArray > in) |
|
| Vector3DView () |
|
T | operator() (int64_t x=0, int64_t y=0, int64_t z=0, int64_t t=0) |
| Gets value at array index and then casts to T. More...
|
|
T | get (int64_t x=0, int64_t y=0, int64_t z=0, int64_t t=0) |
| Gets value at array index and then casts to T. More...
|
|
void | set (int64_t x, int64_t y, int64_t z, int64_t t, T v) |
| Gets value at array index and then casts to T. More...
|
|
void | setArray (ptr< 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...
|
|
template<typename U > |
static void | castsetStatic (void *ptr, const T &val) |
| This is a wrapper function that will be called to safely cast to the underlying type. More...
|
|
|
std::shared_ptr< 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...
|
|
void(* | castset )(void *ptr, const T &v) |
| Function pointer to the correct function for casting to the underlying type. This should be set during construction. More...
|
|
template<typename T>
class npl::Vector3DView< T >
The purpose of this class is to view an image as a 3D+vector dimension image rather than a 4+D image. Therefore all dimensions above the third are cast as a vector. If there is demand I may create a matrixx verion as well.
- Template Parameters
-
T | Type of value to cast and return |
Definition at line 697 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 272 of file accessors.h.
template<typename T >
template<typename U >
static void npl::NDView< T >::castsetStatic |
( |
void * |
ptr, |
|
|
const T & |
val |
|
) |
| |
|
inlinestaticprotectedinherited |
This is a wrapper function that will be called to safely cast to the underlying type.
- Template Parameters
-
U | Underlying type of pixel, figured out in the constructor |
- Parameters
-
ptr | Pointer to memory where the pixel is. |
val | new value to write |
Definition at line 287 of file accessors.h.
template<typename T >
T npl::Vector3DView< T >::get |
( |
int64_t |
x = 0 , |
|
|
int64_t |
y = 0 , |
|
|
int64_t |
z = 0 , |
|
|
int64_t |
t = 0 |
|
) |
| |
|
inline |
Gets value at array index and then casts to T.
- Returns
- value
Definition at line 722 of file accessors.h.
template<typename T >
T npl::Vector3DView< T >::operator() |
( |
int64_t |
x = 0 , |
|
|
int64_t |
y = 0 , |
|
|
int64_t |
z = 0 , |
|
|
int64_t |
t = 0 |
|
) |
| |
|
inline |
Gets value at array index and then casts to T.
- Returns
- value
Definition at line 709 of file accessors.h.
Gets value at array index and then casts to T.
- Returns
- value
Definition at line 735 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 303 of file accessors.h.
Function pointer to the correct function for casting to the underlying type. This should be set during construction.
- Parameters
-
ptr | pointer to memory |
v | value to cast and write |
Definition at line 313 of file accessors.h.
Where to get the dat a from. Also the shared_ptr prevents dealloc.
Definition at line 290 of file accessors.h.
The documentation for this class was generated from the following file: