
URL: https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena ChangeLog: 2008-09-17 Guillaume Lazzara <z@lrde.epita.fr> make seed2tiling_roundness test compile. * milena/mln/convert/to_image.hh: use operator(point1d p) instead of operator(int index). * milena/mln/display/color_pretty.hh: add missing header. * milena/mln/geom/chamfer.hh: Use pw::cst(bool) with operator |. --- convert/to_image.hh | 2 +- display/color_pretty.hh | 1 - geom/chamfer.hh | 13 +++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) Index: branches/cleanup-2008/milena/mln/convert/to_image.hh =================================================================== --- branches/cleanup-2008/milena/mln/convert/to_image.hh (revision 2311) +++ branches/cleanup-2008/milena/mln/convert/to_image.hh (revision 2312) @@ -198,7 +198,7 @@ v_max = h.vset()[h.vset().nvalues() - 1]; image1d<std::size_t> ima(make::box1d(v_min, v_max)); for(unsigned i = 0; i < h.vset().nvalues(); ++i) - ima(i) = h[i]; + ima(point1d(i)) = h[i]; return ima; } Index: branches/cleanup-2008/milena/mln/geom/chamfer.hh =================================================================== --- branches/cleanup-2008/milena/mln/geom/chamfer.hh (revision 2311) +++ branches/cleanup-2008/milena/mln/geom/chamfer.hh (revision 2312) @@ -38,8 +38,13 @@ # include <mln/core/alias/w_window2d_float.hh> # include <mln/core/image/sub_image.hh> # include <mln/core/image/inplace.hh> +# include <mln/core/image/image_if.hh> # include <mln/canvas/chamfer.hh> +//FIXME: to be removed when ima | bool will be supported. +// See init(). +# include <mln/pw/all.hh> + namespace mln { @@ -58,7 +63,7 @@ namespace impl { - // \internal Functors. + // Functors. template <typename I_, typename W_> struct chamfer_t @@ -78,8 +83,8 @@ inline void init() { initialize(output, exact(input)); - level::fill(inplace(output | (input | true).domain()), 0); - level::fill(inplace(output | (input | false).domain()), max); } + level::fill(inplace(output | (input | pw::cst(true)).domain()), 0); + level::fill(inplace(output | (input | pw::cst(false)).domain()), max); } inline bool handles(const P& p) const { return input(p) == false; } @@ -93,7 +98,7 @@ {} }; - /// \internal Routines. + /// Routines. template <typename I, typename W> inline Index: branches/cleanup-2008/milena/mln/display/color_pretty.hh =================================================================== --- branches/cleanup-2008/milena/mln/display/color_pretty.hh (revision 2311) +++ branches/cleanup-2008/milena/mln/display/color_pretty.hh (revision 2312) @@ -35,7 +35,6 @@ */ # include <mln/trait/image_from_mesh.hh> -# include <mln/core/image_if_value.hh> # include <mln/core/image/image2d.hh> # include <mln/value/rgb8.hh> # include <mln/level/fill.hh>