20 #ifndef MIRTK_ImageIterator_H 21 #define MIRTK_ImageIterator_H 23 #include "mirtk/Voxel.h" 24 #include "mirtk/BaseImage.h" 25 #include "mirtk/ConstImageIterator.h" 68 template <
class VoxelType>
78 template <
class VoxelType>
84 template <
class VoxelType>
94 template <
class VoxelType>
100 template <
class VoxelType>
101 VoxelType &
Value()
const;
110 template <
class VoxelType>
111 VoxelType &
Value(
int t)
const;
175 template <
class VoxelType>
178 return reinterpret_cast<VoxelType *
>(
const_cast<char *
>(
_Next));
182 template <
class VoxelType>
185 return reinterpret_cast<VoxelType *
>(
const_cast<char *
>(
_Next) + t *
_XYZ);
189 template <
class VoxelType>
192 VoxelType *current =
reinterpret_cast<VoxelType *
>(
const_cast<char *
>(
_Next));
198 template <
class VoxelType>
201 VoxelType *current =
reinterpret_cast<VoxelType *
>(
const_cast<char *
>(
_Next) + t *
_XYZ);
207 template <
class VoxelType>
210 return *
reinterpret_cast<VoxelType *
>(
const_cast<char *
>(
_Next));
214 template <
class VoxelType>
217 return *
reinterpret_cast<VoxelType *
>(
const_cast<char *
>(
_Next) + t *
_XYZ);
223 #endif // MIRTK_ImageIterator_H
VoxelType & Value() const
int _XYZ
Number of voxels per frame of the image.
ImageIterator & operator=(const ImageIterator &)
Assignment operator.
const char * _Next
Pointer to next image voxel.
ImageIterator(const ImageAttributes &, int)
Constructor.
VoxelType * Current() const
virtual ~ImageIterator()
Destructor.
void operator++()
Pre-increment operator.
ConstImageIterator & operator=(const ConstImageIterator &)
Assignment operator.