27 #ifndef SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_DOWN_LINK_HH
28 # define SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_DOWN_LINK_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/concept/neighborhood.hh>
37 # include <mln/accu/center.hh>
39 # include <mln/labeling/compute.hh>
41 # include <mln/math/abs.hh>
43 # include <mln/util/array.hh>
46 # include <scribo/core/macros.hh>
47 # include <scribo/core/object_links.hh>
49 # include <scribo/primitive/link/internal/find_link.hh>
50 # include <scribo/primitive/link/internal/link_single_dmax_base.hh>
52 # include <scribo/primitive/link/compute.hh>
77 unsigned neighb_max_distance,
87 unsigned neighb_max_distance);
98 # ifndef MLN_INCLUDE_ONLY
106 template <
typename L>
107 class single_down_functor
108 :
public internal::link_single_dmax_base<L, single_down_functor<L> >
111 internal::link_single_dmax_base<L, single_down_functor<L> > sdowner_;
114 typedef mln_site(L) P;
116 single_down_functor(const component_set<L>& comps,
unsigned dmax)
117 : sdowner_(comps, dmax, anchor::Vertical)
121 void compute_next_site_(P& p)
134 template <
typename L>
138 unsigned neighb_max_distance,
141 mln_trace(
"scribo::primitive::link::with_single_down_link");
143 internal::single_down_functor<L>
144 functor(comps, neighb_max_distance);
146 object_links<L> output =
compute(functor, anchor);
152 template <
typename L>
156 unsigned neighb_max_distance)
163 template <
typename L>
172 # endif // ! MLN_INCLUDE_ONLY
180 #endif // ! SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_DOWN_LINK_HH