
* mln/canvas/morpho/attribute_filter.hh: add a missing inline. * mln/registration/icp.hh: fix compilation issues. * tests/registration/registration.cc: enlarge the closest_point image bbox. * tests/transform/bench_closest_point_geodesic.cc: Update call to distance_and_closest_point_geodesic. * tests/transform/distance_and_closest_point_geodesic.cc: fix reference resut. --- milena/ChangeLog | 17 +++++++++++++++++ milena/mln/canvas/morpho/attribute_filter.hh | 1 + milena/mln/registration/icp.hh | 4 ++-- milena/tests/registration/registration.cc | 3 +-- .../transform/bench_closest_point_geodesic.cc | 13 ++++++------- .../distance_and_closest_point_geodesic.cc | 19 ++++++++++--------- 6 files changed, 37 insertions(+), 20 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 8cc165f..c8d86e9 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,3 +1,20 @@ +2009-03-05 Guillaume Lazzara <lazzara@lrde.epita.fr> + + Fix tests. + + * mln/canvas/morpho/attribute_filter.hh: add a missing inline. + + * mln/registration/icp.hh: fix compilation issues. + + * tests/registration/registration.cc: enlarge the closest_point image + bbox. + + * tests/transform/bench_closest_point_geodesic.cc: Update call to + distance_and_closest_point_geodesic. + + * tests/transform/distance_and_closest_point_geodesic.cc: fix + reference resut. + 2009-03-04 Etienne FOLIO <folio@lrde.epita.fr> New fast front propagation. diff --git a/milena/mln/canvas/morpho/attribute_filter.hh b/milena/mln/canvas/morpho/attribute_filter.hh index 298c236..4d21f9c 100644 --- a/milena/mln/canvas/morpho/attribute_filter.hh +++ b/milena/mln/canvas/morpho/attribute_filter.hh @@ -446,6 +446,7 @@ namespace mln // Facade. template <typename I, typename N, typename A> + inline mln_concrete(I) attribute_filter(const Image<I>& input, const Neighborhood<N>& nbh, diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh index 6adc0b3..17eebff 100644 --- a/milena/mln/registration/icp.hh +++ b/milena/mln/registration/icp.hh @@ -197,8 +197,8 @@ namespace mln mln_piter(I) pi(cp_ima_.domain()); for_all(pi) { - debug(pi) = debug(cp_ima_(pi)); - debug2(pi) = debug2(cp_ima_(pi)); + debug(pi) = debug(X[cp_ima_(pi)]); + debug2(pi) = debug2(X[cp_ima_(pi)]); } io::pbm::save(slice(debug2,0), "debug2-b.ppm"); diff --git a/milena/tests/registration/registration.cc b/milena/tests/registration/registration.cc index 9433f5a..16d23c4 100644 --- a/milena/tests/registration/registration.cc +++ b/milena/tests/registration/registration.cc @@ -56,8 +56,7 @@ int main() arr_t arr2 = convert::to<arr_t>(img2); box3d bbox = img2.bbox(); - bbox.enlarge(1, 10); - bbox.enlarge(2, 10); + bbox.enlarge(10); registration::registration1(bbox, arr1, arr2); //FIXME: Auto test result } diff --git a/milena/tests/transform/bench_closest_point_geodesic.cc b/milena/tests/transform/bench_closest_point_geodesic.cc index 06a6b44..b92b690 100644 --- a/milena/tests/transform/bench_closest_point_geodesic.cc +++ b/milena/tests/transform/bench_closest_point_geodesic.cc @@ -35,9 +35,9 @@ #include <mln/core/alias/neighb3d.hh> #include <mln/data/fill.hh> #include <mln/opt/at.hh> -#include <mln/transform/closest_point_geodesic.hh> +#include <mln/transform/distance_and_closest_point_geodesic.hh> #include <mln/value/int_u8.hh> - +#include <mln/util/couple.hh> int main() { @@ -56,9 +56,8 @@ int main() std::rand() % nrows, std::rand() % ncols) = true; - trace::quiet = false; - - image3d<point3d> output = transform::closest_point_geodesic(input, - c6(), - mln_max(unsigned)); + util::couple<image3d<unsigned>, image3d<point3d> > output = + transform::distance_and_closest_point_geodesic(input, + c6(), + mln_max(unsigned)); } diff --git a/milena/tests/transform/distance_and_closest_point_geodesic.cc b/milena/tests/transform/distance_and_closest_point_geodesic.cc index d3544ab..368256b 100644 --- a/milena/tests/transform/distance_and_closest_point_geodesic.cc +++ b/milena/tests/transform/distance_and_closest_point_geodesic.cc @@ -51,15 +51,16 @@ unsigned dmap_ref[] = { 4, 4, 4, 3, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 }; -unsigned cp_idx_ref[] = { 0 , 0 , 82 , 82 , 82 , 82, 82, 0 , 0 , - 0 , 82 , 82 , 82 , 82 , 82, 82, 82, 0 , - 110, 82 , 82 , 82 , 82 , 82, 82, 82, 82, - 110, 110, 110, 82 , 82 , 82, 82, 82, 0 , - 110, 110, 110, 110, 82 , 82, 82, 0 , 0 , - 110, 110, 110, 110, 82 , 82, 0 , 0 , 0 , - 110, 110, 110, 110, 110, 0 , 0 , 0 , 0 , - 0 , 110, 110, 110, 0 , 0 , 0 , 0 , 0 , - 0 , 0 , 110, 0 , 0 , 0 , 0 , 0 , 0 }; +unsigned cp_idx_ref[] = { 2, 2, 0, 0, 0, 0, 0, 2, 2, + 2, 0, 0, 0, 0, 0, 0, 0, 2, + 1, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 0, 0, 0, 0, 0, 2, + 1, 1, 1, 1, 0, 0, 0, 2, 2, + 1, 1, 1, 1, 0, 0, 2, 2, 2, + 1, 1, 1, 1, 1, 2, 2, 2, 2, + 2, 1, 1, 1, 2, 2, 2, 2, 2, + 2, 2, 1, 2, 2, 2, 2, 2, 2 }; + int main() { -- 1.5.6.5
participants (1)
-
Guillaume Lazzara