33 size_t ix,
size_t iy,
size_t iz,
size_t nx,
size_t ny) {
35 return pointer + iz * nx * ny + iy * nx + ix;
49 size_t ix,
size_t iy,
size_t iz,
size_t nx,
size_t ny) {
51 return pointer + iz * nx * ny + iy * nx + ix;
65 inline const T&
dataAt(
const T* pointer,
size_t ix,
size_t iy,
size_t iz,
68 return *
dataAtRawConst((
const char*)pointer, ix *
sizeof(T), iy *
sizeof(T),
84 inline T&
dataAt(T* pointer,
size_t ix,
size_t iy,
size_t iz,
size_t nx,
86 return *
dataAtRaw((
char*)pointer, ix *
sizeof(T), iy *
sizeof(T),
102 return z * nx * ny + y * nx + x;
const char * dataAtRawConst(const char *pointer, size_t ix, size_t iy, size_t iz, size_t nx, size_t ny)
dataAtRaw gets the data at the given indexes
Definition: index.hpp:32
size_t nx
Definition: VolumeFactory.cpp:87
char * dataAtRaw(char *pointer, size_t ix, size_t iy, size_t iz, size_t nx, size_t ny)
dataAtRaw gets the data at the given indexes
Definition: index.hpp:48
size_t calculateIndex(size_t x, size_t y, size_t z, size_t nx, size_t ny)
calculateIndex calculates the index for the given coordinates
Definition: index.hpp:100
size_t ny
Definition: VolumeFactory.cpp:88
const T & dataAt(const T *pointer, size_t ix, size_t iy, size_t iz, size_t nx, size_t ny)
dataAt gets the data at the given address
Definition: index.hpp:65