26 #include <mln/core/image/image2d.hh>
27 #include <mln/canvas/browsing/snake_fwd.hh>
28 #include <mln/fun/p2v/iota.hh>
29 #include <mln/debug/println.hh>
32 template <
typename I,
typename F>
33 struct assign_browsing_functor
35 typedef mln_site(I) S;
36 enum { dim = S::dim };
41 assign_browsing_functor(I& input, F f = F())
53 mln_assertion(input(p) - 1 == p[0] * input.domain().ncols()
54 + ( (
p[0] % 2) ? input.domain().ncols() - 1 -
p[1] :
p[1]));
57 void bkd() {
next(); }
64 template <
typename I,
typename F,
typename B>
66 const Function_v2v<F>& f_,
67 const Browsing<B>& browse_)
70 const F& f =
exact(f_);
71 const B& browse =
exact(browse_);
73 assign_browsing_functor<I, F> fun(ima, f);