26 #ifndef MLN_MORPHO_TREE_FILTER_MAX_HH
27 # define MLN_MORPHO_TREE_FILTER_MAX_HH
29 # include <mln/core/concept/function.hh>
30 # include <mln/morpho/tree/data.hh>
61 template <
typename T,
typename F,
typename P>
64 max(
const T& tree, Image<F>& f_,
const Function_v2b<P>& pred_);
69 # ifndef MLN_INCLUDE_ONLY
71 template <
typename T,
typename F,
typename P>
77 const P& pred = exact(pred_);
79 trace::entering(
"mln::morpho::tree::filter::max");
81 mln_ch_value(F,
bool) mark;
86 mln_up_node_piter(T) n(tree);
89 mark(tree.parent(n)) =
false;
92 mark(tree.parent(n)) =
false;
98 mln_dn_node_piter(T) n(tree);
101 f(n) = f(tree.parent(n));
104 trace::exiting(
"mln::morpho::tree::filter::max");
107 # endif // ! MLN_INCLUDE_ONLY
117 #endif // ! MLN_MORPHO_TREE_FILTER_MAX_HH