milena r1520: Subdirectory display ready for rereading

URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena ChangeLog: 2007-11-22 Guillaume Duhamel <guillaume.duhamel@lrde.epita.fr> Subdirectory display ready for rereading. * mln/display/all.hh, * mln/display/color_pretty.hh, * mln/display/remove.hh: Fix type and tracing. Tests * tests/display/save_and_show.cc, * tests/display/show.cc: Update tests. --- mln/display/all.hh | 8 +++++++- mln/display/color_pretty.hh | 4 ++++ mln/display/remove.hh | 3 +-- tests/display/save_and_show.cc | 11 +++++++---- tests/display/show.cc | 15 +++++++++------ 5 files changed, 28 insertions(+), 13 deletions(-) Index: trunk/milena/tests/display/show.cc =================================================================== --- trunk/milena/tests/display/show.cc (revision 1519) +++ trunk/milena/tests/display/show.cc (revision 1520) @@ -72,12 +72,15 @@ display::show (t, "display", 1); } -// image2d<value::rgb8> color_image (16, 16); -// for (int i = 0; i < 16; ++i) -// for (int j = 0; j < 16; ++j) -// color_image(point2d(i, j)) = value::rgb8(0,0,255); -// display::save (color_image); -// display::show (color_image, "display"); + /// Test with color image. + { + image2d<value::rgb8> color_image (16, 16); + for (int i = 0; i < 16; ++i) + for (int j = 0; j < 16; ++j) + color_image(point2d(i, j)) = value::rgb8(0,0,255); + display::save (color_image); + display::show (color_image, "display", 1); + } display::remove (); } Index: trunk/milena/tests/display/save_and_show.cc =================================================================== --- trunk/milena/tests/display/save_and_show.cc (revision 1519) +++ trunk/milena/tests/display/save_and_show.cc (revision 1520) @@ -68,8 +68,11 @@ display::save_and_show (t, "display", 1); } - /// FIXME: Uncomment this ASAP -// image2d<value::rgb8> ima (100, 100); -// level::fill(ima, value::rgb8 (0, 0, 255)); -// display::save_and_show (ima, "display", 1); + /// Test with color image. + { + image2d<value::rgb8> ima (100, 100); + level::fill(ima, value::rgb8 (0, 0, 255)); + display::save_and_show (ima, "display", 1); + } + } Index: trunk/milena/mln/display/color_pretty.hh =================================================================== --- trunk/milena/mln/display/color_pretty.hh (revision 1519) +++ trunk/milena/mln/display/color_pretty.hh (revision 1520) @@ -141,6 +141,8 @@ const p_set<mln_point(I) >& s2_, const p_set<mln_point(I) >& s3_) { + trace::entering("display::impl::color_pretty_rgb"); + const I& input = exact (input_); image2d<value::rgb8> output(input.domain().bbox()); @@ -166,6 +168,8 @@ for_all(p) output(p).blue() = 255; } + + trace::exiting("display::impl::color_pretty_rgb"); return output; } Index: trunk/milena/mln/display/all.hh =================================================================== --- trunk/milena/mln/display/all.hh (revision 1519) +++ trunk/milena/mln/display/all.hh (revision 1520) @@ -41,7 +41,13 @@ namespace display { /// Implementation namespace of display namespace. - namespace impl {} + namespace impl { + + /// Generic implementation namespace of display namespace. + namespace generic {} + + } + } } Index: trunk/milena/mln/display/remove.hh =================================================================== --- trunk/milena/mln/display/remove.hh (revision 1519) +++ trunk/milena/mln/display/remove.hh (revision 1520) @@ -51,8 +51,7 @@ * save. * */ - void - remove(); + void remove(); # ifndef MLN_INCLUDE_ONLY
participants (1)
-
Guillaume Duhamel