26 #ifndef MLN_BORDER_RESIZE_HH
27 # define MLN_BORDER_RESIZE_HH
38 # include <mln/core/concept/image.hh>
39 # include <mln/core/routine/duplicate.hh>
40 # include <mln/core/routine/primary.hh>
41 # include <mln/border/get.hh>
42 # include <mln/data/fill.hh>
63 void resize(
const Image<I>& ima,
unsigned thickness);
67 # ifndef MLN_INCLUDE_ONLY
74 void resize(I& ima,
unsigned thickness)
79 mln_concrete(I) memo = mln::
duplicate(ima);
80 ima.resize_(thickness);
83 mln_postcondition(border::
get(ima) == thickness);
94 void resize_dispatch(trait::image::ext_domain::any,
95 const Image<I>& ima,
unsigned thickness)
102 template <
typename I>
104 void resize_dispatch(trait::image::ext_domain::extendable,
105 const Image<I>& ima,
unsigned thickness)
108 impl::resize(const_cast<I&>(exact(ima)), thickness);
111 template <
typename I>
113 void resize_dispatch(
const Image<I>& ima,
unsigned thickness)
115 resize_dispatch(mln_trait_image_ext_domain(I)(),
124 template <
typename I>
128 trace::entering(
"border::resize");
130 mln_precondition(exact(ima).is_valid());
133 internal::resize_dispatch(
primary(ima), thickness);
135 trace::exiting(
"border::resize");
138 # endif // ! MLN_INCLUDE_ONLY
145 #endif // ! MLN_BORDER_RESIZE_HH