26 #include <mln/core/image/image2d.hh>
27 #include <mln/core/alias/neighb2d.hh>
28 #include <mln/core/var.hh>
29 #include <mln/pw/all.hh>
31 #include <mln/value/int_u8.hh>
32 #include <mln/io/pgm/load.hh>
33 #include <mln/io/pgm/save.hh>
35 #include <mln/morpho/tree/component_tree.hh>
36 #include <mln/morpho/tree/compute_attribute_image.hh>
37 #include <mln/morpho/attribute/card.hh>
39 #include <mln/morpho/tree/filter/all.hh>
40 #include <mln/morpho/tree/propagate_representative.hh>
42 #include <mln/morpho/closing/area.hh>
44 #include "tests/data.hh"
59 typedef morpho::tree::data<I,S> tree_t;
66 typedef mln_ch_value_(I,
unsigned) A;
68 A a = morpho::tree::compute_attribute_image(attribute_t (), tree);
71 mln_VAR(predicate, pw::value(a) >= pw::cst(lambda));
72 I ref = morpho::closing::area(input,
c4(), lambda);
78 mln_assertion(out == ref);
85 mln_assertion(out == ref);
92 mln_assertion(out == ref);