Abstract base class for iterating over the pixels in a region of an image. More...
#include <vgl_region_scan_iterator.h>

Public Member Functions | |
| virtual void | reset ()=0 |
| Resets the scan iterator to before the first scan line. More... | |
| virtual bool | next ()=0 |
| Tries to move to the next scan line. More... | |
| virtual int | scany () const =0 |
| y-coordinate of the current scan line. More... | |
| virtual int | startx () const =0 |
| Returns starting x-value of the current scan line. More... | |
| virtual int | endx () const =0 |
| Returns ending x-value of the current scan line. More... | |
| int | count () |
| Number of image points (= integer grid points) inside the region. More... | |
Protected Member Functions | |
| vgl_region_scan_iterator ()=default | |
| virtual | ~vgl_region_scan_iterator ()=default |
Abstract base class for iterating over the pixels in a region of an image.
The region should be "scanline-convex", i.e., every horizontal line should intersect the region in at most one connected part. Vertically, there may be even disconnected parts: e.g. (part of) a hyperbola with vertical axis. The region should of course be bounded, otherwise iteration makes no sense.
Definition at line 17 of file vgl_region_scan_iterator.h.
|
inlineprotecteddefault |
|
protectedvirtualdefault |
|
inline |
Number of image points (= integer grid points) inside the region.
Definition at line 48 of file vgl_region_scan_iterator.h.
|
pure virtual |
Returns ending x-value of the current scan line.
endx() should be larger than startx(), unless the scan line is empty
Implemented in vgl_polygon_scan_iterator< T >, vgl_window_scan_iterator< T >, vgl_ellipse_scan_iterator< T >, and vgl_triangle_scan_iterator< T >.
|
pure virtual |
Tries to move to the next scan line.
Returns false if there are no more scan lines.
Implemented in vgl_polygon_scan_iterator< T >, vgl_window_scan_iterator< T >, vgl_ellipse_scan_iterator< T >, and vgl_triangle_scan_iterator< T >.
|
pure virtual |
Resets the scan iterator to before the first scan line.
After calling this function, next() needs to be called before startx() and endx() form a valid scan line.
Implemented in vgl_polygon_scan_iterator< T >, vgl_window_scan_iterator< T >, vgl_ellipse_scan_iterator< T >, and vgl_triangle_scan_iterator< T >.
|
pure virtual |
y-coordinate of the current scan line.
The next scan line is not guaranteed to have scany()+1; use next() instead.
Implemented in vgl_polygon_scan_iterator< T >, vgl_window_scan_iterator< T >, vgl_ellipse_scan_iterator< T >, and vgl_triangle_scan_iterator< T >.
|
pure virtual |
Returns starting x-value of the current scan line.
startx() should be smaller than endx(), unless the scan line is empty
Implemented in vgl_polygon_scan_iterator< T >, vgl_window_scan_iterator< T >, vgl_ellipse_scan_iterator< T >, and vgl_triangle_scan_iterator< T >.
1.8.15