* doc/examples/devel/facade.cc.raw, * doc/examples/devel/impl.cc.raw, * mln/io/vtk/save.hh, * mln/topo/skeleton/breadth_first_thinning.hh, * mln/topo/skeleton/priority_driven_thinning.hh, * new-header: Here. --- milena/ChangeLog | 12 ++++++++++++ milena/doc/examples/devel/facade.cc.raw | 4 +--- milena/doc/examples/devel/impl.cc.raw | 7 ++----- milena/mln/io/vtk/save.hh | 17 ++++++----------- milena/mln/topo/skeleton/breadth_first_thinning.hh | 5 ++--- milena/mln/topo/skeleton/priority_driven_thinning.hh | 5 ++--- milena/new-header | 4 +--- milena/trash/display_color_pretty.hh | 15 +++++---------- milena/trash/display_remove.hh | 13 +++++-------- milena/trash/display_save.hh | 14 ++++---------- milena/trash/display_save_and_show.hh | 10 +++------- milena/trash/display_show.hh | 10 +++------- milena/trash/neighb_get.hh | 6 ++---- 13 files changed, 48 insertions(+), 74 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog index 82beada..9d24f2c 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,17 @@ 2013-08-29 Roland Levillain roland@lrde.epita.fr
+ Convert remaining Milena code to mln_trace. + + * doc/examples/devel/facade.cc.raw, + * doc/examples/devel/impl.cc.raw, + * mln/io/vtk/save.hh, + * mln/topo/skeleton/breadth_first_thinning.hh, + * mln/topo/skeleton/priority_driven_thinning.hh, + * new-header: + Here. + +2013-08-29 Roland Levillain roland@lrde.epita.fr + Fix the use of Pi in Milena's apps/mesh-segm-skel.
* apps/mesh-segm-skel/mesh-complex-max-curv-extrema.cc, diff --git a/milena/doc/examples/devel/facade.cc.raw b/milena/doc/examples/devel/facade.cc.raw index 0ef0196..0a8fc00 100644 --- a/milena/doc/examples/devel/facade.cc.raw +++ b/milena/doc/examples/devel/facade.cc.raw @@ -4,7 +4,7 @@ mln_concrete(I) erosion_tolerant(const Image<I>& input, const Neighborhood<N>& nbh, unsigned rank) { - trace::entering("morpho::erosion_tolerant"); + mln_trace("morpho::erosion_tolerant"); mln_precondition(exact(input).is_valid()); mln_precondition(exact(nbh).is_valid());
@@ -12,7 +12,5 @@ erosion_tolerant(const Image<I>& input, const Neighborhood<N>& nbh, = internal::erosion_tolerant_dispatch(input, nbh, rank); - - trace::exiting("morpho::erosion_tolerant"); return output; } diff --git a/milena/doc/examples/devel/impl.cc.raw b/milena/doc/examples/devel/impl.cc.raw index eb9ea05..9f6e366 100644 --- a/milena/doc/examples/devel/impl.cc.raw +++ b/milena/doc/examples/devel/impl.cc.raw @@ -10,11 +10,10 @@ namespace impl const Neighborhood<N>& nbh_, unsigned rank) { - trace::entering("impl::generic::erosion_tolerant"); + mln_trace("impl::generic::erosion_tolerant");
// Do it...
- trace::exiting("impl::generic::erosion_tolerant"); return output; }
@@ -27,12 +26,10 @@ namespace impl const Neighborhood<N>& nbh_, unsigned rank) { - trace::entering("impl::erosion_tolerant_on_set_fastest"); - + mln_trace("impl::erosion_tolerant_on_set_fastest");
// Do it...
- trace::exiting("impl::erosion_tolerant_on_set_fastest"); return output; }
diff --git a/milena/mln/io/vtk/save.hh b/milena/mln/io/vtk/save.hh index e3b8893..e8c8e09 100644 --- a/milena/mln/io/vtk/save.hh +++ b/milena/mln/io/vtk/save.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2008, 2009, 2010, 2011 EPITA Research and Development +// Copyright (C) 2008, 2009, 2010, 2011, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -181,41 +181,36 @@ namespace mln void save(const bin_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::vtk::save"); + mln_trace("mln::io::vtk::save"); internal::bin_vtk_saver()(ima, filename); - trace::exiting("mln::io::vtk::save"); }
void save(const int_u8_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::vtk::save"); + mln_trace("mln::io::vtk::save"); internal::int_u8_vtk_saver()(ima, filename); - trace::exiting("mln::io::vtk::save"); }
void save(const unsigned_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::vtk::save"); + mln_trace("mln::io::vtk::save"); internal::unsigned_vtk_saver()(ima, filename); - trace::exiting("mln::io::vtk::save"); }
void save(const float_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::vtk::save"); + mln_trace("mln::io::vtk::save"); internal::float_vtk_saver()(ima, filename); - trace::exiting("mln::io::vtk::save"); }
void save(const rgb8_2complex_image3df& ima, const std::string& filename) { - trace::entering("mln::io::vtk::save"); + mln_trace("mln::io::vtk::save"); internal::rgb8_vtk_saver()(ima, filename); - trace::exiting("mln::io::vtk::save"); }
diff --git a/milena/mln/topo/skeleton/breadth_first_thinning.hh b/milena/mln/topo/skeleton/breadth_first_thinning.hh index 9277773..d91ad36 100644 --- a/milena/mln/topo/skeleton/breadth_first_thinning.hh +++ b/milena/mln/topo/skeleton/breadth_first_thinning.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2009, 2010, 2011 EPITA Research and Development +// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -121,7 +121,7 @@ namespace mln G& detach, const Function_v2b<H>& constraint_) { - trace::entering("topo::skeleton::breadth_first_thinning"); + mln_trace("topo::skeleton::breadth_first_thinning");
const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -174,7 +174,6 @@ namespace mln } }
- trace::exiting("topo::skeleton::breadth_first_thinning"); return output; }
diff --git a/milena/mln/topo/skeleton/priority_driven_thinning.hh b/milena/mln/topo/skeleton/priority_driven_thinning.hh index 4239047..96a4eac 100644 --- a/milena/mln/topo/skeleton/priority_driven_thinning.hh +++ b/milena/mln/topo/skeleton/priority_driven_thinning.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2009, 2010, 2011 EPITA Research and Development +// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development // Laboratory (LRDE) // // This file is part of Olena. @@ -129,7 +129,7 @@ namespace mln const Image<J>& priority_, const Function_v2b<H>& constraint_) { - trace::entering("topo::skeleton::priority_driven_thinning"); + mln_trace("topo::skeleton::priority_driven_thinning");
const I& input = exact(input_); const N& nbh = exact(nbh_); @@ -184,7 +184,6 @@ namespace mln } }
- trace::exiting("topo::skeleton::priority_driven_thinning"); return output; }
diff --git a/milena/new-header b/milena/new-header index 296095c..54c41c4 100755 --- a/milena/new-header +++ b/milena/new-header @@ -137,13 +137,11 @@ inline mln_concrete(I) @FUNCTION@(const Image<I>& input) { - trace::entering("@QUAL_NAME@"); + mln_trace("@QUAL_NAME@");
// FIXME: Replace this dummy statement with actual code. mln_concrete(I) output = duplicate(input); // ... - - trace::exiting("@QUAL_NAME@"); return output; }
diff --git a/milena/trash/display_color_pretty.hh b/milena/trash/display_color_pretty.hh index 9431fc7..9e2a8ea 100644 --- a/milena/trash/display_color_pretty.hh +++ b/milena/trash/display_color_pretty.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2013 EPITA Research and Development Laboratory // // This file is part of Olena. // @@ -117,7 +117,7 @@ namespace mln typename trait::image_from_grid < mln_mesh(I), value::rgb8 >::ret color_pretty(const Image<I>& input_) { - trace::entering("display::impl::color_pretty"); + mln_trace("display::impl::color_pretty");
const I& input = exact (input_);
@@ -131,7 +131,6 @@ namespace mln output(p) = value::rgb8(color_value(input(p))); }
- trace::exiting("display::impl::color_pretty"); return output; }
@@ -143,7 +142,7 @@ namespace mln const p_set<mln_psite(I) >& s2_, const p_set<mln_psite(I) >& s3_) { - trace::entering("display::impl::color_pretty_rgb"); + mln_trace("display::impl::color_pretty_rgb");
const I& input = exact (input_);
@@ -171,7 +170,6 @@ namespace mln output(p).blue() = 255; }
- trace::exiting("display::impl::color_pretty_rgb"); return output; }
@@ -186,7 +184,7 @@ namespace mln typename trait::image_from_grid < mln_mesh(I), value::rgb8 >::ret color_pretty(const Image<I>& input_) { - trace::entering("display::color_pretty"); + mln_trace("display::color_pretty");
const I& input = exact(input_); mln_precondition(input.is_valid()); @@ -196,7 +194,6 @@ namespace mln
image2dvalue::rgb8 output = impl::color_pretty(input);
- trace::exiting("display::color_pretty"); return output; }
@@ -208,11 +205,9 @@ namespace mln const p_set<mln_psite(I) >& s2_, const p_set<mln_psite(I) >& s3_) { - trace::entering("display::color_pretty_rgb"); + mln_trace("display::color_pretty_rgb");
image2dvalue::rgb8 output = impl::color_pretty_rgb(input_, s1_, s2_, s3_); - - trace::exiting("display::color_pretty_rgb"); return output; }
diff --git a/milena/trash/display_remove.hh b/milena/trash/display_remove.hh index 59a4a80..96e990e 100644 --- a/milena/trash/display_remove.hh +++ b/milena/trash/display_remove.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008, 2013 EPITA Research and Development Laboratory // (LRDE) // // This file is part of Olena. @@ -33,7 +33,8 @@
# include <map> # include <string> -# include <mln/trace/all.hh> + +# include <mln/debug/trace.hh>
namespace mln @@ -56,7 +57,7 @@ namespace mln void remove() { - trace::entering("display::impl::remove"); + mln_trace("display::impl::remove");
for (std::map<void*, std::string>::const_iterator it = map_saved_image_tmp_.begin (); it != map_saved_image_tmp_.end (); @@ -65,8 +66,6 @@ namespace mln std::string s = "rm -f " + (*it).second; system (s.c_str ()); } - - trace::exiting("display::impl::remove"); }
} // end of namespace mln::display::impl @@ -76,11 +75,9 @@ namespace mln void remove() { - trace::entering("display::remove"); + mln_trace("display::remove");
impl::remove(); - - trace::exiting("display::remove"); }
# endif // !MLN_INCLUDE_ONLY diff --git a/milena/trash/display_save.hh b/milena/trash/display_save.hh index 1406d6f..e51e14d 100644 --- a/milena/trash/display_save.hh +++ b/milena/trash/display_save.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2008, 2013 EPITA Research and Development Laboratory // (LRDE) // // This file is part of Olena. @@ -69,7 +69,7 @@ namespace mln void save(trait::value::kind::any, const Image<I>& input_) { - trace::entering("display::impl::save"); + mln_trace("display::impl::save");
const I& input = exact (input_); image2dvalue::rgb8 out = display::color_pretty(input); @@ -84,8 +84,6 @@ namespace mln io::ppm::save(out, path_tmp);
map_saved_image_tmp_[(void*)input.id_ ()] = path_tmp; - - trace::exiting("display::impl::save"); }
template <typename I> @@ -93,7 +91,7 @@ namespace mln void save(trait::value::kind::color, const Image<I>& input_) { - trace::entering("display::impl::save"); + mln_trace("display::impl::save");
const I& input = exact (input_);
@@ -107,8 +105,6 @@ namespace mln io::ppm::save(input, path_tmp);
map_saved_image_tmp_[(void*)input.id_ ()] = path_tmp; - - trace::exiting("display::impl::save"); }
} // end of namespace mln::display::impl @@ -119,13 +115,11 @@ namespace mln void save(const Image<I>& input_) { - trace::entering("display::save"); + mln_trace("display::save");
const I& input = exact(input_); mln_precondition(input.is_valid()); impl::save(mln_trait_value_kind(mln_value(I)) (), input); - - trace::exiting("display::save"); }
# endif // !MLN_INCLUDE_ONLY diff --git a/milena/trash/display_save_and_show.hh b/milena/trash/display_save_and_show.hh index 2d69db1..8685114 100644 --- a/milena/trash/display_save_and_show.hh +++ b/milena/trash/display_save_and_show.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2013 EPITA Research and Development Laboratory // // This file is part of Olena. // @@ -68,12 +68,10 @@ namespace mln save_and_show_(const Image<I>& input, std::string cmd, int time) { - trace::entering("display::impl::save_and_show_"); + mln_trace("display::impl::save_and_show_");
display::save(input); show(input, cmd, time); - - trace::exiting("display::impl::save_and_show_"); }
} // end of namespace mln::display::impl @@ -84,11 +82,9 @@ namespace mln void save_and_show(const Image<I>& input_, std::string cmd = "display", int time = 0) { - trace::entering("display::save_and_show"); + mln_trace("display::save_and_show");
impl::save_and_show_(input_, cmd, time); - - trace::exiting("display::save_and_show"); }
# endif // !MLN_INCLUDE_ONLY diff --git a/milena/trash/display_show.hh b/milena/trash/display_show.hh index 02e2cb6..8fab8fe 100644 --- a/milena/trash/display_show.hh +++ b/milena/trash/display_show.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2007 EPITA Research and Development Laboratory +// Copyright (C) 2007, 2013 EPITA Research and Development Laboratory // // This file is part of Olena. // @@ -87,7 +87,7 @@ namespace mln void show(const Image<I>& input_, std::string cmd, int time) { - trace::entering("display::impl::show"); + mln_trace("display::impl::show");
const I& input = exact(input_);
@@ -105,8 +105,6 @@ namespace mln st << cmd << " " << map_saved_image_tmp_[(void*)input.id_()]; system(st.str().c_str()); } - - trace::exiting("display::impl::show"); }
} // end of namespace mln::display::impl @@ -117,12 +115,10 @@ namespace mln void show(const Image<I>& input_, std::string cmd = "display", int time = 0) { - trace::entering("display::show"); + mln_trace("display::show");
mln_precondition(impl::check_saved(input_)); impl::show(input_, cmd, time); - - trace::entering("display::show"); }
# endif // !MLN_INCLUDE_ONLY diff --git a/milena/trash/neighb_get.hh b/milena/trash/neighb_get.hh index ce1d524..25ae909 100644 --- a/milena/trash/neighb_get.hh +++ b/milena/trash/neighb_get.hh @@ -1,4 +1,4 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2013 EPITA Research and Development Laboratory (LRDE) // // This file is part of Olena. // @@ -172,13 +172,11 @@ namespace mln typename get_helper<I>::type get(const Image<I>& ima) { - trace::entering("neighb::get"); + mln_trace("neighb::get");
mln_precondition(exact(ima).is_valid()); typename neighb::get_helper<I>::type res = neighb::get_helper<I>::run(exact(ima)); - - trace::exiting("neighb::get"); return res; }