26 #include <mln/core/image/image2d.hh>
27 #include <mln/canvas/browsing/snake_vert.hh>
28 #include <mln/fun/p2v/iota.hh>
29 #include <mln/debug/println.hh>
32 unsigned res[2][7] = { { 1, 4, 5, 8, 9, 12, 13 },
33 { 2, 3, 6, 7, 10, 11, 14 } };
36 template <
typename I,
typename F>
37 struct assign_browsing_functor
39 typedef mln_site(I) S;
40 enum { dim = S::dim };
45 assign_browsing_functor(I& input, F f = F())
57 mln_assertion(input(p) == res[
p.row()][
p.col()]);
67 template <
typename I,
typename F,
typename B>
69 const Function_v2v<F>& f_,
70 const Browsing<B>& browse_)
73 const F& f =
exact(f_);
74 const B& browse =
exact(browse_);
76 assign_browsing_functor<I, F> fun(ima, f);