24#ifndef _BAND_ITERATOR_
25#define _BAND_ITERATOR_
97 assert(targetCell <
size);
This class abstracts away iteration over the cells of a (multi-band) array.
Definition banditerator.hh:47
r_Band_Iterator(const char *_data, const r_Base_Type *_type, r_Bytes _size, unsigned int _band, r_Band_Linearization _bandLinearization)
virtual ~r_Band_Iterator()=default
destructor
const char * data
array data
Definition banditerator.hh:115
const char * currCell
current cell in the array to be returned by dereferencing the iterator
Definition banditerator.hh:118
const r_Base_Type * type
array cell type
Definition banditerator.hh:124
void advance()
Move to the next band cell.
Definition banditerator.hh:69
r_Bytes size
array size in number of cells
Definition banditerator.hh:127
void advance(r_Bytes cellCount)
Move by cellCount cells in the band.
Definition banditerator.hh:77
const char * dataEnd
end of data = data + (size * cellSize)
Definition banditerator.hh:121
unsigned int band
the band to be iterated
Definition banditerator.hh:133
const char * get()
Definition banditerator.hh:86
unsigned int cellSize
full cell size in bytes
Definition banditerator.hh:139
void reset()
Definition banditerator.hh:101
r_Bytes bandOffset
offset in bytes to the first cell in data of the iterated band
Definition banditerator.hh:130
void copyBand(char *__restrict__ dst)
Copy the band data to the given dst pointer; dst must not be null, and must be sufficiently large (us...
bool done() const
Definition banditerator.hh:62
r_Band_Linearization bandLinearization
band linearization (pixel/channel)
Definition banditerator.hh:142
r_Bytes getBandSize() const
Return the size of band data in bytes.
const char * get(r_Bytes targetCell)
Definition banditerator.hh:95
unsigned int cellBandSize
size of the band component of one cell in bytes
Definition banditerator.hh:136
This class is the superclass of the types r_Structure_Type and r_Primitive_Type in the representation...
Definition basetype.hh:40
r_Band_Linearization
Indicate how multiband data is linearized in 1D space.
Definition mddtypes.hh:398
@ PixelInterleaved
The components of each pixel are layed out one after another, e.g.
size_t r_Bytes
number of bytes in an tile or mdd or type.
Definition mddtypes.hh:43