26 #ifndef MLN_MORPHO_TREE_FILTER_MIN_HH
27 # define MLN_MORPHO_TREE_FILTER_MIN_HH
29 # include <mln/core/concept/function.hh>
30 # include <mln/morpho/tree/data.hh>
62 template <
typename T,
typename F,
typename P>
65 min(
const T& tree, Image<F>& f_,
const Function_v2b<P>& pred_);
70 # ifndef MLN_INCLUDE_ONLY
72 template <
typename T,
typename F,
typename P>
78 const P& pred = exact(pred_);
80 trace::entering(
"mln::morpho::tree::filter::min");
82 mln_ch_value(F,
bool) mark;
86 mln_dn_node_piter(T) n(tree);
88 if (mark(tree.parent(n)) || !pred(n))
90 f(n) = f(tree.parent(n));
94 trace::exiting(
"mln::morpho::tree::filter::min");
97 # endif // ! MLN_INCLUDE_ONLY
107 #endif // ! MLN_MORPHO_TREE_FILTER_MIN_HH