mp_traversals
Terrible Traversals
Traversals::ImageTraversal Class Reference

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...
 

Detailed Description

A base class for traversal algorithms on images.

This class provides a traversal of the image by returning instances of ImageTraversal::Iterator.

Constructor & Destructor Documentation

◆ ImageTraversal()

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.

Parameters
pngThe image this traversal is going to traverse
startThe start point of this traversal
toleranceIf the current point is too different (difference larger than tolerance) with the start point, it will not be included in this traversal
fnsthe set of functions describing a traversal's operation
Todo:
[Part 1]

Member Function Documentation

◆ begin()

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.

Todo:
[Part 1]

◆ end()

ImageTraversal::Iterator Traversals::ImageTraversal::end ( )

Returns an iterator for the traversal one past the end of the traversal.

Todo:
[Part 1]

The documentation for this class was generated from the following files: