30 #ifndef MLN_MORPHO_TREE_DUAL_INPUT_TREE_HH
31 # define MLN_MORPHO_TREE_DUAL_INPUT_TREE_HH
33 # include <mln/data/sort_psites.hh>
35 # include <mln/morpho/tree/data.hh>
36 # include <mln/morpho/tree/impl/dual_union_find.hh>
37 # include <mln/morpho/tree/impl/dual_hqueue.hh>
56 template <
typename I,
typename N>
61 const Neighborhood<N>& nbh);
64 # ifndef MLN_INCLUDE_ONLY
69 template <
typename I,
typename N>
72 dual_input_max_tree_dispatch(trait::image::quant::any,
77 typedef p_array<mln_psite(I)> S;
83 tree_t tree = impl::generic::dual_union_find(f, m, s_f, s_m, nbh);
87 template <
typename I,
typename N>
90 dual_input_max_tree_dispatch(trait::image::quant::low,
95 typedef p_array<mln_psite(I)> S;
98 tree_t tree = impl::dual_hqueue(f, m, nbh);
106 template <
typename I,
typename N>
108 morpho::tree::data< I, p_array<mln_psite(I)> >
113 trace::entering(
"morpho::tree::dual_input_max_tree");
115 const I& f = exact(f_);
116 const I& m = exact(m_);
117 const N& nbh = exact(nbh_);
119 mln_precondition(f.is_valid());
120 mln_precondition(m.is_valid());
121 mln_precondition(nbh.is_valid());
122 mln_precondition(f.domain() == m.domain());
125 typedef data<I,S> tree_t;
127 tree_t tree = internal::dual_input_max_tree_dispatch(mln_trait_image_quant(I)(), f, m, nbh);
129 trace::exiting(
"morpho::tree::dual_input_max_tree");
137 # endif // ! MLN_INCLUDE_ONLY
146 #endif // !MLN_MORPHO_TREE_DUAL_INPUT_TREE_HH