27 #ifndef MLN_LABELING_BLOBS_HH
28 # define MLN_LABELING_BLOBS_HH
39 # include <mln/core/concept/image.hh>
40 # include <mln/core/concept/neighborhood.hh>
42 # include <mln/canvas/labeling/blobs.hh>
65 template <
typename I,
typename N,
typename L>
67 blobs(const Image<I>& input, const Neighborhood<N>& nbh,
71 # ifndef MLN_INCLUDE_ONLY
86 void new_label(
const mln_value(L)&) {}
88 void process_p(
const mln_site(L)&) {}
90 void process_n(
const mln_site(L)&) {}
101 template <
typename I,
typename N,
typename L>
104 blobs(const Image<I>& input_, const Neighborhood<N>& nbh_,
107 mln_trace(
"labeling::blobs");
108 mlc_equal(mln_trait_image_kind(I),
109 mln::trait::image::kind::binary)::check();
110 const I& input =
exact(input_);
111 const N& nbh =
exact(nbh_);
112 mln_precondition(input.is_valid());
114 typedef mln_ch_value(I,L) out_t;
115 internal::dummy_functor<out_t> functor;
117 output = canvas::
labeling::
blobs(input, nbh, nlabels, functor);
122 # endif // ! MLN_INCLUDE_ONLY
129 #endif // ! MLN_LABELING_BLOBS_HH