4147: Small fixes.

* mln/core/image/imorph/labeled_image.hh: add bboxes() and subdomain() members. * mln/morpho/tree/compute_attribute_image.hh: re-indent. * mln/registration/registration.hh: remove deprecated fixmes. * tests/accu/stat/max.cc, * tests/accu/stat/max_h.cc, * tests/accu/stat/min.cc, * tests/accu/stat/min_h.cc, * tests/accu/stat/min_max.cc: add missing '\file' doxygen command. --- milena/ChangeLog | 17 ++++++++ milena/mln/core/image/imorph/labeled_image.hh | 42 ++++++++++++--------- milena/mln/morpho/tree/compute_attribute_image.hh | 6 +- milena/mln/registration/registration.hh | 3 - milena/tests/accu/stat/max.cc | 7 +++- milena/tests/accu/stat/max_h.cc | 7 +++- milena/tests/accu/stat/min.cc | 4 ++ milena/tests/accu/stat/min_h.cc | 7 +++- milena/tests/accu/stat/min_max.cc | 7 +++- 9 files changed, 72 insertions(+), 28 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 7267a17..7e22f55 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,22 @@ 2009-06-15 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr> + Small fixes. + + * mln/core/image/imorph/labeled_image.hh: add bboxes() and subdomain() + members. + + * mln/morpho/tree/compute_attribute_image.hh: re-indent. + + * mln/registration/registration.hh: remove deprecated fixmes. + + * tests/accu/stat/max.cc, + * tests/accu/stat/max_h.cc, + * tests/accu/stat/min.cc, + * tests/accu/stat/min_h.cc, + * tests/accu/stat/min_max.cc: add missing '\file' doxygen command. + +2009-06-15 Guillaume Lazzara <guillaume.lazzara@lrde.epita.fr> + Fix few dependencies related to the documentation. * doc/Makefile.am: convert reference figure to the right format before diff --git a/milena/mln/core/image/imorph/labeled_image.hh b/milena/mln/core/image/imorph/labeled_image.hh index 9185b6b..da11df3 100644 --- a/milena/mln/core/image/imorph/labeled_image.hh +++ b/milena/mln/core/image/imorph/labeled_image.hh @@ -45,6 +45,9 @@ # include <mln/util/array.hh> +# include <mln/pw/cst.hh> +# include <mln/pw/value.hh> + # ifndef NDEBUG # include <mln/accu/stat/max.hh> # include <mln/data/compute.hh> @@ -175,14 +178,13 @@ namespace mln /// Return the bounding box of the component \p label. const bbox_t& bbox(const mln_value(I)& label) const; - const util::array<bbox_t>& bboxes() const - { - return this->data_->bboxes_; - } + /// Return the component bounding boxes. + const util::array<bbox_t>& bboxes() const; /// Return the domain of the component with label \p label. - /// This is an optimized version. -// p_if<mln_psite(I)> domain(const mln_value(I)& label) const; + p_if<mln_box(I), + fun::eq_v2b_expr_<pw::value_<I>, pw::cst_<mln_value(I)> > > + subdomain(const mln_value(I)& label) const; }; @@ -348,18 +350,22 @@ namespace mln } -// template <typename I, typename V, typename E> -//// p_if<mln_psite(I)> -// unsigned -// extended_impl_selector<I, -// accu::pair<accu::shape::bbox<mln_psite(I)>, -// accu::center<mln_psite(I),V> >, -// E>::domain(const mln_value(I)& label) const -// { -// const E& ima = internal::force_exact<E>(*this); -// return ((ima.hook_data_() | bbox(label)) -// | (pw::value(ima.hook_data_()) == pw::cst(label))).domain(); -// } + template <typename I> + const util::array<typename labeled_image<I>::bbox_t>& + labeled_image<I>::bboxes() const + { + return this->data_->bboxes_; + } + + + template <typename I> + p_if<mln_box(I), + fun::eq_v2b_expr_<pw::value_<I>, pw::cst_<mln_value(I)> > > + labeled_image<I>::subdomain(const mln_value(I)& label) const + { + return ((this->data_->ima_ | bbox(label)) + | (pw::value(this->data_->ima_) == pw::cst(label))).domain(); + } // Make routines. diff --git a/milena/mln/morpho/tree/compute_attribute_image.hh b/milena/mln/morpho/tree/compute_attribute_image.hh index d28a1a8..d388866 100644 --- a/milena/mln/morpho/tree/compute_attribute_image.hh +++ b/milena/mln/morpho/tree/compute_attribute_image.hh @@ -78,9 +78,9 @@ namespace mln */ template <typename A, typename T> mln_ch_value(typename T::function, mln_result(A)) - compute_attribute_image(const Accumulator<A>& a, - const T& t, - mln_ch_value(typename T::function, A)* accu_image = 0); + compute_attribute_image(const Accumulator<A>& a, + const T& t, + mln_ch_value(typename T::function, A)* accu_image = 0); diff --git a/milena/mln/registration/registration.hh b/milena/mln/registration/registration.hh index a141a78..dd03d97 100644 --- a/milena/mln/registration/registration.hh +++ b/milena/mln/registration/registration.hh @@ -50,7 +50,6 @@ namespace mln using namespace mln::fun::x2x; - //FIXME: move to registration.hh /// Call ICP once and return the resulting transformation. template <typename P> inline @@ -59,7 +58,6 @@ namespace mln const p_array<P>& P_, const p_array<P>& X); - //FIXME: move to registration.hh /// Call ICP 10 times. /// Do the first call to ICP with all sites then work on a subset of /// which size is decreasing. @@ -74,7 +72,6 @@ namespace mln const p_array<P>& P_, const p_array<P>& X); - //FIXME: move to registration.hh /// Call ICP 10 times. /// Do the first call to ICP with all sites then work on a subset. /// For each call, a distance criterion is computed on a subset. diff --git a/milena/tests/accu/stat/max.cc b/milena/tests/accu/stat/max.cc index d988ff5..3a9d495 100644 --- a/milena/tests/accu/stat/max.cc +++ b/milena/tests/accu/stat/max.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -23,6 +24,10 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file +/// +/// Tests on mln::accu::max. + #include <mln/core/image/image2d.hh> #include <mln/debug/iota.hh> diff --git a/milena/tests/accu/stat/max_h.cc b/milena/tests/accu/stat/max_h.cc index 886714e..d338b6d 100644 --- a/milena/tests/accu/stat/max_h.cc +++ b/milena/tests/accu/stat/max_h.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -23,6 +24,10 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file +/// +/// \brief Tests on mln::accu::max_h. + #include <mln/value/int_u8.hh> #include <mln/accu/stat/max_h.hh> diff --git a/milena/tests/accu/stat/min.cc b/milena/tests/accu/stat/min.cc index 4f82ddb..6236a98 100644 --- a/milena/tests/accu/stat/min.cc +++ b/milena/tests/accu/stat/min.cc @@ -23,6 +23,10 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file +/// +/// \brief Tests on mln::accu::min. + #include <mln/core/image/image2d.hh> #include <mln/debug/iota.hh> diff --git a/milena/tests/accu/stat/min_h.cc b/milena/tests/accu/stat/min_h.cc index 058d71e..f92dd26 100644 --- a/milena/tests/accu/stat/min_h.cc +++ b/milena/tests/accu/stat/min_h.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -23,6 +24,10 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file +/// +/// \brief Tests on mln::accu::min_h. + #include <mln/value/int_u8.hh> #include <mln/accu/stat/min_h.hh> diff --git a/milena/tests/accu/stat/min_max.cc b/milena/tests/accu/stat/min_max.cc index 9e852df..ebf93e9 100644 --- a/milena/tests/accu/stat/min_max.cc +++ b/milena/tests/accu/stat/min_max.cc @@ -1,4 +1,5 @@ -// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE) +// Copyright (C) 2007, 2008, 2009 EPITA Research and Development +// Laboratory (LRDE) // // This file is part of Olena. // @@ -23,6 +24,10 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. +/// \file +/// +/// \brief Tests on mln::accu::stat::min_max. + #include <mln/value/builtin/integers.hh> #include <mln/accu/stat/min_max.hh> -- 1.5.6.5
participants (1)
-
Guillaume Lazzara