69 template <
typename Type>
84 int subRectY,
int subRectWidth,
int subRectHeight){
105 inline MatrixSubRectIterator(Type *ptData,
int matrixWidth,
int subRectX,
int subRectY,
int subRectWidth,
int subRectHeight):
122 return (*const_cast<MatrixSubRectIterator*>(
this)).
assign(other);
176 return ++(*const_cast<MatrixSubRectIterator*>(
this));
192 return (*const_cast<MatrixSubRectIterator*>(
this))++;
249 inline void incRow(
int numLines=1)
const {
const Type & operator *() const
retuns a reference of the current pixel value (const)
Definition: MatrixSubRectIterator.h:129
MatrixSubRectIterator()
Default Constructor.
Definition: MatrixSubRectIterator.h:93
undocument this line if you encounter any issues!
Definition: Any.h:37
int y()
returns the current y position of the iterator (wrt matrix origin)
Definition: MatrixSubRectIterator.h:262
int m_matrixWidth
corresponding matrix width
Definition: MatrixSubRectIterator.h:268
bool operator<=(const MatrixSubRectIterator< Type > &it) const
compare two iterators
Definition: MatrixSubRectIterator.h:224
bool operator<(const MatrixSubRectIterator< Type > &it) const
compare two iterators
Definition: MatrixSubRectIterator.h:216
const MatrixSubRectIterator operator++(int) const
const version of post increment operator
Definition: MatrixSubRectIterator.h:191
Type * m_dataCurr
pointer to the current data element
Definition: MatrixSubRectIterator.h:280
int m_subRectHeight
Definition: MatrixSubRectIterator.h:271
Type * m_dataOrigin
pointer to the upper matrix data origin (upper left element)
Definition: MatrixSubRectIterator.h:277
void init()
Definition: MatrixSubRectIterator.h:72
static const MatrixSubRectIterator< Type > create_end_iterator(const Type *dataOrigin, int matrixWidth, int subRectX, int subRectY, int subRectWidth, int subRectHeight)
Definition: MatrixSubRectIterator.h:83
Type * m_currLineEnd
pointer to the first invalid element of the current line
Definition: MatrixSubRectIterator.h:286
bool operator!=(const MatrixSubRectIterator< Type > &it) const
compare two iterators
Definition: MatrixSubRectIterator.h:208
const MatrixSubRectIterator & operator++() const
const version of pre increment operator
Definition: MatrixSubRectIterator.h:175
int m_subRectWidth
sub rect size of the iterator
Definition: MatrixSubRectIterator.h:271
Type * m_dataEnd
pointer to the first element behind the subrect
Definition: MatrixSubRectIterator.h:283
bool operator>(const MatrixSubRectIterator< Type > &it) const
compare two iterators
Definition: MatrixSubRectIterator.h:220
const MatrixSubRectIterator & operator=(const MatrixSubRectIterator &other) const
Definition: MatrixSubRectIterator.h:121
int x()
returns the current x position of the iterator (wrt matrix origin);
Definition: MatrixSubRectIterator.h:256
Iterator class used to iterate through a sub rect of 2D data.
Definition: MatrixSubRectIterator.h:70
#define ICL_UNLIKELY(expr)
Definition: Macros.h:163
int getSubRectWidth() const
returns the length of each row processed by this iterator
Definition: MatrixSubRectIterator.h:236
MatrixSubRectIterator(Type *ptData, int matrixWidth, int subRectX, int subRectY, int subRectWidth, int subRectHeight)
Definition: MatrixSubRectIterator.h:105
void incRow(int numLines=1) const
move the pixel vertically forward
Definition: MatrixSubRectIterator.h:249
MatrixSubRectIterator & operator++()
moves to the next iterator position (Prefix ++it)
Definition: MatrixSubRectIterator.h:164
MatrixSubRectIterator & assign(const MatrixSubRectIterator &other)
Definition: MatrixSubRectIterator.h:109
int m_lineStep
result of m_matrixWidth - m_subRectWidth
Definition: MatrixSubRectIterator.h:274
bool inSubRect() const
to check if iterator is still inside the ROI
Definition: MatrixSubRectIterator.h:201
int getSubRectHeight() const
Definition: MatrixSubRectIterator.h:240
bool operator==(const MatrixSubRectIterator< Type > &it) const
compare two iterators
Definition: MatrixSubRectIterator.h:212
bool operator>=(const MatrixSubRectIterator< Type > &it) const
compare two iterators
Definition: MatrixSubRectIterator.h:228
MatrixSubRectIterator operator++(int)
Definition: MatrixSubRectIterator.h:184