Generic Image Library: virtual_2d_locator< DerefFn, IsTransposed > Class Template Reference

###  | #  |

Public Types | Public Member Functions | List of all members
virtual_2d_locator< DerefFn, IsTransposed > Class Template Reference
Pixel Locator » Models | PixelBased » Models

A 2D locator over a virtual image Upon dereferencing, invokes a given function object passing it its coordinates. Models: PixelLocatorConcept, HasDynamicXStepTypeConcept, HasDynamicYStepTypeConcept, HasTransposedTypeConcept. More...

`#include <virtual_locator.hpp>`

Inheritance diagram for virtual_2d_locator< DerefFn, IsTransposed >:

## Public Types
using | parent_t
using | const_t = virtual_2d_locator<typename DerefFn::const_t, IsTransposed>
using | deref_fn_t = DerefFn
using | point_t = typename parent_t::point_t
using | coord_t = typename parent_t::coord_t
using | x_coord_t = typename parent_t::x_coord_t
using | y_coord_t = typename parent_t::y_coord_t
using | x_iterator = typename parent_t::x_iterator
using | y_iterator = typename parent_t::y_iterator
Public Types inherited from pixel_2d_locator_base< virtual_2d_locator< DerefFn, IsTransposed >, position_iterator< DerefFn, IsTransposed >, position_iterator< DerefFn, 1-IsTransposed > >
using | x_iterator
using | y_iterator
using | value_type
using | reference
using | coord_t
using | difference_type
using | point_t
using | x_coord_t
using | y_coord_t
using | cached_location_t

## Public Member Functions
| virtual_2d_locator (point_t const &p={0, 0}, point_t const &step={1, 1}, deref_fn_t const &deref_fn=deref_fn_t())
template<typename D , bool TR>
| virtual_2d_locator (virtual_2d_locator< D, TR > const &loc, coord_t y_step)
template<typename D , bool TR>
| virtual_2d_locator (virtual_2d_locator< D, TR > const &loc, coord_t x_step, coord_t y_step, bool transpose=false)
template<typename D , bool TR>
| virtual_2d_locator (virtual_2d_locator< D, TR > const &other)
| virtual_2d_locator (virtual_2d_locator const &other)
virtual_2d_locator & | operator= (virtual_2d_locator const &other)=default
bool | operator== (const this_t &p) const
auto | x () -> x_iterator &
auto | x () const -> x_iterator const &
auto | y () -> y_iterator &
auto | y () const -> y_iterator const &
auto | y_distance_to (this_t const &it2, x_coord_t) const -> y_coord_t
| Returns the y distance between two x_iterators given the difference of their x positions.
bool | is_1d_traversable (x_coord_t) const
auto | pos () const -> point_t const &
auto | step () const -> point_t const &
auto | deref_fn () const -> deref_fn_t const &
Public Member Functions inherited from pixel_2d_locator_base< virtual_2d_locator< DerefFn, IsTransposed >, position_iterator< DerefFn, IsTransposed >, position_iterator< DerefFn, 1-IsTransposed > >
bool | operator!= (const virtual_2d_locator< DerefFn, IsTransposed > &p) const
x_iterator | x_at (x_coord_t dx, y_coord_t dy) const
x_iterator | x_at (const difference_type &d) const
y_iterator | y_at (x_coord_t dx, y_coord_t dy) const
y_iterator | y_at (const difference_type &d) const
virtual_2d_locator< DerefFn, IsTransposed > | xy_at (x_coord_t dx, y_coord_t dy) const
virtual_2d_locator< DerefFn, IsTransposed > | xy_at (const difference_type &d) const
axis< D >::iterator & | axis_iterator ()
axis< D >::iterator const & | axis_iterator () const
axis< D >::iterator | axis_iterator (point_t const &p) const
reference | operator() (x_coord_t dx, y_coord_t dy) const
reference | operator[] (const difference_type &d) const
reference | operator* () const
virtual_2d_locator< DerefFn, IsTransposed > & | operator+= (const difference_type &d)
virtual_2d_locator< DerefFn, IsTransposed > & | operator-= (const difference_type &d)
virtual_2d_locator< DerefFn, IsTransposed > | operator+ (const difference_type &d) const
virtual_2d_locator< DerefFn, IsTransposed > | operator- (const difference_type &d) const
cached_location_t | cache_location (const difference_type &d) const
cached_location_t | cache_location (x_coord_t dx, y_coord_t dy) const

## Additional Inherited Members
Static Public Attributes inherited from pixel_2d_locator_base< virtual_2d_locator< DerefFn, IsTransposed >, position_iterator< DerefFn, IsTransposed >, position_iterator< DerefFn, 1-IsTransposed > >
static const std::size_t | num_dimensions

## Detailed Description

template<typename DerefFn, bool IsTransposed>
class boost::gil::virtual_2d_locator< DerefFn, IsTransposed >

A 2D locator over a virtual image Upon dereferencing, invokes a given function object passing it its coordinates. Models: PixelLocatorConcept, HasDynamicXStepTypeConcept, HasDynamicYStepTypeConcept, HasTransposedTypeConcept.

Template Parameters

  DerefFn | Function object that given a point returns a reference. Models PixelDereferenceAdaptorConcept.
  IsTransposed | Indicates if locator should navigate in transposed mode.

## Member Typedef Documentation

## ◆ parent_t

template<typename DerefFn , bool IsTransposed>

using parent_t

Initial value:
pixel_2d_locator_base
<
virtual_2d_locator<DerefFn, IsTransposed>,
position_iterator<DerefFn, IsTransposed>,
position_iterator<DerefFn, 1-IsTransposed>
>

## Member Function Documentation

## ◆ is_1d_traversable()

template<typename DerefFn , bool IsTransposed>

bool is_1d_traversable | ( | x_coord_t |  | ) | const
| inline

Todo
  TODO: is there no gap at the end of each row? i.e. can we use x_iterator to visit every pixel instead of nested loops?

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

- virtual_locator.hpp