33 #include <mln/core/alias/point2d.hh>
35 #include <mln/util/graph.hh>
36 #include <mln/fun/i2v/array.hh>
37 #include <mln/util/site_pair.hh>
38 #include <mln/core/image/edge_image.hh>
40 #include <mln/morpho/erosion.hh>
41 #include <mln/morpho/dilation.hh>
95 viota_t
iota(g.v_nmax());
96 for (
unsigned i = 0; i <
iota.size(); ++i)
100 ima_t ima(g, sites,
iota);
111 const unsigned dil_ref[] = { 12, 14, 13, 14, 13 };
112 const unsigned ero_ref[] = { 11, 10, 10, 12, 11 };
116 mln_piter_(ima_t) p_dil(ima_dil.domain());
118 mln_assertion(dil_ref[i++] == ima_dil(p_dil));
120 ima_t ima_ero = morpho::
erosion(ima, win);
122 mln_piter_(ima_t) p_ero(ima_ero.domain());
125 mln_assertion(ero_ref[i++] == ima_ero(p_ero));