Commit 5028921e authored by Roland Levillain's avatar Roland Levillain
Browse files

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.
parent 5d8a1259
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.
......@@ -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;
}
......@@ -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;
}
......
// 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");
}
......
// 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;
}
......
// 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;
}
......
......@@ -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;
}
......
// 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
image2d<value::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");
image2d<value::rgb8> output = impl::color_pretty_rgb(input_, s1_, s2_, s3_);
trace::exiting("display::color_pretty_rgb");
return output;
}
......
// 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
......
// 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_);
image2d<value::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
......
// 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
......
// 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
......
// 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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment