
https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Several fixes. * mln/morpho/leveling_filter.hh: Layout. (leveling_filter): Fix trace naming. Call facade instead of dispatch. * mln/canvas/morpho/attribute_filter.hh: Layout. (attribute_filter_fastest): Fix deja_vu border value. canvas/morpho/attribute_filter.hh | 7 ++++++- morpho/leveling_filter.hh | 30 ++++++++++++++++++++---------- 2 files changed, 26 insertions(+), 11 deletions(-) Index: mln/morpho/leveling_filter.hh --- mln/morpho/leveling_filter.hh (revision 3598) +++ mln/morpho/leveling_filter.hh (working copy) @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -26,8 +26,8 @@ // reasons why the executable file might be covered by the GNU General // Public License. -#ifndef MLN_MORPHO_LEVELING_FILTER_HH_ -# define MLN_MORPHO_LEVELING_FILTER_HH_ +#ifndef MLN_MORPHO_LEVELING_FILTER_HH +# define MLN_MORPHO_LEVELING_FILTER_HH /// \file mln/morpho/leveling_filter.hh /// @@ -44,8 +44,13 @@ # include <mln/canvas/morpho/attribute_filter.hh> -namespace mln { - namespace morpho { + +namespace mln +{ + + namespace morpho + { + template <typename I, typename N, typename A> mln_concrete(I) @@ -56,8 +61,10 @@ bool increasing); + # ifndef MLN_INCLUDE_ONLY + template <typename I, typename N, typename A> mln_concrete(I) leveling_filter(const Image<I>& input, @@ -66,7 +73,7 @@ const typename A::result& lambda, bool increasing) { - trace::entering("morpho::opening::leveling_filter"); + trace::entering("morpho::leveling_filter"); mln_precondition(exact(input).is_valid()); @@ -76,16 +83,19 @@ trait::accumulator::when_pix::use_v))::check(); mln_concrete(I) output; - output = canvas::morpho::internal::attribute_filter_dispatch(input, nbh, a, lambda, increasing); + output = canvas::morpho::attribute_filter(input, nbh, a, lambda, increasing); - trace::exiting("morpho::opening::leveling_filter"); + trace::exiting("morpho::leveling_filter"); return output; } + # endif // ! MLN_INCLUDE_ONLY + } // end of namespace mln::morpho + } // end of namespace mln -#endif /* !MLN_MORPHO_LEVELING_FILTER_HH_ */ +#endif // ! MLN_MORPHO_LEVELING_FILTER_HH Index: mln/canvas/morpho/attribute_filter.hh --- mln/canvas/morpho/attribute_filter.hh (revision 3598) +++ mln/canvas/morpho/attribute_filter.hh (working copy) @@ -313,7 +313,7 @@ { initialize(deja_vu, input); data::fill(deja_vu, false); - extension::fill(deja_vu, true); // So the border is neutral. + extension::fill(deja_vu, false); // So the border is neutral. initialize(activity, input); data::fill(activity, true); @@ -381,6 +381,7 @@ trace::exiting("canvas::morpho::impl::attribute_filter_fastest"); return output; } + } // end of namespace mln::canvas::morpho::impl @@ -391,7 +392,9 @@ namespace internal { + // Dispatch to generic. + template <typename I, typename N, typename A> inline mln_concrete(I) @@ -409,7 +412,9 @@ return impl::generic::attribute_filter(input, nbh, s, a, lambda); } + // Dispatch to fastest. + template <typename I, typename N, typename A> inline mln_concrete(I)