26 #include <mln/util/tree_fast.hh>
27 #include <mln/core/contract.hh>
28 #include <mln/core/image/image2d.hh>
29 #include <mln/core/site_set/p_set.hh>
30 #include <mln/value/int_u8.hh>
31 #include <mln/data/stretch.hh>
32 #include <mln/data/fill.hh>
33 #include <mln/data/compare.hh>
34 #include <mln/io/pgm/save.hh>
36 #include <mln/util/tree_fast_to_image.hh>
37 #include <mln/debug/println.hh>
40 template <
typename P,
typename V>
54 typedef fllt_node<point2d , int_u8> I;
64 for (
int i = 0; i < 4; ++i)
65 for (
int j = 0; j < 4; ++j)
66 s1.points.insert(
point2d(i, j));
68 for (
int i = 8; i < 16; ++i)
69 for (
int j = 0; j < 4; ++j)
70 s2.points.insert(
point2d(i, j));
72 for (
int i = 0; i < 4; ++i)
73 for (
int j = 0; j < 4; ++j)
74 s3.points.insert(
point2d(i, j));
76 for (
int i = 10; i < 12; ++i)
77 for (
int j = 0; j < 2; ++j)
78 s4.points.insert(
point2d(i, j));
80 for (
int i = 8; i < 16; ++i)
81 for (
int j = 0; j < 2; ++j)
82 s5.points.insert(
point2d(i, j));
84 for (
int i = 8; i < 16; ++i)
85 for (
int j = 2; j < 4; ++j)
86 s6.points.insert(
point2d(i, j));
88 for (
int i = 0; i < 16; ++i)
89 for (
int j = 0; j < 8; ++j)
90 s7.points.insert(
point2d(i, j));
94 tree.add_child(tree.root_, s2);
95 tree.add_child(tree.root_, s3);
96 tree.add_child(tree.root_, s4);
97 tree.add_child(tree.root_, s5);
98 tree.add_child(tree.root_, s6);
104 int_u8 vs[16][16] = {
106 {110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
107 {110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
108 {110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
109 {110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
110 { 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
111 { 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
112 { 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
113 { 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
114 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
115 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
116 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
117 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
118 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
119 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
120 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
121 {180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0}
127 mln_assertion(ref == output);