boost::gil::memory_based_2d_locator

Memory‐based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept

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

Types

Member Functions

Name

Description

memory_based_2d_locator [constructor]

Constructors

operator=

Copy assignment operator

operator==

Equality operator

x

y

x_at

xy_at

operator()

operator[]

Subscript operators

operator+=

operator‐=

cache_location

row_size

pixel_size

is_1d_traversable

y_distance_to

operator!=

Inequality operator

y_at

axis_iterator

operator*

operator+

operator‐

Static Data Members

Friends

Name

Description

boost::gil::memory_based_2d_locator

Memory‐based pixel locator. Models: PixelLocatorConcept,HasDynamicXStepTypeConcept,HasDynamicYStepTypeConcept,HasTransposedTypeConcept

Created with MrDocs