boost::gil::memory_based_2d_locator
Memory‐based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept
Synopsis
Declared in <boost/gil/locator.hpp>
template<typename I>
class memory_based_2d_locator
: public pixel_2d_locator_base<memory_based_2d_locator<StepIterator>, iterator_adaptor_get_base<StepIterator>::type, StepIterator>
Description
The class takes a step iterator as a parameter. The step iterator provides navigation along the vertical axis while its base iterator provides horizontal navigation.
Each instantiation is optimal in terms of size and efficiency. For example, xy locator over interleaved rgb image results in a step iterator consisting of one std::ptrdiff_t for the row size and one native pointer (8 bytes total). ++locator.x() resolves to pointer increment. At the other extreme, a 2D navigation of the even pixels of a planar CMYK image results in a step iterator consisting of one std::ptrdiff_t for the doubled row size, and one step iterator consisting of one std::ptrdiff_t for the horizontal step of two and a CMYK planar_pixel_iterator consisting of 4 pointers (24 bytes). In this case ++locator.x() results in four native pointer additions.
Note also that memory_based_2d_locator does not require that its element type be a pixel. It could be instantiated with an iterator whose value_type models only Regular. In this case the locator models the weaker RandomAccess2DLocatorConcept, and does not model PixelBasedConcept. Many generic algorithms don't require the elements to be pixels./////////////////////////////////////////////////////////////////////////////////////
Member Functions
Name |
Description |
|
Constructors |
Copy assignment operator |
|
Subscript operators |
|
Equality operator |
|
Inequality operator |
Friends
Name |
Description |
|
Memory‐based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept |
Created with MrDocs