26 #ifndef MLN_CORE_PIXTER2D_HH
27 # define MLN_CORE_PIXTER2D_HH
33 # include <mln/core/internal/pixel_iterator_base.hh>
34 # include <mln/core/alias/point2d.hh>
35 # include <mln/geom/size2d.hh>
36 # include <mln/opt/at.hh>
48 :
public internal::forward_pixel_iterator_base_< I, fwd_pixter2d<I> >
50 typedef internal::forward_pixel_iterator_base_< I, fwd_pixter2d<I> > super_;
75 mln_qlf_value(I)* eor_;
88 :
public internal::backward_pixel_iterator_base_< I, bkd_pixter2d<I> >
90 typedef internal::backward_pixel_iterator_base_< I, bkd_pixter2d<I> > super_;
112 unsigned row_offset_;
115 mln_qlf_value(I)* bor_;
117 using super_::image_;
122 #ifndef MLN_INCLUDE_ONLY
128 template <
typename I>
132 border_x2_(2 * image.border()),
133 row_offset_(image.bbox().ncols() + border_x2_)
135 mln_precondition(image.is_valid());
136 mln_precondition(image_.is_valid());
137 mln_precondition(image_.buffer() == image.buffer());
140 template <
typename I>
146 if (this->value_ptr_ == eor_ && this->value_ptr_ != this->eoi_)
148 this->value_ptr_ += border_x2_;
153 template <
typename I>
156 fwd_pixter2d<I>::start_()
158 mln_precondition(image_.is_valid());
167 template <
typename I>
171 border_x2_(2 * image.border()),
172 row_offset_(image.bbox().ncols() + border_x2_)
174 mln_precondition(image.is_valid());
177 template <
typename I>
183 if (this->value_ptr_ == bor_ && this->value_ptr_ != this->boi_)
185 this->value_ptr_ -= border_x2_;
190 template <
typename I>
193 bkd_pixter2d<I>::start_()
198 #endif // ! MLN_INCLUDE_ONLY
202 #endif // ! MLN_CORE_PIXTER2D_HH