URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2007-11-06 Matthieu Garrigues <garrigues(a)lrde.epita.fr>
Add tests for FLLT.
* test_fllt10.cc: New,
* test_fllt10_inv.cc: New,
* test_fllt3_inv.cc: New,
* test_fllt7_inv.cc: New, test FLLT algorithm.
---
test_fllt10.cc | 31 +++++++++++++++++++++++++++++++
test_fllt10_inv.cc | 31 +++++++++++++++++++++++++++++++
test_fllt3_inv.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++
test_fllt7_inv.cc | 31 +++++++++++++++++++++++++++++++
4 files changed, 138 insertions(+)
Index: trunk/milena/sandbox/garrigues/test_fllt3_inv.cc
===================================================================
--- trunk/milena/sandbox/garrigues/test_fllt3_inv.cc (revision 0)
+++ trunk/milena/sandbox/garrigues/test_fllt3_inv.cc (revision 1436)
@@ -0,0 +1,45 @@
+# include "fllt2.hh"
+# include <mln/core/image2d.hh>
+# include <mln/core/clone.hh>
+# include <mln/value/int_u8.hh>
+# include <mln/debug/println.hh>
+# include <mln/convert/to_w_window.hh>
+# include <mln/core/w_window2d_int.hh>
+# include <mln/convert/to_image.hh>
+# include <mln/level/fill.hh>
+# include <mln/io/pgm/load.hh>
+# include <mln/io/pbm/load.hh>
+
+int main()
+{
+
+ using namespace mln;
+
+// int ws[81] = {2,2,2,2,2,2,2,2,2,
+// 2,2,2,2,2,2,2,2,2,
+// 2,1,1,1,1,1,1,1,2,
+// 2,1,2,2,1,0,0,1,2,
+// 2,1,2,2,1,0,0,1,2,
+// 2,1,2,2,1,0,0,1,2,
+// 2,1,1,1,1,1,1,1,2,
+// 2,1,1,1,1,1,1,1,2,
+// 2,2,2,2,2,2,2,2,2};
+
+// w_window2d_int w_win = make::w_window2d(ws);
+// image2d<int> ima = convert::to_image(w_win);
+// fllt::fllt(ima);
+
+ int vs[9][9] = { {0,0,0,0,0,0,0,0,0},
+ {0,0,0,0,0,0,0,0,0},
+ {0,1,1,1,1,1,1,1,0},
+ {0,1,0,0,1,2,2,1,0},
+ {0,1,0,0,1,2,2,1,0},
+ {0,1,0,0,1,2,2,1,0},
+ {0,1,1,1,1,1,1,1,0},
+ {0,1,1,1,1,1,1,1,0},
+ {0,0,0,0,0,0,0,0,0} };
+
+ image2d<int> ima(make::image2d(vs));
+ fllt::fllt(ima);
+
+}
Index: trunk/milena/sandbox/garrigues/test_fllt10.cc
===================================================================
--- trunk/milena/sandbox/garrigues/test_fllt10.cc (revision 0)
+++ trunk/milena/sandbox/garrigues/test_fllt10.cc (revision 1436)
@@ -0,0 +1,31 @@
+# include "fllt2.hh"
+# include <mln/core/image2d.hh>
+# include <mln/core/clone.hh>
+# include <mln/value/int_u8.hh>
+# include <mln/debug/println.hh>
+# include <mln/convert/to_w_window.hh>
+# include <mln/core/w_window2d_int.hh>
+# include <mln/convert/to_image.hh>
+# include <mln/level/fill.hh>
+# include <mln/io/pgm/load.hh>
+# include <mln/io/pgm/save.hh>
+# include <mln/io/pbm/load.hh>
+# include <sstream>
+
+
+int main()
+{
+
+ using namespace mln;
+ using typename value::int_u8;
+
+ int vs[5][10] = { {3, 3, 3, 3, 3, 4, 4, 4, 4, 4},
+ {3, 4, 4, 4, 3, 4, 3, 3, 3, 4},
+ {3, 4, 0, 4, 3, 4, 3, 5, 3, 4},
+ {3, 4, 4, 4, 3, 4, 3, 3, 3, 4},
+ {3, 3, 3, 3, 3, 4, 4, 4, 4, 4} };
+
+ image2d<int> ima(make::image2d(vs));
+ fllt::fllt(ima);
+
+}
Index: trunk/milena/sandbox/garrigues/test_fllt7_inv.cc
===================================================================
--- trunk/milena/sandbox/garrigues/test_fllt7_inv.cc (revision 0)
+++ trunk/milena/sandbox/garrigues/test_fllt7_inv.cc (revision 1436)
@@ -0,0 +1,31 @@
+# include "fllt2.hh"
+# include <mln/core/image2d.hh>
+# include <mln/core/clone.hh>
+# include <mln/value/int_u8.hh>
+# include <mln/debug/println.hh>
+# include <mln/convert/to_w_window.hh>
+# include <mln/core/w_window2d_int.hh>
+# include <mln/convert/to_image.hh>
+# include <mln/level/fill.hh>
+# include <mln/io/pgm/load.hh>
+# include <mln/io/pgm/save.hh>
+# include <mln/io/pbm/load.hh>
+# include <sstream>
+
+
+int main()
+{
+
+ using namespace mln;
+ using typename value::int_u8;
+
+ int vs[5][5] = { {200, 100, 100, 100, 200},
+ {200, 100, 0 , 100, 200},
+ {200, 100, 100, 100, 200},
+ {200, 100, 0 , 100, 200},
+ {200, 100, 100, 100, 200} };
+
+ image2d<int> ima(make::image2d(vs));
+ fllt::fllt(ima);
+
+}
Index: trunk/milena/sandbox/garrigues/test_fllt10_inv.cc
===================================================================
--- trunk/milena/sandbox/garrigues/test_fllt10_inv.cc (revision 0)
+++ trunk/milena/sandbox/garrigues/test_fllt10_inv.cc (revision 1436)
@@ -0,0 +1,31 @@
+# include "fllt2.hh"
+# include <mln/core/image2d.hh>
+# include <mln/core/clone.hh>
+# include <mln/value/int_u8.hh>
+# include <mln/debug/println.hh>
+# include <mln/convert/to_w_window.hh>
+# include <mln/core/w_window2d_int.hh>
+# include <mln/convert/to_image.hh>
+# include <mln/level/fill.hh>
+# include <mln/io/pgm/load.hh>
+# include <mln/io/pgm/save.hh>
+# include <mln/io/pbm/load.hh>
+# include <sstream>
+
+
+int main()
+{
+
+ using namespace mln;
+ using typename value::int_u8;
+
+ int vs[5][10] = { {0, 0, 0, 0, 0, 1, 1, 1, 1, 1},
+ {0, 1, 1, 1, 0, 1, 0, 0, 0, 1},
+ {0, 1, 0, 1, 0, 1, 0, 1, 0, 1},
+ {0, 1, 1, 1, 0, 1, 0, 0, 0, 1},
+ {0, 0, 0, 0, 0, 1, 1, 1, 1, 1} };
+
+ image2d<int> ima(make::image2d(vs));
+ fllt::fllt(ima);
+
+}