26 #ifndef MLN_GRAPH_LABELING_HH
27 # define MLN_GRAPH_LABELING_HH
34 # include <mln/core/concept/image.hh>
35 # include <mln/core/concept/neighborhood.hh>
36 # include <mln/labeling/blobs.hh>
37 # include <mln/metal/bexpr.hh>
38 # include <mln/metal/is_a.hh>
60 template <
typename I,
typename N,
typename L>
62 labeling(const Image<I>& graph_image_,
63 const Neighborhood<N>& nbh_, L& nlabels);
67 # ifndef MLN_INCLUDE_ONLY
70 template <
typename I,
typename N,
typename L>
72 labeling(const Image<I>& graph_image_,
73 const Neighborhood<N>& nbh_, L& nlabels)
75 mln_trace(
"graph::labeling");
77 const I& graph_image =
exact(graph_image_);
80 mln_precondition(graph_image.is_valid());
81 mln_precondition(nbh.is_valid());
85 mln_ch_value(I,
bool) tmp;
89 mln_ch_value(I,L) output = mln::
labeling::
blobs(tmp, nbh, nlabels);
95 # endif // ! MLN_INCLUDE_ONLY
103 #endif // ! MLN_GRAPH_LABELING_HH