27 #ifndef SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_RIGHT_LINK_DMAX_RATIO_ALIGNED_HH
28 # define SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_RIGHT_LINK_DMAX_RATIO_ALIGNED_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/component_set.hh>
45 # include <scribo/core/object_links.hh>
47 # include <scribo/primitive/link/internal/dmax_default.hh>
48 # include <scribo/primitive/link/internal/find_link.hh>
49 # include <scribo/primitive/link/internal/link_single_dmax_ratio_aligned_base.hh>
51 # include <scribo/primitive/link/compute.hh>
53 # include <scribo/filter/internal/component_aligned.hh>
92 float min_angle,
float max_angle,
103 float min_angle,
float max_angle);
109 template <
typename L>
117 # ifndef MLN_INCLUDE_ONLY
126 template <
typename L,
typename F>
127 class single_right_dmax_ratio_aligned_functor
128 :
public link_single_dmax_ratio_aligned_base<L, F, single_right_dmax_ratio_aligned_functor<L,F> >
130 typedef single_right_dmax_ratio_aligned_functor<L,F> self_t;
131 typedef link_single_dmax_ratio_aligned_base<L, F, self_t> super_;
134 typedef mln_site(L) P;
136 single_right_dmax_ratio_aligned_functor(
138 const DMax_Functor<F>& dmax_f,
142 : super_(components, dmax_f, min_angle,
147 void compute_next_site_(P& p)
161 template <
typename L,
typename F>
166 const DMax_Functor<F>& dmax_f,
167 float min_angle,
float max_angle,
170 mln_trace(
"scribo::primitive::link::with_single_right_link_dmax_ratio_aligned");
172 mln_precondition(components.is_valid());
174 internal::single_right_dmax_ratio_aligned_functor<L,F>
175 functor(components, dmax_f, min_angle, max_angle, anchor);
177 object_links<L> output =
compute(functor, anchor);
184 template <
typename L>
188 const component_set<L>& components,
190 float min_angle,
float max_angle)
194 internal::dmax_default(dmax_ratio),
201 template <
typename L>
205 const component_set<L>& components)
212 # endif // ! MLN_INCLUDE_ONLY
220 #endif // ! SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_RIGHT_LINK_DMAX_RATIO_ALIGNED_HH