26 #ifndef MLN_GRAPH_TO_NEIGHB_HH
27 # define MLN_GRAPH_TO_NEIGHB_HH
33 # include <mln/core/concept/image.hh>
34 # include <mln/core/image/graph_elt_neighborhood_if.hh>
48 template <
typename I,
typename M>
49 graph_elt_neighborhood_if<mln_graph(I), mln_domain(I), M>
50 to_neighb(
const Image<I>& graph_image_,
const Image<M>& graph_mask_image_);
53 # ifndef MLN_INCLUDE_ONLY
55 template <
typename I,
typename M>
56 graph_elt_neighborhood_if<mln_graph(I), mln_domain(I), M>
57 to_neighb(
const Image<I>& graph_image_,
const Image<M>& graph_mask_image_)
59 mln_trace(
"graph::to_neighb");
61 const I& graph_image =
exact(graph_image_);
62 const M& graph_mask_image =
exact(graph_mask_image_);
64 mln_precondition(graph_image.is_valid());
65 mln_precondition(graph_mask_image.is_valid());
66 mlc_equal(mln_value(M),
bool)::check();
68 typedef graph_elt_neighborhood_if<mln_graph(I), mln_domain(I), M> nbh_t;
69 nbh_t
nbh(graph_mask_image);
74 # endif // ! MLN_INCLUDE_ONLY
81 #endif // ! MLN_GRAPH_TO_NEIGHB_HH