26 #ifndef MLN_CONVERT_TO_P_SET_HH
27 # define MLN_CONVERT_TO_P_SET_HH
35 # include <mln/core/concept/neighborhood.hh>
36 # include <mln/core/concept/window.hh>
37 # include <mln/core/concept/point_site.hh>
38 # include <mln/core/site_set/p_set.hh>
39 # include <mln/pw/image.hh>
40 # include <mln/pw/cst.hh>
41 # include <mln/metal/templated_by.hh>
42 # include <mln/metal/is_a.hh>
54 to_p_set(
const Neighborhood<N>& nbh);
68 template <
typename P,
typename C>
78 # ifndef MLN_INCLUDE_ONLY
83 to_p_set(
const Neighborhood<N>& nbh_)
86 typedef mln_psite(N) P;
88 mln_niter(N) n(nbh, P::origin);
99 const I& ima =
exact(ima_);
100 mln_precondition(ima.is_valid());
105 typedef mln_psite(I) P;
107 mln_piter(I)
p(ima.domain());
114 template <typename W>
119 typedef mln_psite(W) P;
121 mln_qiter(W) q(
exact(win), P::origin);
127 template <typename P, typename C>
133 mln::metal::is_a<P, Site>::check();
135 for (
typename std::set<P, C>::const_iterator i = s.begin();
141 template <
typename S>
146 const S& ps =
exact(ps_);
147 p_set<mln_psite(S)> tmp;
154 # endif // ! MLN_INCLUDE_ONLY
161 #endif // ! MLN_CONVERT_TO_P_SET_HH