30 #include <mln/core/image/image2d.hh>
31 #include <mln/core/alias/neighb2d.hh>
32 #include <mln/io/pbm/load.hh>
33 #include <scribo/core/def/lbl_type.hh>
34 #include <scribo/primitive/extract/components.hh>
35 #include <scribo/primitive/link/with_single_left_link.hh>
36 #include <scribo/primitive/group/from_single_link.hh>
37 #include <scribo/filter/object_groups_small.hh>
39 #include "tests/data.hh"
43 using namespace scribo;
46 std::string img = SCRIBO_IMG_DIR
"/the_valleys.pbm";
48 const bool ref[] = {
false,
true,
true,
true,
true };
49 const bool filtered_ref[] = {
false,
false,
true,
false,
false };
50 const unsigned size_ref[] = { 0, 1, 7, 1, 3 };
66 mln_assertion(groups.nelements() == 5);
67 for_all_groups(g, groups)
68 mln_assertion(groups(g).is_valid() == ref[g]);
72 for_all_groups(g, groups2)
74 mln_assertion(groups2(g).is_valid() == filtered_ref[g]);
75 mln_assertion(groups2(g).
card() == size_ref[g]);