26 #include <mln/util/tree.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_to_image.hh>
37 #include <mln/debug/println.hh>
39 template <
typename P,
typename V>
53 typedef fllt_node<point2d , int_u8> I;
66 for (
int i = 0; i < 4; ++i)
67 for (
int j = 0; j < 4; ++j)
68 s1.points.insert(
point2d(i, j));
70 for (
int i = 8; i < 16; ++i)
71 for (
int j = 0; j < 4; ++j)
72 s2.points.insert(
point2d(i, j));
74 for (
int i = 0; i < 4; ++i)
75 for (
int j = 0; j < 4; ++j)
76 s3.points.insert(
point2d(i, j));
78 for (
int i = 10; i < 12; ++i)
79 for (
int j = 0; j < 2; ++j)
80 s4.points.insert(
point2d(i, j));
82 for (
int i = 8; i < 14; ++i)
83 for (
int j = 0; j < 2; ++j)
84 s5.points.insert(
point2d(i, j));
86 for (
int i = 13; i < 15; ++i)
87 for (
int j = 2; j < 4; ++j)
88 s6.points.insert(
point2d(i, j));
90 for (
int i = 0; i < 16; ++i)
91 for (
int j = 0; j < 8; ++j)
92 s7.points.insert(
point2d(i, j));
102 tree.add_tree_up(s7);
105 int_u8 vs[16][16] = {
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 {110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
111 {110, 110, 110, 110, 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 { 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
115 { 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
116 {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
117 {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
118 {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
119 {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
120 {180, 180, 252, 252, 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},
122 {252, 252, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
123 {252, 252, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0}
128 mln_assertion(ref == output);