26 #include <mln/core/image/image2d.hh>
27 #include <mln/canvas/browsing/diagonal2d.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
36 typedef mln_site(I) S;
37 enum { dim = S::dim };
39 typedef assign_browsing_functor<I, F>
self;
41 typedef
void (assign_browsing_functor<I,F>::*move_fun)();
46 assign_browsing_functor(I& input, F f = F())
54 void init() { std::cout <<
"init" << std::endl; }
55 void final() { std::cout <<
"final" << std::endl; }
61 void next() { std::cout <<
"next : " <<
p << std::endl; next_(); }
62 void init_diag() { std::cout <<
"init_diag: " <<
p << std::endl; }
68 template <
typename I,
typename F,
typename B>
70 const Function_v2v<F>& f_,
71 const Browsing<B>& browse_)
74 const F& f =
exact(f_);
75 const B& browse =
exact(browse_);
77 assign_browsing_functor<I, F> fun(ima, f);
89 std::cout << ima2.bbox() << std::endl;