3481: Add fastest version for thick front distance transform.

https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Add fastest version for thick front distance transform. * mln/core/concept/weighted_window.hh (mln_is_simple_weighted_window): New. * sandbox/folio/distance_front_new.hh: Copy to and rename as... * mln/canvas/distance_front.hh: ...this. Update doc. (distance_front_dispatch): Fix missing test. canvas/distance_front.hh | 10 ++++++---- core/concept/weighted_window.hh | 10 ++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) Index: mln/core/concept/weighted_window.hh --- mln/core/concept/weighted_window.hh (revision 3480) +++ mln/core/concept/weighted_window.hh (working copy) @@ -1,5 +1,5 @@ -// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory -// (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -40,6 +40,12 @@ # include <mln/trait/windows.hh> + +# define mln_is_simple_weighted_window(W) \ + mln_is_simple_window(typename W::window) + + + namespace mln { Index: mln/canvas/distance_front.hh --- mln/canvas/distance_front.hh (revision 3480) +++ mln/canvas/distance_front.hh (working copy) @@ -1,4 +1,5 @@ -// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory +// (LRDE) // // This file is part of the Olena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -30,7 +31,7 @@ /// \file mln/canvas/distance_front.hh /// -/// Discrete distance canvas by front propagation. +/// Canvas of discrete distance computation by thick front propagation. # include <vector> # include <mln/core/concept/image.hh> @@ -47,7 +48,7 @@ namespace canvas { - /// Discrete front distance canvas. + /// Canvas of discrete distance computation by thick front propagation. template <typename I, typename N, typename W, typename D, typename F> @@ -360,7 +361,6 @@ D max, F& functor) { return impl::distance_front_fastest(input, nbh, w_win, max, functor); - // return impl::generic::distance_front(input, nbh, w_win, max, functor); } template <typename I, @@ -377,6 +377,8 @@ trait::image::speed::fastest)::value && mln_is_simple_neighborhood(N)::value + && + mln_is_simple_weighted_window(W)::value }; return distance_front_dispatch(metal::bool_<test>(), input, nbh, w_win, max, functor); Property changes on: mln/canvas/distance_front.hh ___________________________________________________________________ Added: svn:mergeinfo
participants (1)
-
Thierry Geraud