* mln/accu/all.hh,
* mln/accu/essential.hh,
* mln/accu/image/essential.hh,
* mln/accu/site_set/all.hh,
* mln/accu/site_set/essential.hh: update all and essential includes.
* mln/accu/site_set/rectangularity.hh: new accumulator.
* tests/accu/Makefile.am,
* tests/accu/site_set/Makefile.am,
* tests/accu/site_set/rectangularity.cc: add associated test.
---
milena/ChangeLog | 16 +++
milena/mln/accu/all.hh | 1 +
milena/mln/accu/essential.hh | 5 +-
milena/mln/accu/{ => image}/essential.hh | 25 +---
milena/mln/accu/{essential.hh => site_set/all.hh} | 26 +---
milena/mln/accu/{ => site_set}/essential.hh | 25 +---
milena/mln/accu/site_set/rectangularity.hh | 132 ++++++++++++++++++++
milena/tests/accu/Makefile.am | 4 +
milena/tests/accu/site_set/Makefile.am | 10 ++
.../accu/site_set/rectangularity.cc} | 54 +++++----
10 files changed, 218 insertions(+), 80 deletions(-)
copy milena/mln/accu/{ => image}/essential.hh (67%)
copy milena/mln/accu/{essential.hh => site_set/all.hh} (67%)
copy milena/mln/accu/{ => site_set}/essential.hh (67%)
create mode 100644 milena/mln/accu/site_set/rectangularity.hh
create mode 100644 milena/tests/accu/site_set/Makefile.am
copy milena/{mln/accu/essential.hh => tests/accu/site_set/rectangularity.cc} (63%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index be240e1..c68b693 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,21 @@
2009-03-19 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Add accu::site_set::rectangularity.
+
+ * mln/accu/all.hh,
+ * mln/accu/essential.hh,
+ * mln/accu/image/essential.hh,
+ * mln/accu/site_set/all.hh,
+ * mln/accu/site_set/essential.hh: update all and essential includes.
+
+ * mln/accu/site_set/rectangularity.hh: new accumulator.
+
+ * tests/accu/Makefile.am,
+ * tests/accu/site_set/Makefile.am,
+ * tests/accu/site_set/rectangularity.cc: add associated test.
+
+2009-03-19 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Add accu::couple.
* mln/accu/internal/couple.hh: new class.
diff --git a/milena/mln/accu/all.hh b/milena/mln/accu/all.hh
index 5b4e761..0e4d72d 100644
--- a/milena/mln/accu/all.hh
+++ b/milena/mln/accu/all.hh
@@ -96,6 +96,7 @@ namespace mln
// Sub-directories
# include <mln/accu/image/all.hh>
+# include <mln/accu/site_set/all.hh>
#endif // ! MLN_ACCU_ALL_HH
diff --git a/milena/mln/accu/essential.hh b/milena/mln/accu/essential.hh
index e8c57cc..c69540d 100644
--- a/milena/mln/accu/essential.hh
+++ b/milena/mln/accu/essential.hh
@@ -1,4 +1,4 @@
-// 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
@@ -46,5 +46,8 @@
# include <mln/accu/rank.hh>
# include <mln/accu/sum.hh>
+# include <mln/accu/image/essential.hh>
+# include <mln/accu/site_set/essential.hh>
+
#endif // !MLN_ACCU_ESSENTIAL_HH_
diff --git a/milena/mln/accu/essential.hh b/milena/mln/accu/image/essential.hh
similarity index 67%
copy from milena/mln/accu/essential.hh
copy to milena/mln/accu/image/essential.hh
index e8c57cc..9a72225 100644
--- a/milena/mln/accu/essential.hh
+++ b/milena/mln/accu/image/essential.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 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
@@ -25,26 +25,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_ACCU_ESSENTIAL_HH_
-# define MLN_ACCU_ESSENTIAL_HH_
+#ifndef MLN_ACCU_IMAGE_ESSENTIAL_HH_
+# define MLN_ACCU_IMAGE_ESSENTIAL_HH_
-/// \file mln/accu/essential.hh
+/// \file mln/accu/image/essential.hh
///
-/// File that includes the most useful accumulator types.
+/// File that includes the most useful accumulator types working on images.
-# include <mln/accu/bbox.hh>
-# include <mln/accu/center.hh>
-# include <mln/accu/count.hh>
-# include <mln/accu/histo.hh>
-# include <mln/accu/max.hh>
-# include <mln/accu/max_h.hh>
-# include <mln/accu/mean.hh>
-# include <mln/accu/median_h.hh>
-# include <mln/accu/min.hh>
-# include <mln/accu/min_h.hh>
-# include <mln/accu/min_max.hh>
-# include <mln/accu/rank.hh>
-# include <mln/accu/sum.hh>
-#endif // !MLN_ACCU_ESSENTIAL_HH_
+#endif // !MLN_ACCU_IMAGE_ESSENTIAL_HH_
diff --git a/milena/mln/accu/essential.hh b/milena/mln/accu/site_set/all.hh
similarity index 67%
copy from milena/mln/accu/essential.hh
copy to milena/mln/accu/site_set/all.hh
index e8c57cc..03c8dae 100644
--- a/milena/mln/accu/essential.hh
+++ b/milena/mln/accu/site_set/all.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 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
@@ -25,26 +25,14 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_ACCU_ESSENTIAL_HH_
-# define MLN_ACCU_ESSENTIAL_HH_
+#ifndef MLN_ACCU_SITE_SET_ALL_HH_
+# define MLN_ACCU_SITE_SET_ALL_HH_
-/// \file mln/accu/essential.hh
+/// \file mln/accu/site_set/all.hh
///
-/// File that includes the most useful accumulator types.
+/// File that includes all accumulator types working on site sets.
-# include <mln/accu/bbox.hh>
-# include <mln/accu/center.hh>
-# include <mln/accu/count.hh>
-# include <mln/accu/histo.hh>
-# include <mln/accu/max.hh>
-# include <mln/accu/max_h.hh>
-# include <mln/accu/mean.hh>
-# include <mln/accu/median_h.hh>
-# include <mln/accu/min.hh>
-# include <mln/accu/min_h.hh>
-# include <mln/accu/min_max.hh>
-# include <mln/accu/rank.hh>
-# include <mln/accu/sum.hh>
+# include <mln/accu/site_set/rectangularity.hh>
-#endif // !MLN_ACCU_ESSENTIAL_HH_
+#endif // !MLN_ACCU_SITE_SET_ALL_HH_
diff --git a/milena/mln/accu/essential.hh b/milena/mln/accu/site_set/essential.hh
similarity index 67%
copy from milena/mln/accu/essential.hh
copy to milena/mln/accu/site_set/essential.hh
index e8c57cc..feb5a97 100644
--- a/milena/mln/accu/essential.hh
+++ b/milena/mln/accu/site_set/essential.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 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
@@ -25,26 +25,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_ACCU_ESSENTIAL_HH_
-# define MLN_ACCU_ESSENTIAL_HH_
+#ifndef MLN_ACCU_SITE_SET_ESSENTIAL_HH_
+# define MLN_ACCU_SITE_SET_ESSENTIAL_HH_
-/// \file mln/accu/essential.hh
+/// \file mln/accu/site_set/essential.hh
///
-/// File that includes the most useful accumulator types.
+/// File that includes the most useful accumulator types working on site sets.
-# include <mln/accu/bbox.hh>
-# include <mln/accu/center.hh>
-# include <mln/accu/count.hh>
-# include <mln/accu/histo.hh>
-# include <mln/accu/max.hh>
-# include <mln/accu/max_h.hh>
-# include <mln/accu/mean.hh>
-# include <mln/accu/median_h.hh>
-# include <mln/accu/min.hh>
-# include <mln/accu/min_h.hh>
-# include <mln/accu/min_max.hh>
-# include <mln/accu/rank.hh>
-# include <mln/accu/sum.hh>
-#endif // !MLN_ACCU_ESSENTIAL_HH_
+#endif // !MLN_ACCU_SITE_SET_ESSENTIAL_HH_
diff --git a/milena/mln/accu/site_set/rectangularity.hh b/milena/mln/accu/site_set/rectangularity.hh
new file mode 100644
index 0000000..fef5b21
--- /dev/null
+++ b/milena/mln/accu/site_set/rectangularity.hh
@@ -0,0 +1,132 @@
+// Copyright (C) 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
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+
+#ifndef MLN_ACCU_SITE_SET_RECTANGULARITY_HH
+# define MLN_ACCU_SITE_SET_RECTANGULARITY_HH
+
+/// \file mln/accu/site_set/rectangularity.hh
+///
+/// Compute the rectangularity of a site set.
+
+# include <mln/accu/internal/couple.hh>
+# include <mln/accu/bbox.hh>
+# include <mln/accu/count.hh>
+
+namespace mln
+{
+
+ namespace accu
+ {
+
+ namespace site_set
+ {
+
+ /// Compute the rectangularity of a site set.
+ template <typename P>
+ class rectangularity
+ : public accu::internal::couple<accu::bbox<P>,
+ accu::count<P>,
+ float,
+ rectangularity<P> >
+ {
+
+ public:
+
+ typedef accu::internal::couple<accu::bbox<P>,
+ accu::count<P>,
+ float,
+ rectangularity<P> > super_;
+
+ typedef accu::bbox<P> A1;
+ typedef accu::count<P> A2;
+
+ typedef float result;
+
+ /// Constructor
+ rectangularity();
+
+ /// Return the site set bounding box.
+ mln_result(A1) bbox() const;
+ /// Return the site set area.
+ mln_result(A2) area() const;
+
+ /// Return the rectangularity value.
+ result to_result() const;
+
+ protected:
+ using super_::a1_;
+ using super_::a2_;
+
+ };
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename P>
+ inline
+ rectangularity<P>::rectangularity()
+ {
+ }
+
+ template <typename P>
+ inline
+ mln_result(rectangularity<P>::A1)
+ rectangularity<P>::bbox() const
+ {
+ mln_precondition(a1_.is_valid());
+ return a1_.to_result();
+ }
+
+ template <typename P>
+ inline
+ mln_result(rectangularity<P>::A2)
+ rectangularity<P>::area() const
+ {
+ mln_precondition(a2_.is_valid());
+ return a2_.to_result();
+ }
+
+ template <typename P>
+ inline
+ mln_result(rectangularity<P>)
+ rectangularity<P>::to_result() const
+ {
+ mln_precondition(this->is_valid());
+ // Force division return type.
+ return static_cast<result>(a2_.to_result()) / a1_.to_result().nsites();
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::accu::site_set
+
+ } // end of namespace mln::accu
+
+} // end of namespace mln
+
+#endif // ! MLN_ACCU_SITE_SET_RECTANGULARITY_HH
diff --git a/milena/tests/accu/Makefile.am b/milena/tests/accu/Makefile.am
index fafbec1..7aca2bd 100644
--- a/milena/tests/accu/Makefile.am
+++ b/milena/tests/accu/Makefile.am
@@ -2,6 +2,10 @@
include $(top_srcdir)/milena/tests/tests.mk
+SUBDIRS = \
+ image \
+ site_set
+
check_PROGRAMS = \
all_accus \
bbox \
diff --git a/milena/tests/accu/site_set/Makefile.am b/milena/tests/accu/site_set/Makefile.am
new file mode 100644
index 0000000..042cf00
--- /dev/null
+++ b/milena/tests/accu/site_set/Makefile.am
@@ -0,0 +1,10 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS = \
+ rectangularity
+
+rectangularity_SOURCES = rectangularity.cc
+
+TESTS = $(check_PROGRAMS)
diff --git a/milena/mln/accu/essential.hh b/milena/tests/accu/site_set/rectangularity.cc
similarity index 63%
copy from milena/mln/accu/essential.hh
copy to milena/tests/accu/site_set/rectangularity.cc
index e8c57cc..22e1e3e 100644
--- a/milena/mln/accu/essential.hh
+++ b/milena/tests/accu/site_set/rectangularity.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,26 +25,36 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_ACCU_ESSENTIAL_HH_
-# define MLN_ACCU_ESSENTIAL_HH_
-
-/// \file mln/accu/essential.hh
+/// \file tests/accu/site_set/rectangularity.hh
///
-/// File that includes the most useful accumulator types.
-
-# include <mln/accu/bbox.hh>
-# include <mln/accu/center.hh>
-# include <mln/accu/count.hh>
-# include <mln/accu/histo.hh>
-# include <mln/accu/max.hh>
-# include <mln/accu/max_h.hh>
-# include <mln/accu/mean.hh>
-# include <mln/accu/median_h.hh>
-# include <mln/accu/min.hh>
-# include <mln/accu/min_h.hh>
-# include <mln/accu/min_max.hh>
-# include <mln/accu/rank.hh>
-# include <mln/accu/sum.hh>
-
-#endif // !MLN_ACCU_ESSENTIAL_HH_
+/// Tests on mln::accu::site_set::rectangularity.
+
+
+#include <mln/core/alias/point2d.hh>
+#include <mln/core/alias/box2d.hh>
+
+#include <mln/accu/site_set/rectangularity.hh>
+
+int main()
+{
+ using namespace mln;
+
+ {
+ accu::site_set::rectangularity<point2d> accu;
+ accu.take_as_init(point2d(0,0));
+ accu.take(point2d(0,1));
+ accu.take(point2d(1,0));
+ accu.take(point2d(1,1));
+
+ mln_assertion(accu.to_result() == 1);
+ }
+
+ {
+ accu::site_set::rectangularity<point2d> accu;
+ accu.take(point2d(0,0));
+ accu.take(point2d(1,1));
+ std::cout << accu << std::endl;
+ mln_assertion(accu.to_result() == 0.5f);
+ }
+}
--
1.5.6.5
* mln/accu/internal/couple.hh: new class.
---
milena/ChangeLog | 6 +
milena/mln/accu/internal/couple.hh | 184 ++++++++++++++++++++++++++++++++++++
2 files changed, 190 insertions(+), 0 deletions(-)
create mode 100644 milena/mln/accu/internal/couple.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5944d9b..be240e1 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-19 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Add accu::couple.
+
+ * mln/accu/internal/couple.hh: new class.
+
2009-03-18 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
Add transform::distance_and_influence_zone_geodesic.
diff --git a/milena/mln/accu/internal/couple.hh b/milena/mln/accu/internal/couple.hh
new file mode 100644
index 0000000..d4678a6
--- /dev/null
+++ b/milena/mln/accu/internal/couple.hh
@@ -0,0 +1,184 @@
+// Copyright (C) 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
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_ACCU_INTERNAL_COUPLE_HH
+# define MLN_ACCU_INTERNAL_COUPLE_HH
+
+/// \file mln/accu/couple.hh
+///
+/// Base implementation of a couple of accumulators.
+
+# include <utility>
+
+# include <mln/core/concept/accumulator.hh>
+# include <mln/accu/internal/base.hh>
+
+# include <mln/metal/equal.hh>
+
+
+namespace mln
+{
+
+ namespace accu
+ {
+
+ namespace internal
+ {
+
+ /// Base implementation of a couple of accumulators.
+ ///
+ /// The parameter \c T is the type of values.
+ ///
+ /// \todo Check that, when T is not provided, A1 and A2 have the same value.
+ template <typename A1, typename A2, typename R, typename E>
+ struct couple
+ : base<R,E>,
+ mlc_equal(mln_argument(A1), mln_argument(A2))::check_t
+ {
+ typedef mln_argument(A1) argument;
+
+ /// Manipulators.
+ /// \{
+ void init();
+ void take_as_init(const argument& t);
+ void take(const argument& t);
+ void take(const E& other);
+ /// \}
+
+ /// Check whether this accu is able to return a result.
+ /// Always true here.
+ bool is_valid() const;
+
+ A1& first();
+ A2& second();
+ const A1& first() const;
+ const A2& second() const;
+
+ protected:
+ couple();
+
+ A1 a1_;
+ A2 a2_;
+ };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ couple<A1,A2,R,E>::couple()
+ {
+ init();
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ void
+ couple<A1,A2,R,E>::init()
+ {
+ a1_.init();
+ a2_.init();
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ void
+ couple<A1,A2,R,E>::take_as_init(const argument& t)
+ {
+ a1_.take_as_init(t);
+ a2_.take_as_init(t);
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ void
+ couple<A1,A2,R,E>::take(const argument& t)
+ {
+ a1_.take(t);
+ a2_.take(t);
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ void
+ couple<A1,A2,R,E>::take(const E& other)
+ {
+ a1_.take(other.a1_);
+ a2_.take(other.a2_);
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ bool
+ couple<A1,A2,R,E>::is_valid() const
+ {
+ return a1_.is_valid() && a2_.is_valid();
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ A1&
+ couple<A1,A2,R,E>::first()
+ {
+ return a1_;
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ const A1&
+ couple<A1,A2,R,E>::first() const
+ {
+ return a1_;
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ A2&
+ couple<A1,A2,R,E>::second()
+ {
+ return a2_;
+ }
+
+ template <typename A1, typename A2, typename R, typename E>
+ inline
+ const A2&
+ couple<A1,A2,R,E>::second() const
+ {
+ return a2_;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::accu::internal
+
+ } // end of namespace mln::accu
+
+} // end of namespace mln
+
+
+#endif // ! MLN_ACCU_INTERNAL_COUPLE_HH
--
1.5.6.5
* mln/transform/all.hh: include new file.
* mln/transform/distance_and_influence_zone_geodesic.hh: new routine.
---
milena/ChangeLog | 8 ++
milena/mln/transform/all.hh | 4 +-
.../distance_and_influence_zone_geodesic.hh | 96 ++++++++++++++++++++
3 files changed, 107 insertions(+), 1 deletions(-)
create mode 100644 milena/mln/transform/distance_and_influence_zone_geodesic.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 2d33b38..5944d9b 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,11 @@
+2009-03-18 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Add transform::distance_and_influence_zone_geodesic.
+
+ * mln/transform/all.hh: include new file.
+
+ * mln/transform/distance_and_influence_zone_geodesic.hh: new routine.
+
2009-03-19 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Add meta-code to access component types of value types.
diff --git a/milena/mln/transform/all.hh b/milena/mln/transform/all.hh
index 4967197..7d6ef27 100644
--- a/milena/mln/transform/all.hh
+++ b/milena/mln/transform/all.hh
@@ -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
@@ -43,6 +44,7 @@ namespace mln
# include <mln/transform/distance_and_closest_point_geodesic.hh>
+# include <mln/transform/distance_and_influence_zone_geodesic.hh>
# include <mln/transform/distance_front.hh>
# include <mln/transform/distance_geodesic.hh>
# include <mln/transform/influence_zone_front.hh>
diff --git a/milena/mln/transform/distance_and_influence_zone_geodesic.hh b/milena/mln/transform/distance_and_influence_zone_geodesic.hh
new file mode 100644
index 0000000..f461d30
--- /dev/null
+++ b/milena/mln/transform/distance_and_influence_zone_geodesic.hh
@@ -0,0 +1,96 @@
+// 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
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_TRANSFORM_DISTANCE_AND_INFLUENCE_ZONE_GEODESIC_HH
+# define MLN_TRANSFORM_DISTANCE_AND_INFLUENCE_ZONE_GEODESIC_HH
+
+/// \file mln/transform/distance_and_influence_zone_geodesic.hh
+///
+/// Distance and geodesic closest point transform.
+
+# include <mln/canvas/distance_geodesic.hh>
+# include <mln/transform/internal/influence_zone_functor.hh>
+
+# include <mln/data/fill.hh>
+# include <mln/util/couple.hh>
+
+
+namespace mln
+{
+
+ namespace transform
+ {
+
+ /// Discrete geodesic distance transform
+ ///
+ /// \param[in] input Image from which the geodesic distance is computed.
+ /// \param[in] nbh Neighborhood
+ /// \param[in] max Max distance of propagation.
+ ///
+ /// \return a couple of images. The first one is the distance map and the
+ /// second one is the closest point image. The closest point image
+ /// contains sites.
+ ///
+ /// \post The returned images have the same domain as \p input.
+ template <typename I, typename N, typename D>
+ util::couple<mln_ch_value(I,D), I>
+ distance_and_influence_zone_geodesic(const Image<I>& input,
+ const Neighborhood<N>& nbh,
+ D max);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename I, typename N, typename D>
+ inline
+ util::couple<mln_ch_value(I,D), I>
+ distance_and_influence_zone_geodesic(const Image<I>& input,
+ const Neighborhood<N>& nbh,
+ D max)
+ {
+ trace::entering("transform::distance_influence_zone_geodesic");
+
+ mln_precondition(exact(input).is_valid());
+ mln_precondition(exact(nbh).is_valid());
+
+ internal::influence_zone_functor<I> f;
+ mln_ch_value(I,D) dmap = mln::canvas::distance_geodesic(input, nbh,
+ max, f);
+
+ trace::exiting("transform::distance_and_influence_zone_geodesic");
+ return make::couple(dmap, f.output);
+ }
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::transform
+
+} // end of namespace mln
+
+
+#endif // ! MLN_TRANSFORM_DISTANCE_AND_INFLUENCE_ZONE_GEODESIC_HH
--
1.5.6.5