27 #ifndef MLN_MORPHO_CLOSING_ALGEBRAIC_HH
28 # define MLN_MORPHO_CLOSING_ALGEBRAIC_HH
34 # include <mln/morpho/includes.hh>
35 # include <mln/morpho/algebraic_filter.hh>
48 template <
typename I,
typename N,
typename A>
50 algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
51 const Accumulator<A>& accu, const mln_result(A)& lambda);
56 # ifndef MLN_INCLUDE_ONLY
59 template <
typename I,
typename N,
typename A>
62 algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
63 const Accumulator<A>& accu, const mln_result(A)& lambda)
65 trace::entering(
"morpho::closing::algebraic");
67 mln_precondition(exact(input).is_valid());
68 mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A),
69 trait::accumulator::when_pix::not_ok)::value);
71 mln_concrete(I) output;
72 output = algebraic_filter(input, nbh, accu, lambda,
75 mln_postcondition(output >= input);
77 trace::exiting("morpho::closing::algebraic");
82 # endif // ! MLN_INCLUDE_ONLY
91 #endif // ! MLN_MORPHO_CLOSING_ALGEBRAIC_HH