27 #ifndef SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_LEFT_LINK_HH
28 # define SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_LEFT_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/component_set.hh>
48 # include <scribo/core/object_links.hh>
50 # include <scribo/primitive/link/internal/find_link.hh>
51 # include <scribo/primitive/link/internal/link_single_dmax_base.hh>
53 # include <scribo/primitive/link/compute.hh>
77 unsigned neighb_max_distance);
89 # ifndef MLN_INCLUDE_ONLY
98 class single_left_functor
99 :
public internal::link_single_dmax_base<L, single_left_functor<L> >
102 internal::link_single_dmax_base<L, single_left_functor<L> > super_;
105 typedef mln_site(L) P;
107 single_left_functor(const component_set<L>&
components,
unsigned dmax)
108 : super_(components, dmax, anchor::Horizontal)
112 void compute_next_site_(P& p)
125 template <
typename L>
129 unsigned neighb_max_distance)
131 mln_trace(
"scribo::primitive::link::with_single_left_link");
133 mln_precondition(components.is_valid());
135 internal::single_left_functor<L>
136 functor(components, neighb_max_distance);
138 object_links<L> output =
compute(functor);
144 template <
typename L>
153 # endif // ! MLN_INCLUDE_ONLY
161 #endif // ! SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_LEFT_LINK_HH