38 #include <mln/core/image/complex_image.hh>
39 #include <mln/core/alias/complex_geometry.hh>
41 #include <mln/core/image/complex_neighborhoods.hh>
42 #include <mln/core/image/complex_neighborhood_piter.hh>
44 #include <mln/value/int_u8.hh>
63 const std::string& bgcolor =
"#0000C0",
64 const std::string& fontcolor =
"#0000C0",
65 bool empty_vertex_label =
true)
72 std::ofstream g(filename.c_str());
73 g <<
"graph wst" << std::endl
75 <<
" graph [bgcolor = \"" << bgcolor <<
"\"]" << std::endl
76 <<
" edge [color = \"#FFFFFF\"]" << std::endl
77 <<
" node [color = \"#FFFFFF\", height=\"5\", width=\"5\","
78 <<
" fontsize=\"100\", fontcolor = \"" << fontcolor <<
"\"]"
87 V vertex_color = ima(v);
88 std::ostringstream vertex_color_str;
90 vertex_color_str <<
'#'
93 << std::setw(2) << vertex_color
94 << std::setw(2) << vertex_color
95 << std::setw(2) << vertex_color
98 g <<
" v" << v.unproxy_().face_id()
100 << std::fixed << std::setprecision(1)
101 << (
float)v.to_site().front()[1] <<
", "
102 << -(
float)v.to_site().front()[0]
103 <<
"\", color = \"" << vertex_color_str.str()
104 <<
"\", fillcolor = \"" << vertex_color_str.str()
105 <<
"\", pin = \"true\", style=\"filled,setlinewidth(3)\"";
106 if (empty_vertex_label)
107 g <<
", label = \"\"";
116 mln_niter_(v_nbh_t) adj_v(v_nbh, e);
119 V edge_color = ima(e);
120 std::ostringstream edge_color_str;
121 edge_color_str <<
'#'
124 << std::setw(2) << edge_color
125 << std::setw(2) << edge_color
126 << std::setw(2) << edge_color
135 mln_invariant(!adj_v.is_valid());
138 g <<
"[color = \"" << edge_color_str.str()
139 <<
"\", style=\"setlinewidth(10)\"];" << std::endl;
142 g <<
"}" << std::endl;
151 const std::string& bgcolor =
"#0000C0",
152 const std::string& fontcolor =
"#0000C0",
153 bool empty_vertex_label =
true)
157 const unsigned D = 1;
160 std::ofstream g(filename.c_str());
161 g <<
"graph wst" << std::endl
163 <<
" graph [bgcolor = \"" << bgcolor <<
"\"]" << std::endl
164 <<
" edge [color = \"#FFFFFF\"]" << std::endl
165 <<
" node [color = \"#FFFFFF\", height=\"5\", width=\"5\","
166 <<
" fontsize=\"100\", fontcolor = \"" << fontcolor <<
"\"]"
175 V vertex_color = ima(v);
176 std::ostringstream vertex_color_str;
178 vertex_color_str <<
'#'
181 << std::setw(2) << vertex_color.red()
182 << std::setw(2) << vertex_color.green()
183 << std::setw(2) << vertex_color.blue()
186 g <<
" v" << v.unproxy_().face_id()
188 << std::fixed << std::setprecision(1)
189 << (
float)v.to_site().front()[1] <<
", "
190 << -(
float)v.to_site().front()[0]
191 <<
"\", color = \"" << vertex_color_str.str()
192 <<
"\", fillcolor = \"" << vertex_color_str.str()
193 <<
"\", pin = \"true\", style=\"filled,setlinewidth(3)\"";
194 if (empty_vertex_label)
195 g <<
", label = \"\"";
204 mln_niter_(v_nbh_t) adj_v(v_nbh, e);
207 V edge_color = ima(e);
208 std::ostringstream edge_color_str;
209 edge_color_str <<
'#'
212 << std::setw(2) << edge_color.red()
213 << std::setw(2) << edge_color.green()
214 << std::setw(2) << edge_color.blue()
223 mln_invariant(!adj_v.is_valid());
226 g <<
"[color = \"" << edge_color_str.str()
227 <<
"\", style=\"setlinewidth(10)\"];" << std::endl;
230 g <<
"}" << std::endl;