32 #include <mln/value/int_u8.hh>
33 #include <mln/core/alias/point2d.hh>
35 #include <mln/core/site_set/p_faces.hh>
36 #include <mln/core/image/complex_image.hh>
39 #include <mln/core/image/complex_windows.hh>
40 #include <mln/core/image/complex_window_piter.hh>
42 #include <mln/debug/iota.hh>
44 #include <mln/morpho/erosion.hh>
45 #include <mln/morpho/dilation.hh>
51 template <
typename I,
typename W>
53 const std::string& comment);
114 geom.add_location(
point2d(2,0));
115 geom.add_location(
point2d(2,2));
116 geom.add_location(
point2d(0,3));
148 mln_piter_(ima_t)
p(ima.domain());
150 std::cout << "ima (" <<
p << ") = " << ima(
p) << std::endl;
151 std::cout << std::endl << std::endl;
158 "lower-dimension faces");
160 "higher-dimension faces");
162 "lower- and higer-dimension faces");
165 "lower-dimension connected n-faces");
167 "higher-dimension connected n-faces");
174 template <typename I, typename W>
176 test_morpho(const mln::
Image<I>& ima_, const mln::
Window<W> win,
177 const std::
string& comment)
179 const I& ima =
exact(ima_);
180 mln_assertion(ima.is_valid());
181 mln_piter(I)
p(ima.domain());
183 mln_concrete(I) ima_dil = mln::morpho::
dilation(ima, win);
185 std::cout << "Dilation using " << comment << ":" << std::endl;
187 std::cout << " ima_dil (" <<
p << ") = " << ima_dil(
p) << std::endl;
188 std::cout << std::endl;
190 std::cout << "Erosion using " << comment << ":" << std::endl;
191 mln_concrete(I) ima_ero = mln::morpho::
erosion(ima, win);
194 std::cout << " ima_ero (" <<
p << ") = " << ima_ero(
p) << std::endl;
195 std::cout << std::endl << std::endl;