26 #ifndef MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH
27 # define MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH
29 # include <mln/core/concept/function.hh>
30 # include <mln/fun/ops.hh>
32 # include <mln/morpho/tree/data.hh>
33 # include <mln/morpho/tree/propagate_if.hh>
64 template <
typename T,
typename F,
typename P>
67 subtractive(
const T& tree, Image<F>& f_,
const Function_v2b<P>& pred_);
72 # ifndef MLN_INCLUDE_ONLY
74 template <
typename T,
typename F,
typename P>
80 const P& pred = exact(pred_);
82 trace::entering(
"mln::morpho::tree::filter::subtractive");
86 mln_up_node_piter(T) n(tree);
89 f(n) = f(tree.parent(n));
91 trace::exiting(
"mln::morpho::tree::filter::subtractive");
94 # endif // ! MLN_INCLUDE_ONLY
101 #endif // ! MLN_MORPHO_TREE_FILTER_SUBTRACTIVE_HH