26 #ifndef MLN_MAKE_P_VERTICES_WITH_MASS_CENTERS_HH
27 # define MLN_MAKE_P_VERTICES_WITH_MASS_CENTERS_HH
36 # include <mln/core/concept/image.hh>
37 # include <mln/core/concept/graph.hh>
38 # include <mln/core/site_set/p_vertices.hh>
40 # include <mln/labeling/compute.hh>
42 # include <mln/accu/center.hh>
44 # include <mln/fun/i2v/array.hh>
64 template <
typename W,
typename G>
66 p_vertices<G, fun::i2v::array<mln_site(W)> >
71 # ifndef MLN_INCLUDE_ONLY
74 template <
typename W,
typename G>
76 p_vertices<G, fun::i2v::array<mln_site(W)> >
80 mln_trace(
"make::p_vertices_with_mass_centers");
82 const W& wst =
exact(wst_);
83 const G& g =
exact(g_);
84 mln_precondition(wst.is_valid());
85 mln_precondition(g.is_valid());
87 typedef mln_site(W) P;
88 typedef fun::i2v::array<P> vertex_sites_t;
91 mln_value(W) nbasins = g.v_nmax() - 1;
92 vertex_sites_t vertex_sites;
96 p_vertices<G, vertex_sites_t> pv(g, vertex_sites);
101 # endif // ! MLN_INCLUDE_ONLY
107 #endif // ! MLN_MAKE_P_VERTICES_WITH_MASS_CENTERS_HH