26 #ifndef MLN_MORPHO_OPENING_ALGEBRAIC_HH
27 # define MLN_MORPHO_OPENING_ALGEBRAIC_HH
33 # include <mln/morpho/includes.hh>
34 # include <mln/morpho/algebraic_filter.hh>
42 template <
typename I,
typename N,
typename A>
44 algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
45 const Accumulator<A>& accu, const mln_result(A)& lambda);
50 # ifndef MLN_INCLUDE_ONLY
53 template <
typename I,
typename N,
typename A>
56 algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
57 const Accumulator<A>& accu, const mln_result(A)& lambda)
59 trace::entering(
"morpho::opening::algebraic");
61 mln_precondition(exact(input).is_valid());
62 mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A),
63 trait::accumulator::when_pix::not_ok)::value);
65 mln_concrete(I) output;
66 output = algebraic_filter(input, nbh, accu, lambda,
69 mln_postcondition(output <= input);
71 trace::exiting("morpho::opening::algebraic");
76 # endif // ! MLN_INCLUDE_ONLY
83 #endif // ! MLN_MORPHO_OPENING_ALGEBRAIC_HH