cleanup-2008 2765: Fix 1d to 2d problem.

https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena/sandbox Index: ChangeLog from Alexandre Abraham <abraham@lrde.epita.fr> Fix 1d to 2d problem. * nature/proj.cc: use an unsigned to iterate over the image. proj.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: nature/proj.cc --- nature/proj.cc (revision 2764) +++ nature/proj.cc (working copy) @@ -58,8 +58,8 @@ image1d<float> toto = proj_nat(ima); image2d<float> tata (toto.nelements(), 1); mln_piter_(image1d<float>) p(toto.domain()); - for_all(p) - tata(point2d((p.row(), 1))) = toto(p); - io::pgm::save(cast_image <int>(tata), name.append("_proj.pgm")); + for (unsigned u = 0; u < toto.nelements(); ++u) + tata(point2d(u, 1)) = toto(point1d(u)); + io::pgm::save(cast_image <int_u8>(tata), name.append("_proj.pgm")); } }
participants (1)
-
Alexandre Abraham