27 #ifndef MLN_GEOM_SEEDS2TILING_ROUNDNESS_HH
28 # define MLN_GEOM_SEEDS2TILING_ROUNDNESS_HH
36 # include <mln/core/concept/image.hh>
37 # include <mln/core/image/image2d.hh>
38 # include <mln/core/concept/neighborhood.hh>
39 # include <mln/core/alias/w_window2d_int.hh>
40 # include <mln/core/site_set/p_priority.hh>
41 # include <mln/core/site_set/p_queue_fast.hh>
42 # include <mln/core/routine/duplicate.hh>
43 # include <mln/accu/stat/mean.hh>
44 # include <mln/estim/min_max.hh>
45 # include <mln/algebra/vec.hh>
46 # include <mln/geom/chamfer.hh>
68 template <
typename I,
typename N>
71 unsigned max,
const Neighborhood<N>& nbh_);
74 # ifndef MLN_INCLUDE_ONLY
79 template <
typename I,
typename N>
83 unsigned max,
const Neighborhood<N>& nbh_)
85 mln_trace(
"geom::impl::seed2tiling_roundness");
92 p_priority<unsigned, p_queue_fast<mln_psite(I)> > q;
96 mln_piter(I)
p(ima.domain());
99 q.push(max - dist(
p), p);
105 while (! q.is_empty())
107 mln_psite(I) p = q.pop_front();
109 if (out(p) != literal::zero)
111 mln_niter(N) n(nbh, p);
113 for_all(n) if (ima.has(n))
114 if (out(n) != literal::zero)
126 template <typename I, typename N>
130 unsigned max, const Neighborhood<N>& nbh)
132 mln_trace(
"geom::seed2tiling_roundness");
134 mln_precondition(
exact(ima_).is_valid());
142 # endif // ! MLN_INCLUDE_ONLY
149 #endif // ! MLN_GEOM_SEEDS2TILING_ROUNDNESS_HH