|
position_iterator.hpp
Go to the documentation of this file.
11 /*************************************************************************************************/
38 template <typename Deref, // A function object that given a point returns a pixel reference. Models PixelDereferenceAdaptorConcept
55 position_iterator(const point_t& p, const point_t& step, const Deref& d) : _p(p), _step(step), _d(d) {}
58 template <typename D> position_iterator(const position_iterator<D,Dim>& p) : _p(p._p), _step(p._step), _d(p._d) {}
59 position_iterator& operator=(const position_iterator& p) { _p=p._p; _d=p._d; _step=p._step; return *this; }
68 reference operator[](difference_type d) const { point_t p=_p; p[Dim]+=d*_step[Dim]; return _d(p); }
81 difference_type distance_to(const position_iterator& it) const { return (it._p[Dim]-_p[Dim])/_step[Dim]; }
91 struct iterator_is_mutable<position_iterator<Deref,Dim> > : public mpl::bool_<Deref::is_mutable> {
99 struct color_space_type<position_iterator<Deref,Dim> > : public color_space_type<typename Deref::value_type> {};
102 struct channel_mapping_type<position_iterator<Deref,Dim> > : public channel_mapping_type<typename Deref::value_type> {};
108 struct channel_type<position_iterator<Deref,Dim> > : public channel_type<typename Deref::value_type> {};
reference operator[](difference_type d) const Definition: position_iterator.hpp:68 pixel 2D locator An iterator that remembers its current X,Y position and invokes a function object with it upon derefe... Definition: position_iterator.hpp:40 BOOST_FORCEINLINE bool equal(boost::gil::iterator_from_2d< Loc1 > first, boost::gil::iterator_from_2d< Loc1 > last, boost::gil::iterator_from_2d< Loc2 > first2) std::equal(I1,I1,I2) with I1 and I2 being a iterator_from_2d Definition: algorithm.hpp:935 Generated on Mon Mar 26 2018 16:26:16 for Generic Image Library by
1.8.6
|