26 #ifndef APPS_MESH_SEGM_SKEL_SAVE_BIN_ALT_HH
27 # define APPS_MESH_SEGM_SKEL_SAVE_BIN_ALT_HH
42 # include <mln/core/alias/complex_image.hh>
43 # include <mln/core/image/complex_neighborhoods.hh>
44 # include <mln/core/image/complex_neighborhood_piter.hh>
60 const std::string& filename)
62 const std::string me =
"mln::io::off::save";
64 std::ofstream ostr(filename.c_str());
67 std::cerr << me <<
": `" << filename <<
"' invalid file."
81 static const unsigned D = I::dim;
82 typedef mln_geom(I) G;
89 ostr <<
"OFF" << std::endl;
92 ostr <<
"# Generated by Milena 1.0 http://olena.lrde.epita.fr\n"
93 <<
"# EPITA Research and Development Laboratory (LRDE)"
114 ostr << ima.domain().cplx().template nfaces_of_static_dim<0>() <<
' '
116 << ima.domain().cplx().template nfaces_of_static_dim<1>()
134 mln_invariant(v.to_site().size() == 1);
135 ostr << v.to_site().front()[0] <<
' '
136 << v.to_site().front()[1] <<
' '
137 << v.to_site().front()[2] << std::endl;
150 typedef complex_m_face_neighborhood<D, G> nbh_t;
154 mln_fwd_niter(nbh_t) u(nbh, f);
165 unsigned nvertices = 0;
166 std::ostringstream vertices;
170 vertices <<
' ' << u.unproxy_().face().face_id();
173 ostr << nvertices << vertices.str();
187 #endif // ! APPS_MESH_SEGM_SKEL_SAVE_BIN_ALT_HH