26 #ifndef MLN_GEOM_SEEDS2TILING_HH
27 # define MLN_GEOM_SEEDS2TILING_HH
35 # include <mln/core/concept/neighborhood.hh>
36 # include <mln/core/site_set/p_queue.hh>
37 # include <mln/core/routine/duplicate.hh>
38 # include <mln/accu/stat/mean.hh>
39 # include <mln/estim/min_max.hh>
40 # include <mln/algebra/vec.hh>
59 template <
typename I,
typename N>
61 const Neighborhood<N>& nbh);
64 # ifndef MLN_INCLUDE_ONLY
74 template <
typename I,
typename N>
80 trace::entering(
"geom::impl::seed2tiling");
82 mln_precondition(exact(ima_).is_valid());
83 mln_precondition(exact(nbh_).is_valid());
85 const I& ima = exact(ima_);
87 const N& nbh = exact(nbh_);
92 mln_piter(I) p(ima.domain());
93 mln_niter(N) n(nbh, p);
95 for_all(p)
if (ima(p) == 0)
96 for_all(n)
if (ima(n) != 0)
105 while (! q.is_empty())
107 mln_psite(I) p = q.
front();
112 mln_niter(N) n(nbh, p);
113 for_all(n)
if (ima.has(n))
124 trace::exiting(
"geom::impl::seed2tiling");
134 template <
typename I,
typename N>
138 trace::entering(
"geom::seed2tiling");
140 mln_precondition(exact(ima_).is_valid());
141 mln_precondition(exact(nbh).is_valid());
145 trace::exiting(
"geom::seed2tiling");
150 # endif // ! MLN_INCLUDE_ONLY
157 #endif // ! MLN_GEOM_SEEDS2TILING_HH