mp_traversals
Terrible Traversals
|
A base class for traversal algorithms on images. More...
#include <ImageTraversal.h>
Classes | |
class | Iterator |
A forward iterator through an ImageTraversal. More... | |
Public Member Functions | |
ImageTraversal (const PNG &png, const Point &start, double tolerance, TraversalFunctions fns) | |
Constructor for the given traversal. More... | |
Iterator | begin () |
Returns an iterator for the traversal starting at the first point (specified in the constructor). More... | |
Iterator | end () |
Returns an iterator for the traversal one past the end of the traversal. More... | |
A base class for traversal algorithms on images.
This class provides a traversal of the image by returning instances of ImageTraversal::Iterator.
Traversals::ImageTraversal::ImageTraversal | ( | const PNG & | png, |
const Point & | start, | ||
double | tolerance, | ||
TraversalFunctions | fns | ||
) |
Constructor for the given traversal.
Initializes a ImageTraversal on a given png
image, starting at start
, and with a given tolerance
.
png | The image this traversal is going to traverse |
start | The start point of this traversal |
tolerance | If the current point is too different (difference larger than tolerance) with the start point, it will not be included in this traversal |
fns | the set of functions describing a traversal's operation |
ImageTraversal::Iterator Traversals::ImageTraversal::begin | ( | ) |
Returns an iterator for the traversal starting at the first point (specified in the constructor).
Returns an iterator for the traversal starting at the first point.
ImageTraversal::Iterator Traversals::ImageTraversal::end | ( | ) |
Returns an iterator for the traversal one past the end of the traversal.