26 #ifndef MLN_TRANSFORM_DISTANCE_AND_CLOSEST_POINT_GEODESIC_HH
27 # define MLN_TRANSFORM_DISTANCE_AND_CLOSEST_POINT_GEODESIC_HH
33 # include <mln/canvas/distance_geodesic.hh>
34 # include <mln/transform/internal/closest_point_functor.hh>
36 # include <mln/data/fill.hh>
37 # include <mln/util/couple.hh>
57 template <
typename I,
typename N,
typename D>
58 util::couple<mln_ch_value(I,D), mln_ch_value(I,mln_psite(I))>
60 const Neighborhood<N>& nbh,
76 template <
typename P,
typename N,
typename D>
77 util::couple<mln_image_from_grid(mln_grid(P),D),
78 mln_image_from_grid(mln_grid(P),
unsigned)>
80 const box<P>& closest_point_domain,
81 const Neighborhood<N>& nbh,
85 # ifndef MLN_INCLUDE_ONLY
87 template <
typename I,
typename N,
typename D>
89 util::couple<mln_ch_value(I,D), mln_ch_value(I, mln_psite(I))>
94 trace::entering(
"transform::distance_closest_point_geodesic");
96 mln_precondition(exact(input).is_valid());
97 mln_precondition(exact(nbh).is_valid());
99 internal::closest_point_functor_with_sites<I> f;
103 trace::exiting(
"transform::distance_and_closest_point_geodesic");
107 template <
typename P,
typename N,
typename D>
111 const box<P>& closest_point_domain,
115 trace::entering(
"transform::distance_and_closest_point_geodesic");
117 mln_precondition(closest_point_domain.
is_valid());
118 mln_precondition(exact(nbh).is_valid());
119 mln_precondition(
geom::bbox(pset) <= closest_point_domain);
121 typedef mln_image_from_grid(mln_grid(P),
bool) I;
122 internal::closest_point_functor_with_indexes<I> f(pset);
124 I ima(closest_point_domain);
130 trace::exiting(
"transform::distance_and_closest_point_geodesic");
134 # endif // ! MLN_INCLUDE_ONLY
141 #endif // ! MLN_TRANSFORM_DISTANCE_AND_CLOSEST_POINT_GEODESIC_HH