base class for models of PixelLocatorConceptPixel locator is similar to a pixel iterator, but allows for 2D navigation of pixels within an image view. More...
#include <locator.hpp>
Classes | |
| struct | axis |
Public Types | |
| typedef XIterator | x_iterator |
| typedef YIterator | y_iterator |
| typedef std::iterator_traits < x_iterator >::value_type | value_type |
| typedef std::iterator_traits < x_iterator >::reference | reference |
| typedef std::iterator_traits < x_iterator > ::difference_type | coord_t |
| typedef point2< coord_t > | difference_type |
| typedef difference_type | point_t |
| typedef point_t::template axis < 0 >::coord_t | x_coord_t |
| typedef point_t::template axis < 1 >::coord_t | y_coord_t |
| typedef difference_type | cached_location_t |
Static Public Attributes | |
| static const std::size_t | num_dimensions =2 |
Friends | |
| template<typename X > | |
| class | pixel_2d_locator |
base class for models of PixelLocatorConcept
Pixel locator is similar to a pixel iterator, but allows for 2D navigation of pixels within an image view.
It has a 2D difference_type and supports random access operations like:
In addition, each coordinate acts as a random-access iterator that can be modified separately: "++locator.x()" or "locator.y()+=10" thereby moving the locator horizontally or vertically.
It is called a locator because it doesn't implement the complete interface of a random access iterator. For example, increment and decrement operations don't make sense (no way to specify dimension). Also 2D difference between two locators cannot be computed without knowledge of the X position within the image.
This base class provides most of the methods and typedefs needed to create a model of a locator. GIL provides two locator models as subclasses of pixel_2d_locator_base. A memory-based locator, memory_based_2d_locator and a virtual locator, virtual_2d_locator. The minimum functionality a subclass must provide is this:
Models may choose to override some of the functions in the base class with more efficient versions.
| typedef difference_type boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::cached_location_t |
| typedef std::iterator_traits<x_iterator>::difference_type boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::coord_t |
| typedef point2<coord_t> boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::difference_type |
| typedef difference_type boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::point_t |
| typedef std::iterator_traits<x_iterator>::reference boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::reference |
| typedef std::iterator_traits<x_iterator>::value_type boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::value_type |
| typedef point_t::template axis<0>::coord_t boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::x_coord_t |
| typedef XIterator boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::x_iterator |
| typedef point_t::template axis<1>::coord_t boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::y_coord_t |
| typedef YIterator boost::gil::pixel_2d_locator_base< Loc, XIterator, YIterator >::y_iterator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Referenced by boost::gil::pixel_2d_locator_base< memory_based_2d_locator< StepIterator >, iterator_adaptor_get_base< StepIterator >::type, StepIterator >::operator()(), and boost::gil::pixel_2d_locator_base< memory_based_2d_locator< StepIterator >, iterator_adaptor_get_base< StepIterator >::type, StepIterator >::operator[]().
|
inline |
|
inline |
Referenced by boost::gil::pixel_2d_locator_base< memory_based_2d_locator< StepIterator >, iterator_adaptor_get_base< StepIterator >::type, StepIterator >::operator+(), and boost::gil::pixel_2d_locator_base< memory_based_2d_locator< StepIterator >, iterator_adaptor_get_base< StepIterator >::type, StepIterator >::operator-().
|
inline |
|
inline |
|
inline |
|
friend |
|
static |