27 #ifndef SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_LEFT_LINK_DMAX_RATIO_ALIGNED_HH
28 # define SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_LEFT_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>
86 template <
typename L,
typename F>
91 const DMax_Functor<F>& dmax_f,
92 float min_angle,
float max_angle,
105 float min_angle,
float max_angle);
112 template <
typename L>
120 # ifndef MLN_INCLUDE_ONLY
129 template <
typename L,
typename F>
130 class single_left_dmax_ratio_aligned_functor
131 :
public link_single_dmax_ratio_aligned_base<L, F, single_left_dmax_ratio_aligned_functor<L,F> >
133 typedef single_left_dmax_ratio_aligned_functor<L,F> self_t;
134 typedef link_single_dmax_ratio_aligned_base<L, F, self_t> super_;
137 typedef mln_site(L) P;
139 single_left_dmax_ratio_aligned_functor(
141 const DMax_Functor<F>& dmax_f,
145 : super_(components, dmax_f, min_angle,
150 void compute_next_site_(P& p)
164 template <
typename L,
typename F>
169 const DMax_Functor<F>& dmax_f,
170 float min_angle,
float max_angle,
173 mln_trace(
"scribo::primitive::link::with_single_left_link_dmax_ratio_aligned");
175 mln_precondition(components.is_valid());
177 internal::single_left_dmax_ratio_aligned_functor<L,F>
178 functor(components, dmax_f, min_angle, max_angle, anchor);
180 object_links<L> output =
compute(functor, anchor);
187 template <
typename L>
191 const component_set<L>& components,
193 float min_angle,
float max_angle)
197 internal::dmax_default(dmax_ratio),
204 template <
typename L>
208 const component_set<L>& components)
215 # endif // ! MLN_INCLUDE_ONLY
223 #endif // ! SCRIBO_PRIMITIVE_LINK_WITH_SINGLE_LEFT_LINK_DMAX_RATIO_ALIGNED_HH