27 #ifndef SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_RIGHT_LINK_HH
28 # define SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_RIGHT_LINK_HH
35 # include <mln/core/concept/image.hh>
36 # include <mln/core/concept/neighborhood.hh>
38 # include <mln/accu/center.hh>
39 # include <mln/labeling/compute.hh>
40 # include <mln/math/abs.hh>
41 # include <mln/util/array.hh>
43 # include <scribo/core/macros.hh>
44 # include <scribo/core/tag/anchor.hh>
45 # include <scribo/core/component_set.hh>
46 # include <scribo/core/object_links.hh>
48 # include <scribo/primitive/link/internal/find_link.hh>
49 # include <scribo/primitive/link/internal/link_single_dmax_base.hh>
51 # include <scribo/primitive/link/compute.hh>
78 unsigned neighb_max_distance,
79 anchor::Type anchor = anchor::MassCenter);
92 # ifndef MLN_INCLUDE_ONLY
100 template <
typename L>
101 class single_right_functor
102 :
public internal::link_single_dmax_base<L, single_right_functor<L> >
105 internal::link_single_dmax_base<L, single_right_functor<L> > super_;
108 typedef mln_site(L) P;
110 single_right_functor(const component_set<L>&
components,
unsigned dmax)
111 : super_(components, dmax, anchor::Horizontal)
115 void compute_next_site_(P& p)
128 template <
typename L>
132 unsigned neighb_max_distance,
135 mln_trace(
"scribo::primitive::link::with_single_right_link");
137 mln_precondition(components.is_valid());
139 internal::single_right_functor<L>
140 functor(components, neighb_max_distance);
142 object_links<L> output =
compute(functor, anchor);
148 template <
typename L>
158 # endif // ! MLN_INCLUDE_ONLY
166 #endif // ! SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_RIGHT_LINK_HH