144 return index_ / width_;
151 return index_ % width_;
base class for iterators on 2-dimensional maps like images/organized clouds etc.
OrganizedIndexIterator(unsigned width)
constructor
virtual bool isValid() const =0
return whether the current visited pixel/point is valid or not.
virtual void reset()=0
resets the iterator to the beginning of the line
virtual unsigned getColumnIndex() const
returns the col index (x-coordinate) of the current pixel/point
virtual unsigned getRowIndex() const
returns the row index (y-coordinate) of the current pixel/point
unsigned width_
the width of the image/cloud
virtual void operator++()=0
go to next pixel/point in image/cloud
unsigned operator*() const
returns the pixel/point index in the linearized memory of the image/cloud
unsigned index_
the index of the current pixel/point
virtual ~OrganizedIndexIterator()
virtual destructor
virtual unsigned getIndex() const
returns the pixel/point index in the linearized memory of the image/cloud