olena-2.0-187-g714925b mln/inner_border/remove.hh: New.

--- milena/ChangeLog | 4 +++ milena/mln/inner_border/{extend.hh => remove.hh} | 30 +++++++++++----------- 2 files changed, 19 insertions(+), 15 deletions(-) copy milena/mln/inner_border/{extend.hh => remove.hh} (73%) diff --git a/milena/ChangeLog b/milena/ChangeLog index 7a45b8b..473f717 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,9 @@ 2013-01-04 Guillaume Lazzara <z@lrde.epita.fr> + * mln/inner_border/remove.hh: New. + +2013-01-04 Guillaume Lazzara <z@lrde.epita.fr> + Add new v2v functions. * mln/fun/v2v/ceil.hh, diff --git a/milena/mln/inner_border/extend.hh b/milena/mln/inner_border/remove.hh similarity index 73% copy from milena/mln/inner_border/extend.hh copy to milena/mln/inner_border/remove.hh index 08c1901..bb9393d 100644 --- a/milena/mln/inner_border/extend.hh +++ b/milena/mln/inner_border/remove.hh @@ -23,15 +23,15 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. -#ifndef MLN_INNER_BORDER_EXTEND_HH -# define MLN_INNER_BORDER_EXTEND_HH +#ifndef MLN_INNER_BORDER_REMOVE_HH +# define MLN_INNER_BORDER_REMOVE_HH /// \file /// -/// \brief Extend the inner border of an image. +/// \brief Remove the inner border of an image. # include <mln/core/image/image2d.hh> -# include <mln/data/paste.hh> +# include <mln/data/paste_without_localization.hh> namespace mln @@ -40,42 +40,42 @@ namespace mln namespace inner_border { - /// \brief Extend the inner border of an image. + /// \brief Remove the inner border of an image. template <typename I> mln_concrete(I) - extend(const Image<I>& input, unsigned inner_border_size); + remove(const Image<I>& input, unsigned inner_border_size); /// \overload /// inner_border_size is set to 1. template <typename I> mln_concrete(I) - extend(const Image<I>& input); + remove(const Image<I>& input); # ifndef MLN_INCLUDE_ONLY template <typename I> mln_concrete(I) - extend(const Image<I>& input_, unsigned inner_border_size) + remove(const Image<I>& input_, unsigned inner_border_size) { - trace::entering("mln::inner_border::extend"); + trace::entering("mln::inner_border::remove"); mln_precondition(exact(input_).is_valid()); const I& input = exact(input_); box2d b = input.domain(), bb = b; - bb.enlarge(inner_border_size); + bb.enlarge(- inner_border_size); mln_concrete(I) output(bb); - data::paste(input, output); + data::paste_without_localization(input | bb, output); - trace::exiting("mln::inner_border::extend"); + trace::exiting("mln::inner_border::remove"); return output; } template <typename I> mln_concrete(I) - extend(const Image<I>& input) + remove(const Image<I>& input) { - return extend(input, 1); + return remove(input, 1); } # endif // ! MLN_INCLUDE_ONLY @@ -84,4 +84,4 @@ namespace mln } // end of namespace mln -#endif // ! MLN_INNER_BORDER_EXTEND_HH +#endif // ! MLN_INNER_BORDER_REMOVE_HH -- 1.7.2.5
participants (1)
-
Guillaume Lazzara