2 #ifndef vgl_region_scan_iterator_h_ 3 #define vgl_region_scan_iterator_h_ 27 virtual void reset() =0;
31 virtual bool next() =0;
35 virtual int scany()
const =0;
39 virtual int startx()
const =0;
43 virtual int endx()
const =0;
51 while (
next()) {
int n =
endx() -
startx() + 1;
if (n > 0) cnt += n; }
56 #endif // vgl_region_scan_iterator_h_ virtual int scany() const =0
y-coordinate of the current scan line.
virtual ~vgl_region_scan_iterator()=default
vgl_region_scan_iterator()=default
virtual void reset()=0
Resets the scan iterator to before the first scan line.
virtual bool next()=0
Tries to move to the next scan line.
virtual int endx() const =0
Returns ending x-value of the current scan line.
virtual int startx() const =0
Returns starting x-value of the current scan line.
int count()
Number of image points (= integer grid points) inside the region.
Abstract base class for iterating over the pixels in a region of an image.