26 #ifndef MLN_MORPHO_ELEMENTARY_EROSION_HH
27 # define MLN_MORPHO_ELEMENTARY_EROSION_HH
31 # include <mln/morpho/elementary/like_ero_fun.hh>
32 # include <mln/morpho/elementary/like_ero_set.hh>
45 template <
typename I,
typename N>
47 erosion(const Image<I>& input, const Neighborhood<N>&
nbh);
50 # ifndef MLN_INCLUDE_ONLY
57 template <
typename I,
typename N>
59 erosion_dispatch(trait::image::kind::any,
60 const Image<I>& input, const Neighborhood<N>& nbh)
65 template <
typename I,
typename N>
67 erosion_dispatch(trait::image::kind::logic,
68 const Image<I>& input, const Neighborhood<N>& nbh)
81 template <
typename I,
typename N>
83 erosion_dispatch(const Image<I>& input, const Neighborhood<N>& nbh)
85 return erosion_dispatch(mln_trait_image_kind(I)(),
94 template <
typename I,
typename N>
96 erosion(const Image<I>& input, const Neighborhood<N>& nbh)
98 mln_trace(
"morpho::elementary::erosion");
100 mln_precondition(
exact(input).is_valid());
101 mln_precondition(
exact(nbh).is_valid());
103 mln_concrete(I) output = internal::erosion_dispatch(input, nbh);
105 mln_postcondition(output <= input);
109 # endif // ! MLN_INCLUDE_ONLY
118 #endif // ! MLN_MORPHO_ELEMENTARY_EROSION_HH