32 #ifndef MLN_MORPHO_TREE_COMPONENT_TREE_HH
33 # define MLN_MORPHO_TREE_COMPONENT_TREE_HH
35 # include <mln/data/sort_psites.hh>
36 # include <mln/morpho/tree/data.hh>
54 template <
typename I,
typename N>
57 min_tree(
const Image<I>& f,
const Neighborhood<N>& nbh);
66 template <
typename I,
typename N>
69 max_tree(
const Image<I>& f,
const Neighborhood<N>& nbh);
72 # ifndef MLN_INCLUDE_ONLY
74 template <
typename I,
typename N>
79 trace::entering(
"morpho::tree::min_tree");
81 const I& f = exact(f_);
82 const N& nbh = exact(nbh_);
84 mln_precondition(f.is_valid());
85 mln_precondition(nbh.is_valid());
88 typedef data<I,S> tree_t;
91 tree_t tree(f, s, nbh);
93 trace::exiting(
"morpho::tree::min_tree");
97 template <
typename I,
typename N>
102 trace::entering(
"morpho::tree::max_tree");
104 const I& f = exact(f_);
105 const N& nbh = exact(nbh_);
107 mln_precondition(f.is_valid());
108 mln_precondition(nbh.is_valid());
111 typedef data<I,S> tree_t;
114 tree_t tree(f, s, nbh);
116 trace::exiting(
"morpho::tree::max_tree");
120 # endif // ! MLN_INCLUDE_ONLY
128 #endif // !MLN_MORPHO_TREE_COMPONENT_TREE_HH