26 #ifndef SCRIBO_PRIMITIVE_LINK_WITH_SEVERAL_RIGHT_LINKS_OVERLAP_HH
27 # define SCRIBO_PRIMITIVE_LINK_WITH_SEVERAL_RIGHT_LINKS_OVERLAP_HH
33 # include <mln/core/concept/image.hh>
34 # include <mln/core/concept/neighborhood.hh>
36 # include <mln/util/array.hh>
38 # include <scribo/core/object_links.hh>
39 # include <scribo/core/object_image.hh>
40 # include <scribo/core/macros.hh>
41 # include <scribo/primitive/internal/init_link_array.hh>
42 # include <scribo/primitive/link/internal/find_several_links.hh>
43 # include <scribo/primitive/link/internal/link_several_dmax_base.hh>
44 # include <scribo/util/text.hh>
67 unsigned neighb_max_distance);
76 # ifndef MLN_INCLUDE_ONLY
82 class several_right_overlap_functor
83 :
public link_several_dmax_base<L, several_right_overlap_functor<L> >
86 link_several_dmax_base<L, several_right_overlap_functor<L> >
90 typedef mln_site(L) P;
92 several_right_overlap_functor(const object_image(L)& objects,
94 : super_(objects, dmax, 3)
99 start_point_(
unsigned current_object,
unsigned anchor)
101 return anchors_3(this->objects_, this->mass_centers_,
102 current_object, anchor);
106 void compute_next_site_(P& p)
116 template <
typename L>
120 unsigned neighb_max_distance)
122 mln_trace(
"scribo::primitive::link::with_several_right_links_overlap");
124 mln_precondition(objects.is_valid());
126 internal::several_right_overlap_functor<L>
127 functor(objects, neighb_max_distance);
129 for_all_ncomponents(current_object, objects.nlabels())
130 internal::find_several_links(functor, current_object);
132 return functor.links();
136 template <
typename L>
145 # endif // ! MLN_INCLUDE_ONLY
153 #endif // ! SCRIBO_PRIMITIVE_LINK_WITH_SEVERAL_RIGHT_LINKS_OVERLAP_HH