27 #ifndef SCRIBO_FILTER_COMPONENTS_LARGE_HH
28 # define SCRIBO_FILTER_COMPONENTS_LARGE_HH
35 # include <mln/core/concept/image.hh>
36 # include <mln/core/concept/neighborhood.hh>
37 # include <mln/core/concept/function.hh>
39 # include <mln/labeling/compute.hh>
40 # include <mln/accu/math/count.hh>
42 # include <mln/util/array.hh>
44 # include <mln/pw/all.hh>
46 # include <scribo/core/component_set.hh>
47 # include <scribo/primitive/extract/components.hh>
48 # include <scribo/fun/v2b/objects_large_filter.hh>
72 template <
typename I,
typename N,
typename V>
96 # ifndef MLN_INCLUDE_ONLY
100 template <
typename I,
typename N,
typename V>
108 mln_trace(
"scribo::filter::components_large");
110 const I& input =
exact(input_);
113 mln_precondition(input.is_valid());
114 mln_precondition(nbh.is_valid());
118 lbl = primitive::extract::components(input, nbh, nlabels);
120 typedef fun::v2b::components_large_filter<mln_ch_value(I,V)> func_t;
121 func_t fv2b(lbl, min_size);
124 nlabels = fv2b.nlabels_;
131 template <typename L>
137 mln_trace(
"scribo::filter::components_large");
139 mln_precondition(components.is_valid());
141 fun::v2b::components_large_filter<L> f(components, max_size);
143 component_set<L> output = components.duplicate();
151 # endif // ! MLN_INCLUDE_ONLY
157 #endif // ! SCRIBO_FILTER_COMPONENTS_LARGE_HH