Olena-patches
  Threads by month 
                
            - ----- 2025 -----
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2024 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2023 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2022 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2021 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2020 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2019 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2018 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2017 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2016 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2015 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2014 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2013 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2012 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2011 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2010 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2009 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2008 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2007 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2006 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2005 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 - February
 - January
 - ----- 2004 -----
 - December
 - November
 - October
 - September
 - August
 - July
 - June
 - May
 - April
 - March
 
November 2008
- 14 participants
 - 266 discussions
 
                    
                        https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from  Thierry Geraud  <thierry.geraud(a)lrde.epita.fr>
	Update logical binary routines.
	* mln/trait/op/all.hh (include): Remove duplicate.
	* mln/fun/vv2v/lxor.hh: New.
	* mln/fun/vv2v/lor.hh: New.
	* mln/fun/vv2v/land_not.hh: New.
	* mln/fun/vv2v/all.hh: Update.
	* mln/logical/or.hh,
	* mln/logical/and_not.hh,
	* mln/logical/and.hh: Rely on level transform.
	* mln/logical/or.spe.hh,
	* mln/logical/and_not.spe.hh: Remove; obsolete.
	* mln/logical/xor.hh: New.
	* mln/logical/all.hh: Update.
	* tests/logical/xor.cc: New.
	* tests/logical/Makefile.am: Update.
 mln/fun/vv2v/all.hh       |    3 +
 mln/fun/vv2v/land_not.hh  |   23 ++++++-----
 mln/fun/vv2v/lor.hh       |   24 ++++++------
 mln/fun/vv2v/lxor.hh      |   26 +++++++------
 mln/logical/all.hh        |    1 
 mln/logical/and.hh        |    2 -
 mln/logical/and_not.hh    |   70 +++++++++++------------------------
 mln/logical/or.hh         |   68 ++++++++++------------------------
 mln/logical/xor.hh        |   92 ++++++++++++++++------------------------------
 mln/trait/op/all.hh       |    1 
 tests/logical/Makefile.am |    4 +-
 tests/logical/xor.cc      |   24 ++++++------
 12 files changed, 133 insertions(+), 205 deletions(-)
Index: tests/logical/Makefile.am
--- tests/logical/Makefile.am	(revision 2867)
+++ tests/logical/Makefile.am	(working copy)
@@ -7,12 +7,14 @@
   and						\
   and_not					\
   not						\
-  or
+  or						\
+  xor
 
 all_headers_SOURCES = all_headers.cc
 and_SOURCES = and.cc
 and_not_SOURCES = and_not.cc
 not_SOURCES = not.cc
 or_SOURCES = or.cc
+xor_SOURCES = xor.cc
 
 TESTS = $(check_PROGRAMS)
Index: tests/logical/xor.cc
--- tests/logical/xor.cc	(revision 2864)
+++ tests/logical/xor.cc	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,13 +26,12 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/logical/or.cc
- *
- * \brief Tests on mln::logical::or.
- */
+/// \file tests/logical/xor.cc
+///
+/// Tests on mln::logical::xor.
 
 #include <mln/core/image/image2d.hh>
-#include <mln/logical/or.hh>
+#include <mln/logical/xor.hh>
 #include <mln/level/compare.hh>
 
 
@@ -52,14 +52,14 @@
   };
 
   bool ws[3][3] = {
-    {1, 1, 1},
     {0, 1, 0},
-    {1, 1, 1}
+    {0, 0, 0},
+    {0, 1, 0}
   };
 
-  image2d<bool> ima1 (make::image(vs));
-  image2d<bool> ima2 (make::image(us));
-  image2d<bool> ref (make::image(ws));
+  image2d<bool> ima1 = make::image(vs);
+  image2d<bool> ima2 = make::image(us);
+  image2d<bool> ref  = make::image(ws);
 
-  mln_assertion (logical::or_(ima1, ima2) == ref);
+  mln_assertion (logical::xor_(ima1, ima2) == ref);
 }
Property changes on: tests/logical/xor.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/trait/op/all.hh
--- mln/trait/op/all.hh	(revision 2867)
+++ mln/trait/op/all.hh	(working copy)
@@ -66,7 +66,6 @@
 
 # include <mln/trait/op/less.hh>
 # include <mln/trait/op/leq.hh>
-# include <mln/trait/op/lor.hh>
 # include <mln/trait/op/geq.hh>
 # include <mln/trait/op/greater.hh>
 
Index: mln/fun/vv2v/lxor.hh
--- mln/fun/vv2v/lxor.hh	(revision 2864)
+++ mln/fun/vv2v/lxor.hh	(working copy)
@@ -25,15 +25,15 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-#ifndef MLN_FUN_VV2V_LAND_HH
-# define MLN_FUN_VV2V_LAND_HH
+#ifndef MLN_FUN_VV2V_LXOR_HH
+# define MLN_FUN_VV2V_LXOR_HH
 
-/// \file mln/fun/vv2v/land.hh
+/// \file mln/fun/vv2v/lxor.hh
 ///
-/// Functor that computes "logical and" between two values.
+/// Functor that computes "logical xor" between two values.
 
 # include <mln/core/concept/function.hh>
-# include <mln/trait/op/and.hh>
+# include <mln/trait/op/xor.hh>
 
 
 namespace mln
@@ -45,11 +45,11 @@
     namespace vv2v
     {
 
-      /// Functor computing logical-and between two values.
+      /// Functor computing logical-xor between two values.
       template <typename L, typename R = L>
-      struct land : public Function_vv2v< land<L,R> >
+      struct lxor : public Function_vv2v< lxor<L,R> >
       {
-	typedef mln_trait_op_and(L, R) result;
+	typedef mln_trait_op_or(L, R) result;
 	result operator()(const L& v1, const R& v2) const;
       };
 
@@ -58,10 +58,12 @@
 
       template <typename L, typename R>
       inline
-      typename land<L,R>::result
-      land<L,R>::operator()(const L& v1, const R& v2) const
+      typename lxor<L,R>::result
+      lxor<L,R>::operator()(const L& v1, const R& v2) const
       {
-	return v1 && v2;
+	// v1 xor v2  =  (v1 and (not v2)) or ((not v1) and v2)
+	//            =  (not (v1 and v2)) and (v1 or v2)
+	return (! (v1 && v2)) && (v1 || v2);
       }
 
 # endif // ! MLN_INCLUDE_ONLY
@@ -73,4 +75,4 @@
 } // end of namespace mln
 
 
-#endif // ! MLN_FUN_VV2V_LAND_HH
+#endif // ! MLN_FUN_VV2V_LXOR_HH
Property changes on: mln/fun/vv2v/lxor.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/fun/vv2v/all.hh
--- mln/fun/vv2v/all.hh	(revision 2867)
+++ mln/fun/vv2v/all.hh	(working copy)
@@ -51,6 +51,9 @@
 # include <mln/fun/vv2v/macros.hh>
 
 # include <mln/fun/vv2v/land.hh>
+# include <mln/fun/vv2v/land_not.hh>
+# include <mln/fun/vv2v/lor.hh>
+# include <mln/fun/vv2v/lxor.hh>
 # include <mln/fun/vv2v/max.hh>
 # include <mln/fun/vv2v/min.hh>
 # include <mln/fun/vv2v/vec.hh>
Index: mln/fun/vv2v/lor.hh
--- mln/fun/vv2v/lor.hh	(revision 2864)
+++ mln/fun/vv2v/lor.hh	(working copy)
@@ -25,15 +25,15 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-#ifndef MLN_FUN_VV2V_LAND_HH
-# define MLN_FUN_VV2V_LAND_HH
+#ifndef MLN_FUN_VV2V_LOR_HH
+# define MLN_FUN_VV2V_LOR_HH
 
-/// \file mln/fun/vv2v/land.hh
+/// \file mln/fun/vv2v/lor.hh
 ///
-/// Functor that computes "logical and" between two values.
+/// Functor that computes "logical or" between two values.
 
 # include <mln/core/concept/function.hh>
-# include <mln/trait/op/and.hh>
+# include <mln/trait/op/or.hh>
 
 
 namespace mln
@@ -45,11 +45,11 @@
     namespace vv2v
     {
 
-      /// Functor computing logical-and between two values.
+      /// Functor computing logical-or between two values.
       template <typename L, typename R = L>
-      struct land : public Function_vv2v< land<L,R> >
+      struct lor : public Function_vv2v< lor<L,R> >
       {
-	typedef mln_trait_op_and(L, R) result;
+	typedef mln_trait_op_or(L, R) result;
 	result operator()(const L& v1, const R& v2) const;
       };
 
@@ -58,10 +58,10 @@
 
       template <typename L, typename R>
       inline
-      typename land<L,R>::result
-      land<L,R>::operator()(const L& v1, const R& v2) const
+      typename lor<L,R>::result
+      lor<L,R>::operator()(const L& v1, const R& v2) const
       {
-	return v1 && v2;
+	return v1 || v2;
       }
 
 # endif // ! MLN_INCLUDE_ONLY
@@ -73,4 +73,4 @@
 } // end of namespace mln
 
 
-#endif // ! MLN_FUN_VV2V_LAND_HH
+#endif // ! MLN_FUN_VV2V_LOR_HH
Property changes on: mln/fun/vv2v/lor.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/fun/vv2v/land_not.hh
--- mln/fun/vv2v/land_not.hh	(revision 2864)
+++ mln/fun/vv2v/land_not.hh	(working copy)
@@ -25,15 +25,16 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-#ifndef MLN_FUN_VV2V_LAND_HH
-# define MLN_FUN_VV2V_LAND_HH
+#ifndef MLN_FUN_VV2V_LAND_NOT_HH
+# define MLN_FUN_VV2V_LAND_NOT_HH
 
-/// \file mln/fun/vv2v/land.hh
+/// \file mln/fun/vv2v/land_not.hh
 ///
-/// Functor that computes "logical and" between two values.
+/// Functor that computes "logical and-not" between two values.
 
 # include <mln/core/concept/function.hh>
 # include <mln/trait/op/and.hh>
+# include <mln/trait/op/not.hh>
 
 
 namespace mln
@@ -45,11 +46,11 @@
     namespace vv2v
     {
 
-      /// Functor computing logical-and between two values.
+      /// Functor computing logical and-not between two values.
       template <typename L, typename R = L>
-      struct land : public Function_vv2v< land<L,R> >
+      struct land_not : public Function_vv2v< land_not<L,R> >
       {
-	typedef mln_trait_op_and(L, R) result;
+	typedef mln_trait_op_and(L, mln_trait_op_not(R)) result;
 	result operator()(const L& v1, const R& v2) const;
       };
 
@@ -58,10 +59,10 @@
 
       template <typename L, typename R>
       inline
-      typename land<L,R>::result
-      land<L,R>::operator()(const L& v1, const R& v2) const
+      typename land_not<L,R>::result
+      land_not<L,R>::operator()(const L& v1, const R& v2) const
       {
-	return v1 && v2;
+	return v1 && ! v2;
       }
 
 # endif // ! MLN_INCLUDE_ONLY
@@ -73,4 +74,4 @@
 } // end of namespace mln
 
 
-#endif // ! MLN_FUN_VV2V_LAND_HH
+#endif // ! MLN_FUN_VV2V_LAND_NOT_HH
Property changes on: mln/fun/vv2v/land_not.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/logical/and_not.hh
--- mln/logical/and_not.hh	(revision 2867)
+++ mln/logical/and_not.hh	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,18 +29,12 @@
 #ifndef MLN_LOGICAL_AND_NOT_HH
 # define MLN_LOGICAL_AND_NOT_HH
 
-/*! \file mln/logical/and_not.hh
- *
- * \brief Point-wise logical "and not" between binary images.
- *
- * \todo Add static assertion and save one iterator in in-place version.
- */
-
-# include <mln/core/concept/image.hh>
-
+/// \file mln/logical/and_not.hh
+///
+/// Point-wise "logical and-not" between binary images.
 
-// Specializations are in:
-# include <mln/logical/and_not.spe.hh>
+# include <mln/logical/includes.hh>
+# include <mln/fun/vv2v/land_not.hh>
 
 
 namespace mln
@@ -48,7 +43,7 @@
   namespace logical
   {
 
-    /*! Point-wise logical "and not" between images \p lhs and \p rhs.
+    /*! Point-wise "logical and-not" between images \p lhs and \p rhs.
      *
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
@@ -57,10 +52,11 @@
      * \pre \p lhs.domain == \p rhs.domain
      */
     template <typename L, typename R>
-    mln_concrete(L) and_not(const Image<L>& lhs, const Image<R>& rhs);
+    mln_ch_fun_vv2v(land_not, L, R)
+    and_not(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise in-place logical "and not" of image \p rhs in image \p lhs.
+    /*! Point-wise in-place "logical and-not" of image \p rhs in image \p lhs.
      *
      * \param[in,out] lhs First operand image.
      * \param[in] rhs Second operand image.
@@ -77,42 +73,17 @@
 
 # ifndef MLN_INCLUDE_ONLY
 
-    namespace impl
-    {
-
-      namespace generic
-      {
-	template <typename L, typename R, typename O>
-	inline
-	void and_not_(const L& lhs, const R& rhs, O& output)
-	{
-	  trace::entering("logical::impl::generic::and_not_");
-
-	  mln_piter(L) p(lhs.domain());
-	  for_all(p)
-	    output(p) = lhs(p) && ! rhs(p);
-
-	  trace::exiting("logical::impl::generic::and_not_");
-	}
-      }
-
-    } // end of namespace mln::logical::impl
-
-
-    // Facades.
-
     template <typename L, typename R>
     inline
-    mln_concrete(L) and_not(const Image<L>& lhs, const Image<R>& rhs)
+    mln_ch_fun_vv2v(land_not, L, R)
+    and_not(const Image<L>& lhs, const Image<R>& rhs)
     {
       trace::entering("logical::and_not");
 
-      mln_precondition(exact(rhs).domain() == exact(lhs).domain());
+      internal::tests(lhs, rhs);
 
-      mln_concrete(L) output;
-      initialize(output, lhs);
-      impl::and_not_(mln_trait_image_speed(L)(), exact(lhs),
-		     mln_trait_image_speed(R)(), exact(rhs), output);
+      mln_fun_vv2v(land_not, L, R) f;
+      mln_ch_fun_vv2v(land_not, L, R) output = level::transform(lhs, rhs, f);
 
       trace::exiting("logical::and_not");
       return output;
@@ -124,10 +95,13 @@
     {
       trace::entering("logical::and_not_inplace");
 
-      mln_precondition(exact(rhs).domain() >= exact(lhs).domain());
+      mlc_converts_to(mln_fun_vv2v_result(land_not, L, R),
+		      mln_value(L))::check();
+
+      internal::tests(lhs, rhs);
 
-      impl::and_not_(mln_trait_image_speed(L)(), exact(lhs),
-		     mln_trait_image_speed(R)(), exact(rhs), exact(lhs));
+      mln_fun_vv2v(land_not, L, R) f;
+      level::transform_inplace(lhs, rhs, f);
 
       trace::exiting("logical::and_not_inplace");
     }
Index: mln/logical/and.hh
--- mln/logical/and.hh	(revision 2867)
+++ mln/logical/and.hh	(working copy)
@@ -32,8 +32,6 @@
 /// \file mln/logical/and.hh
 ///
 /// Point-wise "logical and" between binary images.
-///
-/// \todo Add static assertion and save one iterator in in-place version.
 
 # include <mln/logical/includes.hh>
 # include <mln/fun/vv2v/land.hh>
Index: mln/logical/all.hh
--- mln/logical/all.hh	(revision 2867)
+++ mln/logical/all.hh	(working copy)
@@ -55,6 +55,7 @@
 # include <mln/logical/and_not.hh>
 # include <mln/logical/not.hh>
 # include <mln/logical/or.hh>
+# include <mln/logical/xor.hh>
 
 
 #endif // ! MLN_LOGICAL_ALL_HH
Index: mln/logical/xor.hh
--- mln/logical/xor.hh	(revision 2864)
+++ mln/logical/xor.hh	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,21 +26,15 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-#ifndef MLN_LOGICAL_OR_HH
-# define MLN_LOGICAL_OR_HH
-
-/*! \file mln/logical/or.hh
- *
- * \brief Point-wise "logical or" between binary images.
- *
- * \todo Add static assertion and save one iterator in in-place version.
- */
-
-# include <mln/core/concept/image.hh>
+#ifndef MLN_LOGICAL_XOR_HH
+# define MLN_LOGICAL_XOR_HH
 
+/// \file mln/logical/xor.hh
+///
+/// Point-wise "logical xor" between binary images.
 
-// Specializations are in:
-# include <mln/logical/or.spe.hh>
+# include <mln/logical/includes.hh>
+# include <mln/fun/vv2v/lxor.hh>
 
 
 namespace mln
@@ -48,7 +43,7 @@
   namespace logical
   {
 
-    /*! Point-wise "logical or" between images \p lhs and \p rhs.
+    /*! Point-wise "logical xor" between images \p lhs and \p rhs.
      *
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
@@ -57,79 +52,58 @@
      * \pre \p lhs.domain == \p rhs.domain
      */
     template <typename L, typename R>
-    mln_concrete(L) or_(const Image<L>& lhs, const Image<R>& rhs);
+    mln_ch_fun_vv2v(lxor, L, R)
+    xor_(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise in-place "logical or" of image \p rhs in image \p lhs.
+    /*! Point-wise in-place "logical xor" of image \p rhs in image \p lhs.
      *
      * \param[in,out] lhs First operand image.
      * \param[in] rhs Second operand image.
      *
      * It performs: \n
-     *   for all p of lhs.domain \n
-     *     lhs(p) = lhs(p) or rhs(p)
+     *   for all p of rhs.domain \n
+     *     lhs(p) = lhs(p) xor rhs(p)
      *
      * \pre \p rhs.domain >= \p lhs.domain
      */
     template <typename L, typename R>
-    void or_inplace(Image<L>& lhs, const Image<R>& rhs);
+    void xor_inplace(Image<L>& lhs, const Image<R>& rhs);
 
 
 # ifndef MLN_INCLUDE_ONLY
 
-    namespace impl
-    {
-
-      namespace generic
-      {
-	template <typename L, typename R, typename O>
-	inline
-	void or__(const L& lhs, const R& rhs, O& output)
-	{
-	  trace::entering("logical::impl::generic::or__");
-
-	  mln_piter(L) p(lhs.domain());
-	  for_all(p)
-	    output(p) = lhs(p) || rhs(p);
-
-	  trace::exiting("logical::impl::generic::or__");
-	}
-      }
-
-    } // end of namespace mln::logical::impl
-
-
-    // Facades.
-
     template <typename L, typename R>
     inline
-    mln_concrete(L) or_(const Image<L>& lhs, const Image<R>& rhs)
+    mln_ch_fun_vv2v(lxor, L, R)
+    xor_(const Image<L>& lhs, const Image<R>& rhs)
     {
-      trace::entering("logical::or_");
+      trace::entering("logical::xor_");
 
-      mln_precondition(exact(rhs).domain() == exact(lhs).domain());
+      internal::tests(lhs, rhs);
 
-      mln_concrete(L) output;
-      initialize(output, lhs);
-      impl::or__(mln_trait_image_speed(L)(), exact(lhs),
-		 mln_trait_image_speed(R)(), exact(rhs), output);
+      mln_fun_vv2v(lxor, L, R) f;
+      mln_ch_fun_vv2v(lxor, L, R) output = level::transform(lhs, rhs, f);
 
-      trace::exiting("logical::or_");
+      trace::exiting("logical::xor_");
       return output;
     }
 
     template <typename L, typename R>
     inline
-    void or_inplace(Image<L>& lhs, const Image<R>& rhs)
+    void xor_inplace(Image<L>& lhs, const Image<R>& rhs)
     {
-      trace::entering("logical::or_inplace");
+      trace::entering("logical::xor_inplace");
+
+      mlc_converts_to(mln_fun_vv2v_result(lxor, L, R),
+		      mln_value(L))::check();
 
-      mln_precondition(exact(rhs).domain() >= exact(lhs).domain());
+      internal::tests(lhs, rhs);
 
-      impl::or__(mln_trait_image_speed(L)(), exact(lhs),
-		 mln_trait_image_speed(R)(), exact(rhs), exact(lhs));
+      mln_fun_vv2v(lxor, L, R) f;
+      level::transform_inplace(lhs, rhs, f);
 
-      trace::exiting("logical::or_inplace");
+      trace::exiting("logical::xor_inplace");
     }
 
 # endif // ! MLN_INCLUDE_ONLY
@@ -139,4 +113,4 @@
 } // end of namespace mln
 
 
-#endif // ! MLN_LOGICAL_OR_HH
+#endif // ! MLN_LOGICAL_XOR_HH
Property changes on: mln/logical/xor.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/logical/or.hh
--- mln/logical/or.hh	(revision 2867)
+++ mln/logical/or.hh	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,18 +29,12 @@
 #ifndef MLN_LOGICAL_OR_HH
 # define MLN_LOGICAL_OR_HH
 
-/*! \file mln/logical/or.hh
- *
- * \brief Point-wise "logical or" between binary images.
- *
- * \todo Add static assertion and save one iterator in in-place version.
- */
-
-# include <mln/core/concept/image.hh>
-
+/// \file mln/logical/or.hh
+///
+/// Point-wise "logical or" between binary images.
 
-// Specializations are in:
-# include <mln/logical/or.spe.hh>
+# include <mln/logical/includes.hh>
+# include <mln/fun/vv2v/lor.hh>
 
 
 namespace mln
@@ -57,7 +52,8 @@
      * \pre \p lhs.domain == \p rhs.domain
      */
     template <typename L, typename R>
-    mln_concrete(L) or_(const Image<L>& lhs, const Image<R>& rhs);
+    mln_ch_fun_vv2v(lor, L, R)
+    or_(const Image<L>& lhs, const Image<R>& rhs);
 
 
     /*! Point-wise in-place "logical or" of image \p rhs in image \p lhs.
@@ -66,7 +62,7 @@
      * \param[in] rhs Second operand image.
      *
      * It performs: \n
-     *   for all p of lhs.domain \n
+     *   for all p of rhs.domain \n
      *     lhs(p) = lhs(p) or rhs(p)
      *
      * \pre \p rhs.domain >= \p lhs.domain
@@ -77,42 +73,17 @@
 
 # ifndef MLN_INCLUDE_ONLY
 
-    namespace impl
-    {
-
-      namespace generic
-      {
-	template <typename L, typename R, typename O>
-	inline
-	void or__(const L& lhs, const R& rhs, O& output)
-	{
-	  trace::entering("logical::impl::generic::or__");
-
-	  mln_piter(L) p(lhs.domain());
-	  for_all(p)
-	    output(p) = lhs(p) || rhs(p);
-
-	  trace::exiting("logical::impl::generic::or__");
-	}
-      }
-
-    } // end of namespace mln::logical::impl
-
-
-    // Facades.
-
     template <typename L, typename R>
     inline
-    mln_concrete(L) or_(const Image<L>& lhs, const Image<R>& rhs)
+    mln_ch_fun_vv2v(lor, L, R)
+    or_(const Image<L>& lhs, const Image<R>& rhs)
     {
       trace::entering("logical::or_");
 
-      mln_precondition(exact(rhs).domain() == exact(lhs).domain());
+      internal::tests(lhs, rhs);
 
-      mln_concrete(L) output;
-      initialize(output, lhs);
-      impl::or__(mln_trait_image_speed(L)(), exact(lhs),
-		 mln_trait_image_speed(R)(), exact(rhs), output);
+      mln_fun_vv2v(lor, L, R) f;
+      mln_ch_fun_vv2v(lor, L, R) output = level::transform(lhs, rhs, f);
 
       trace::exiting("logical::or_");
       return output;
@@ -124,10 +95,13 @@
     {
       trace::entering("logical::or_inplace");
 
-      mln_precondition(exact(rhs).domain() >= exact(lhs).domain());
+      mlc_converts_to(mln_fun_vv2v_result(lor, L, R),
+		      mln_value(L))::check();
+
+      internal::tests(lhs, rhs);
 
-      impl::or__(mln_trait_image_speed(L)(), exact(lhs),
-		 mln_trait_image_speed(R)(), exact(rhs), exact(lhs));
+      mln_fun_vv2v(lor, L, R) f;
+      level::transform_inplace(lhs, rhs, f);
 
       trace::exiting("logical::or_inplace");
     }
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        	* scribo/demat.hh: update.
---
 milena/sandbox/ChangeLog       |    6 +
 milena/sandbox/scribo/demat.hh |  379 ++++++++++++++++++++++++++++++++--------
 2 files changed, 309 insertions(+), 76 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index f2fd9a2..1ce3a0d 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-12  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
+	Add support for table extraction.
+
+	* scribo/demat.hh: update.
+
 2008-11-12  Alexandre Abraham  <abraham(a)lrde.epita.fr>
 
 	Make topological watershed work.
diff --git a/milena/sandbox/scribo/demat.hh b/milena/sandbox/scribo/demat.hh
index 0867e49..59e8014 100644
--- a/milena/sandbox/scribo/demat.hh
+++ b/milena/sandbox/scribo/demat.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 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
@@ -28,11 +28,24 @@
 #ifndef DEMAT_HH_
 # define DEMAT_HH_
 
+# define for_all_ncomponents(C, NCOMP) \
+  for (unsigned C = 1; C <= NCOMP; ++C)
+
+# define for_all_components(C, S) \
+  for (unsigned C = 1; C < S.nelements(); ++C)
+
+# define for_all_elements(E, S) \
+  for (unsigned E = 0; E < S.nelements(); ++E)
+
 # include <libgen.h>
 # include <sstream>
 
-# include <mln/core/image/image1d.hh>
+# include <mln/essential/1d.hh>
 # include <mln/essential/2d.hh>
+# include <mln/morpho/elementary/dilation.hh>
+# include <mln/labeling/background.hh>
+
+# include <mln/transform/influence_zone_geodesic.hh>
 
 #include <tesseract/baseapi.h>
 
@@ -46,14 +59,33 @@ namespace scribo
     using value::int_u16;
     using value::rgb8;
 
+    struct settings_t
+    {
+      settings_t()
+      {
+	bbox_enlarge = 1;
+	ero_line_width = 101;
+	bbox_distance = 25;
+	min_comp_size = 5;
+      }
+
+      unsigned bbox_enlarge;
+      unsigned ero_line_width;
+      unsigned bbox_distance;
+      unsigned min_comp_size;
+    };
+
+    settings_t settings;
     char *input_file = 0;
-    int dbg_file_id = 0;
 
-    std::string output_file(const char *name, unsigned file_id)
+    /// Returns a formated output file name.
+    std::string output_file(const char *name)
     {
+      static int file_id = 1;
+
       std::ostringstream os;
       os << "./"
-	 << file_id
+	 << file_id++
 	 << "_"
 	 << input_file
 	 << "_"
@@ -61,9 +93,43 @@ namespace scribo
       return os.str();
     }
 
+
+    /// Returns the edge central sites of a box
+    ///
+    /// \param[in] b the bbbox
+    /// \param[in] dim the dimension used to compute the site.
+    /*!
+    **
+    ** If dim == 0, returns the left and right central sites.
+    **
+    **	|-------|
+    **	X       X
+    **	|-------|
+    **
+    ** If dim == 1, returns the top and bottom central sites.
+    **
+    **	|---X---|
+    **	|       |
+    **	|---X---|
+    **
+    */
+    std::pair<point2d, point2d>
+    central_sites(const box2d& b, unsigned dim)
+    {
+      unsigned n = b.pmax()[dim] - b.pmin()[dim];
+
+      point2d p1 = b.center();
+      p1[dim] -= n / 2;
+      point2d p2 = b.center();
+      p2[dim] += n / 2;
+
+      return std::make_pair(p1, p2);
+    }
+
+    /// Draw a list of bboxes and their center in a RGB8 image.
     void draw_component_boxes(image2d<rgb8>& output, const util::array<box2d>& boxes)
     {
-      for (unsigned i = 1; i < boxes.nelements(); ++i)
+      for_all_components(i, boxes)
         if (boxes[i].is_valid())
 	{
 	  output(boxes[i].center()) = literal::red;
@@ -71,18 +137,26 @@ namespace scribo
 	}
     }
 
+    /// Colorize and save a labeled image.
     template <typename V>
     void save_lbl_image(const image2d<V>& lbl, unsigned nlabels,
-		        const char *filename, unsigned file_id)
+		        const char *filename)
     {
       image2d<rgb8> output = debug::colorize<image2d<rgb8>, image2d<V> >(lbl, nlabels);
-      io::ppm::save(output, output_file(filename, file_id));
+      io::ppm::save(output, output_file(filename));
     }
 
 
     /// Functions related to Text Recognition.
     /// \{
 
+    /// Passes the text bboxes to Tesseract and store the result an image of
+    /// char.
+    /// \param[in] in image from where the text bboxes are extracted.
+    /// \param[in] lbl labeled image.
+    /// \param[in] tboxes array of text bboxes.
+    ///
+    /// FIXME: For each text bbox, we create a new image. We may like to avoid that.
     void
     text_recognition(const image2d<bool>& in, const image2d<int_u16>& lbl,
 		     const util::array<box2d>& tboxes)
@@ -94,11 +168,10 @@ namespace scribo
       image2d<char> txt(in.domain());
       level::fill(txt, ' ');
 
-      for (unsigned i = 1; i < tboxes.nelements(); ++i)
+      for_all_components(i, tboxes)
       {
 	if (tboxes[i].is_valid())
 	{
-	  // FIXME: do not create a new image.
 	  image2d<bool> b(tboxes[i], 0);
 	  level::fill(b, false);
 	  level::fill(b, in | (tboxes[i] | (pw::value(lbl) == pw::cst(i))));
@@ -128,30 +201,166 @@ namespace scribo
     /// Functions related to the matrix extraction
     /// \{
 
-    void draw_hline(image2d<rgb8>& ima,
-		  const box2d& box,
-		  const rgb8& v)
+    /// Align table lines bboxes according to a given dimension.
+    /*
+    **
+    ** FIXME: DOC!
+    **
+    **	  0 1 3 4 5 6
+    **	  ------------	  -------
+    ** 0 |- - - - -   |	 | {0,1} |
+    ** 1 |        - - |	 | {0,1} |
+    ** 2 |            |	 | {1}	 |
+    ** 3 |	      |	 |	 |
+    ** 4 |	      |	 | {2}	 |
+    ** 5 |- -	      |	 | {2}	 |
+    ** 6 |	      |	 | {2}	 |
+    */
+    util::array<int>
+    align_lines(unsigned nsites,
+		int min_coord,
+		int max_coord,
+		util::array<box2d>& hboxes,
+		unsigned dim)
+    {
+      std::cout << "extracting table lines..." << std::endl;
+      util::array< util::set<unsigned> > lines;
+      lines.resize(nsites);
+
+      // Map components with actual lines.
+      for_all_components(i, hboxes)
+      {
+	int minline = hboxes[i].pmin()[dim] - 5;
+	minline = (minline < min_coord ? min_coord : minline);
+	int maxline = hboxes[i].pmax()[dim] + 5;
+	maxline = (maxline > max_coord ? max_coord : maxline);
+
+	for (int line = minline;
+	      line <= maxline; ++line)
+	  lines[line].insert(i);
+      }
+
+      // Init box2line
+      util::array<int> box2line;
+      box2line.resize(hboxes.nelements());
+      for_all_elements(i, box2line)
+	box2line[i] = -1;
+
+      // Find the line with the highest element count.
+      unsigned max_nelts = 0;
+      for_all_elements(i, lines)
+	if (max_nelts < lines[i].nelements())
+	  max_nelts = lines[i].nelements();
+
+      // Aligning lines
+      util::array<int> newlines;
+      while (max_nelts > 0)
+      {
+	for_all_elements(i, lines)
+	  if (lines[i].nelements() == max_nelts)
+	  {
+	    accu::mean<int_u16> mean;
+	    for_all_elements(j, lines[i])
+	      if (box2line[lines[i][j]] == -1)
+		mean.take(hboxes[lines[i][j]].center()[dim]);
+
+	    if (mean.is_valid())
+	    {
+	      for_all_elements(j, lines[i])
+		if (box2line[lines[i][j]] == -1)
+		{
+		  hboxes[lines[i][j]].pmin()[dim] = mean.to_result();
+		  hboxes[lines[i][j]].pmax()[dim] = mean.to_result();
+		  box2line[lines[i][j]] = mean.to_result();
+		}
+	      newlines.append(mean.to_result());
+	    }
+	  }
+	--max_nelts;
+      }
+
+      return newlines;
+    }
+
+    image2d<bool>
+    rebuild_table(const image2d<bool>& in,
+		  std::pair<util::array<box2d>,
+		  util::array<box2d> >& tblboxes)
     {
-      unsigned ncols = box.pmax().col() - box.pmin().col();
-      point2d p1 = box.center();
-      p1.col() -= ncols / 2;
-      point2d p2 = box.center();
-      p2.col() += ncols / 2;
+      util::array<int> rows = align_lines(in.nrows(), geom::min_row(in),
+					  geom::max_row(in), tblboxes.second,
+					  0);
+      util::array<int> cols = align_lines(in.ncols(), geom::min_col(in),
+					  geom::max_col(in), tblboxes.first,
+					  1);
+
+      image1d<int> v(in.nrows());
+      image1d<int> h(in.ncols());
+      level::fill(v, -1);
+      level::fill(h, -1);
+
+      for_all_elements(i, rows)
+	v.at(rows[i]) = i;
+      for_all_elements(i, cols)
+	h.at(cols[i]) = i;
+
+      for (int i = 0; i < 10; ++i)
+      {
+	v = morpho::elementary::dilation(v, c2());
+	h = morpho::elementary::dilation(h, c2());
+      }
+
+      util::array<box2d>& vb = tblboxes.first;
+      for_all_components(i, vb)
+      {
+	std::pair<point2d, point2d> cp = central_sites(vb[i], 0);
+	if (v.at(cp.first.row()) != -1)
+	  vb[i].pmin().row() = rows[v.at(cp.first.row())];
+	if (v.at(cp.second.row()) != -1)
+	  vb[i].pmax().row() = rows[v.at(cp.second.row())];
+
+	cp = central_sites(vb[i], 0);
+      }
 
-      draw::line(ima, p1, p2, v);
+      util::array<box2d>& hb = tblboxes.second;
+      for_all_components(i, hb)
+      {
+	std::pair<point2d, point2d> cp = central_sites(hb[i], 1);
+	if (h.at(cp.first.col()) != -1)
+	  hb[i].pmin().col() = cols[h.at(cp.first.col())];
+	if (h.at(cp.second.col()) != -1)
+	  hb[i].pmax().col() = cols[h.at(cp.second.col())];
+      }
+
+      image2d<bool> res;
+      initialize(res, in);
+      level::fill(res, false);
+      for_all_components(i, tblboxes.first)
+	draw::box(res, tblboxes.first[i], true);
+      for_all_components(i, tblboxes.second)
+	draw::box(res, tblboxes.second[i], true);
+
+# ifndef NOUT
+      image2d<rgb8> out(in.domain());
+      level::fill(out, literal::black);
+      for_all_components(i, tblboxes.first)
+	draw::box(out, tblboxes.first[i], literal::red);
+      for_all_components(i, tblboxes.second)
+	draw::box(out, tblboxes.second[i], literal::red);
+      io::ppm::save(out, output_file("table.ppm"));
+# endif
+      return res;
     }
 
-    void draw_vline(image2d<rgb8>& ima,
-		  const box2d& box,
-		  const rgb8& v)
+
+    void draw_line(image2d<rgb8>& ima,
+		   unsigned dim,
+		   const box2d& box,
+		   const rgb8& v)
     {
-      unsigned nrows = box.pmax().row() - box.pmin().row();
-      point2d p1 = box.center();
-      p1.row() -= nrows / 2;
-      point2d p2 = box.center();
-      p2.row() += nrows / 2;
+      std::pair<point2d, point2d> cp = central_sites(box, dim);
 
-      draw::line(ima, p1, p2, v);
+      draw::line(ima, cp.first, cp.second, v);
     }
 
     void draw_row(image2d<rgb8>& ima,
@@ -184,14 +393,14 @@ namespace scribo
       level::fill(vend, 0);
       level::fill(vcol, 0);
 
-      for (unsigned i = 1; i < tboxes.first.nelements(); ++i)
+      for_all_components(i, tboxes.first)
       {
 	++vend.at(tboxes.first[i].pmin().row());
 	++vend.at(tboxes.first[i].pmax().row());
 	++vcol.at(tboxes.first[i].center().col());
       }
 
-      for (unsigned i = 1; i < tboxes.second.nelements(); ++i)
+      for_all_components(i, tboxes.second)
       {
 	++hend.at(tboxes.second[i].pmin().col());
 	++hend.at(tboxes.second[i].pmax().col());
@@ -218,13 +427,13 @@ namespace scribo
 	  draw_row(tmp, i, literal::magenta);
       }
 
-      for (unsigned i = 1; i < tboxes.first.nelements(); ++i)
-	draw_vline(tmp, tboxes.first[i], literal::green);
+      for_all_components(i, tboxes.first)
+	draw_line(tmp, 0, tboxes.first[i], literal::green);
 
-      for (unsigned i = 1; i < tboxes.second.nelements(); ++i)
-	draw_hline(tmp, tboxes.second[i], literal::red);
+      for_all_components(i, tboxes.second)
+	draw_line(tmp, 1, tboxes.second[i], literal::red);
 
-      io::ppm::save(tmp, output_file("matrix.ppm", 4));
+      io::ppm::save(tmp, output_file("matrix.ppm"));
 #endif
 
     }
@@ -253,9 +462,9 @@ namespace scribo
 		     util::array<box2d>& boxes,
 		     unsigned bbox_enlarge, unsigned dim)
     {
-      for (unsigned i = 1; i < boxes.nelements(); ++i)
+      for_all_components(i, boxes)
       {
-	boxes[i].enlarge(dim, bbox_enlarge + 1);
+	boxes[i].enlarge(dim, bbox_enlarge + settings.bbox_enlarge);
 	boxes[i].crop_wrt(output.domain());
 	level::paste((pw::cst(false) | boxes[i] |
 		(pw::value(output) == pw::cst(true))), output);
@@ -267,8 +476,7 @@ namespace scribo
     std::pair<util::array<box2d>,
 		    util::array<box2d> >
     extract_tables(image2d<bool>& in,
-		   image2d<rgb8>& output,
-		   unsigned l)
+		   image2d<rgb8>& output)
     {
       typedef image2d<int_u16> I;
       typedef accu::bbox<mln_psite_(I)> A;
@@ -277,35 +485,34 @@ namespace scribo
 
       // Lignes verticales
       std::cout << "Removing vertical lines" << std::endl;
-      win::vline2d vline(l);
+      win::vline2d vline(settings.ero_line_width);
       image2d<bool> vfilter = morpho::erosion(in, vline);
 
 #ifndef NOUT
-      io::pbm::save(vfilter, output_file("table-vfilter.pbm", 1));
+      io::pbm::save(vfilter, output_file("vertical-erosion.pbm"));
 #endif
 
       boxes_t vboxes = component_boxes(vfilter);
-      erase_table_boxes(in, vboxes, (l / 2), 0);
-
+      erase_table_boxes(in, vboxes, (settings.ero_line_width / 2), 0);
 
       // Lignes horizontales
       std::cout << "Removing horizontal lines" << std::endl;
-      win::hline2d hline(l);
+      win::hline2d hline(settings.ero_line_width);
       image2d<bool> hfilter = morpho::erosion(in, hline);
 
 #ifndef NOUT
-      io::pbm::save(hfilter, output_file("table-hfilter.pbm", 2));
+      io::pbm::save(hfilter, output_file("horizontal-erosion.pbm"));
 #endif
 
       boxes_t hboxes = component_boxes(hfilter);
-      erase_table_boxes(in, hboxes, (l / 2), 1);
+      erase_table_boxes(in, hboxes, (settings.ero_line_width / 2), 1);
 
 
 #ifndef NOUT
       image2d<rgb8> tmp = clone(output);
       draw_component_boxes(tmp, vboxes);
       draw_component_boxes(tmp, hboxes);
-      io::ppm::save(tmp, output_file("table-filtered.ppm", 3));
+      io::ppm::save(tmp, output_file("vertical-and-horizontal-erosion.ppm"));
 #endif
 
       return std::make_pair(vboxes, hboxes);
@@ -339,11 +546,10 @@ namespace scribo
     template <typename V>
     void
     remove_small_comps_i2v(image2d<V>& lbl,
-			   V& nlabels,
-			   unsigned min_comp_size)
+			   V& nlabels)
     {
       std::cout << "Removing small components smaller than "
-		<< min_comp_size << " sites among " << nlabels
+		<< settings.min_comp_size << " sites among " << nlabels
 		<< " components" << std::endl;
 
       typedef accu::count<mln_psite(image2d<V>)> accu_count_t;
@@ -356,9 +562,9 @@ namespace scribo
       fun::i2v::array<V> f(nsitecomp.nelements());
       f(0) = 0;
 
-      for (unsigned i = 1; i <= nlabels; ++i)
+      for_all_ncomponents(i, nlabels)
       {
-	if (nsitecomp[i] < min_comp_size)
+	if (nsitecomp[i] < settings.min_comp_size)
 	  f(i) = 0;
 	else
 	  f(i) = ++ncomp;
@@ -368,7 +574,7 @@ namespace scribo
       nlabels = ncomp;
 
 #ifndef NOUT
-      save_lbl_image(lbl, nlabels, "lbl-small-comps-removed.pgm", 6);
+      save_lbl_image(lbl, nlabels, "lbl-small-comps-removed.pgm");
 #endif
     }
 
@@ -381,18 +587,18 @@ namespace scribo
       // Currify left_link lookup table and compute text area bboxes.
       util::array< accu::bbox<point2d> > tboxes;
       tboxes.resize(ncomp + 1);
-      for (unsigned i = 1; i <= ncomp; ++i)
+      for_all_ncomponents(i, ncomp)
 	tboxes[uncurri_left_link(left_link, i)].take(cboxes[i]);
 
       //Update labels
       lbl = level::transform(lbl, left_link);
 
 #ifndef NOUT
-      save_lbl_image(lbl, ncomp, "lbl-grouped-boxes.pgm", 7);
+      save_lbl_image(lbl, ncomp, "lbl-grouped-boxes.pgm");
 #endif
 
       util::array<box2d> result;
-      for (unsigned i = 1; i <= ncomp; ++i)
+      for_all_ncomponents(i, ncomp)
 	if (tboxes[i].is_valid())
 	  result.append(tboxes[i].to_result());
 
@@ -412,7 +618,7 @@ namespace scribo
 	  if (left_link(lbl(p)) == lbl(p) && most_left(left_link, i) != lbl(p))
 	    left_link(lbl(p)) = i;
 //	  else
-//	    left_link(lbl(p)) = 0;//FIXME: should be uncommented?
+//	    left_link(lbl(p)) = 0;//FIXME: should be uncommented? VERY bad results otherwise.
 	}
     }
 
@@ -423,8 +629,7 @@ namespace scribo
     fun::i2v::array<int_u16>
     link_character_bboxes(image2d<int_u16>& lbl,
 			  const util::array<box2d>& cboxes,
-			  unsigned ncomp,
-			  unsigned bbox_distance)
+			  unsigned ncomp)
     {
       fun::i2v::array<int_u16> left_link;
       left_link.resize(ncomp + 1);
@@ -432,10 +637,10 @@ namespace scribo
       for (unsigned i = 0; i <= ncomp; ++i)
 	left_link(i) = i;
 
-      for (unsigned i = 1; i <= ncomp; ++i)
+      for_all_ncomponents(i, ncomp)
       {
 	unsigned midcol = (cboxes[i].pmax().col() - cboxes[i].pmin().col()) / 2;
-	int dmax = midcol + bbox_distance;
+	int dmax = midcol + settings.bbox_distance;
 	point2d c = cboxes[i].center();
 	/// First site on the right of the central site
 	point2d p(c.row(), c.col() + 1);
@@ -454,11 +659,8 @@ namespace scribo
     util::array<box2d>
     extract_text(image2d<bool>& in,
 		 image2d<int_u16>& lbl,
-		 image2d<rgb8>& output,
-		 unsigned bbox_distance,
-		 unsigned min_comp_size)
+		 image2d<rgb8>& output)
     {
-      std::cout << "extracting text..." << std::endl;
 
       typedef int_u16 V;
       typedef image2d<V> I;
@@ -469,21 +671,21 @@ namespace scribo
       lbl = labeling::blobs(in, c8(), nlabels);
 
       //Remove small components.
-      remove_small_comps_i2v(lbl, nlabels, min_comp_size);
+      remove_small_comps_i2v(lbl, nlabels);
 
       boxes_t cboxes = labeling::compute(accu::meta::bbox(), lbl, nlabels);
 
 #ifndef NOUT
       image2d<rgb8> tmp = clone(output);
       draw_component_boxes(tmp, cboxes);
-      io::ppm::save(tmp, output_file("character-bboxes.ppm", 5));
+      io::ppm::save(tmp, output_file("character-bboxes.ppm"));
 #endif
 
       //merge_bboxes(cboxes, lbl, nlabels);
 
       //Link character bboxes to their left neighboor if possible.
       fun::i2v::array<int_u16> left =
-	link_character_bboxes(lbl, cboxes, nlabels, bbox_distance);
+	link_character_bboxes(lbl, cboxes, nlabels);
 
       //Merge character bboxes according to their left neighbor.
       util::array<box2d> tboxes = group_bboxes(left, lbl, cboxes, nlabels);
@@ -491,26 +693,45 @@ namespace scribo
       return tboxes;
     }
 
+    void maptext_to_cells(const image2d<bool>& in, const image2d<bool>& table, const util::array<box2d>& tboxes)
+    {
+      int_u16 nlabels;
+      image2d<int_u16> tblelbl = labeling::background(table, c8(), nlabels);
+      image2d<rgb8> color = debug::colorize<image2d<rgb8>, image2d<int_u16> >(tblelbl, nlabels);
+# ifndef NOUT
+      io::ppm::save(color, output_file("cells-labels.ppm"));
+# endif
+
+      image2d<rgb8> dbg = level::convert(rgb8(), logical::not_(table));
+
+      for_all_elements(i, tboxes)
+	if (tboxes[i].is_valid())
+	{
+	  level::paste(pw::cst(color(tboxes[i].center())) | (tboxes[i] | pw::value(in) == pw::cst(true)),
+		dbg);
+	}
+# ifndef NOUT
+      io::ppm::save(dbg, output_file("text2cell.ppm"));
+# endif
+    }
+
     /// \}
     /// End of functions related to text extraction
 
   } // end of namespace scribo::internal
 
-
   // Facade
   void demat(char *argv[], bool treat_tables)
   {
     using namespace mln;
     using value::rgb8;
+    using value::int_u16;
 
     border::thickness = 3;
     trace::quiet = true;
 
     //Useful debug variables
     internal::input_file = basename(argv[1]);
-    unsigned l = 101;
-    unsigned bbox_distance = 25;
-    unsigned min_comp_size = 5;
 
     //Load image
     image2d<bool> in;
@@ -521,18 +742,24 @@ namespace scribo
 
     std::pair<util::array<box2d>,
 		    util::array<box2d> > tblboxes;
+
+    image2d<bool> table;
     if (treat_tables)
     {
-      tblboxes = internal::extract_tables(in, output, l);
-      internal::extract_matrix(in, tblboxes);
+      tblboxes = internal::extract_tables(in, output);
+//      internal::extract_matrix(in, tblboxes);
+      table = internal::rebuild_table(in, tblboxes);
     }
 
     image2d<value::int_u16> lbl;
     util::array<box2d> tboxes =
-      internal::extract_text(in, lbl, output, bbox_distance, min_comp_size);
+      internal::extract_text(in, lbl, output);
+
+    if (treat_tables)
+      internal::maptext_to_cells(in, table, tboxes);
 
     internal::draw_component_boxes(output, tboxes);
-    io::ppm::save(output, internal::output_file("out.ppm", 8));
+    io::ppm::save(output, internal::output_file("out.ppm"));
 
     internal::text_recognition(in, lbl, tboxes);
   }
-- 
1.5.6.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        	* mln/canvas/browsing/dir_struct_elt_incr_update.hh: use def::coord.
	* mln/level/naive/median.hh,
	* mln/level/median.hh: update initialization of accu::median.
	* mln/trace/entering.hh,
	* mln/trace/exiting.hh,
	* mln/util/timer.hh: Fix doc.
	* tests/level/median_.cc: Fix test.
	* doc/tutorial/samples/out.ppm: should not be there. Removed.
---
 milena/ChangeLog                                   |   17 +++++++++++++++++
 milena/doc/tutorial/samples/out.ppm                |  Bin 145320 -> 0 bytes
 .../canvas/browsing/dir_struct_elt_incr_update.hh  |    3 +--
 milena/mln/level/median.hh                         |    4 ++--
 milena/mln/level/naive/median.hh                   |   18 +++++++++---------
 milena/mln/trace/entering.hh                       |    8 ++++----
 milena/mln/trace/exiting.hh                        |    8 ++++----
 milena/mln/util/timer.hh                           |   15 ++++++---------
 milena/tests/level/median_.cc                      |    2 +-
 9 files changed, 44 insertions(+), 31 deletions(-)
 delete mode 100644 milena/doc/tutorial/samples/out.ppm
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5a6dbc7..67bfc63 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,20 @@
+2008-11-13  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
+	Make level/median* tests compile.
+
+	* mln/canvas/browsing/dir_struct_elt_incr_update.hh: use def::coord.
+
+	* mln/level/naive/median.hh,
+	* mln/level/median.hh: update initialization of accu::median.
+
+	* mln/trace/entering.hh,
+	* mln/trace/exiting.hh,
+	* mln/util/timer.hh: Fix doc.
+
+	* tests/level/median_.cc: Fix test.
+
+	* doc/tutorial/samples/out.ppm: should not be there. Removed.
+
 2008-11-13  Nicolas Ballas  <ballas(a)lrde.epita.fr>
 
 	Temporary fix in complex_image properties.
diff --git a/milena/doc/tutorial/samples/out.ppm b/milena/doc/tutorial/samples/out.ppm
deleted file mode 100644
index 7a33c29f788c3048de656608515af2b838ac61da..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 145320
zcmeI1L2DdG5Jr90uUN<>xyX*eIph|w2>}O;$sds84KX;9QAEJMUMcVFN-OPXX1b@k
zx~lsvwpovMx~so>^Lj@6?x(ZwHotB!x7Qap+mD+MUpK#h`n<io*!+0@Vzc@C=H|=K
z&!1m?J97T{`s4O|`{mQk#ra>?a@L!7zy0yc=Kc2H?Zx$<e{U`>KW<)c|J#1P`tr~A
z@@Dh);=`2;dUgGE^ZncRuiyM|_VVS6jr=`(`Rdi#?Xze6ApwU8JiEQ+4+(fk;P~qB
zP!Bbb08GMww*>Y~%D%n3tMpbL^>mm3Om^6G=S#k45>@h)=OY1_bS{k!%X`2is`Md>
z4mmtt@+gyX@c1*lCjrX@9y5t5QDyA}o?;SJTAG2mjuRMR5>?g~#c_i=d_Tb?s_c*l
z4@(|r5>=wgdI>zqBv{sKiU(O$tN|t~hR@Wa2~07GDp6&P1YmOXQsrR91ZJ2-l{G|B
zkp~Y`FJw|a=Al|@=pli5CQ&7-v`t_+lc=%>M|oJ|A|_F#ttdQzQL%<3CQ)U@PW3bO
zQYKL)s<cWVfl08mYDzy!99=0)j>f{liV37Ki7HWL`2=9Hq7ayRG=XF$QDu2ijCQJ@
zgV{{ViT$L+N-Yz}VG>oM%907JVG>nZ+M}PjGMPk`B}LH>exoa0$t0>AO_hUd63Ax~
zRier=39MogEXy=yjbs`)7bY8MVq;5K%Ot8qmD&lwWMh(PU^xm*qDpO1G{DuGB`7i}
zL#?TVb4g%GK!-_Gi7NFH&}9-;;=1(-s4<Bu^+d70t)WLyXA)J0=D|bpnoOcfRH>1G
zGLvAb(G(A|s#pU|Rt%r1M-$Lz5>=wgbqSPXQbr!V3OGmt(+Lz|5>>7f#dOP>|7lSs
zQDyV|lvrRXCQ&7-%uS#)lc=(UN!lK>Ad{#vR}^g{H@i9mCQ;>V7x=(&0%e&*m8dd3
zf#OVpWqMPNrP1MgnC!6W&X;V#B&tM}DG69IDRVi$LMhKf0!B=t$`ny}0Hb0J#!RBh
zioK39wH=eF5>+lsz@AA|8O2w%>O3%cyA0vgWy(_yPdY|f%gz+?k2RC*;4wL|#QTUz
zR2kALmbBQ+Re?!Vi7F=(c*rEGM3wauIAIbj>o>(_i*!3nT_$CAx5-dgtpvuHM3tzr
zW&+ijM3uF4<aXXCm_(H|Md6kfo5DOWi7IV+9c7lMnM9SSvQ7f^nUr<&CHUm;kfZob
ztIkO#QDq%bXf-$JI4+n(m3Z<ffjK5oC91SeU;&e0Y2B2dd#+a5-k6knw3fy=K@(WU
zB&tM}b_qCS5>*EEn^xJ2nM9R#qR?t?&~bb+i7JEQq*8VYlc*9^S|s3+Nm)1FHXi*B
zSw%j921#TRRa%H55I-eKb;=~F#FOH`gjb1+<77;>?_RM?_vFCt2|^|IG_dRvOaDwt
zg(eq3iHnLca}vm9Qfz5L3aT^;+NPb0W(mP0sx-O&7Xf2X$qFV>rI#ieaAG+{6edxn
zB^7n&TE`@+M3wpp#9&g^&BIPN4?C-wM3wrYsJnGmpFIqds1i?#{}Ns%*B0A%A6RO5
za$pxM*~E1ch{&YWY;pnUBuuHP3Ft8?woIKo>+|g3MnT)Ob7YpFOrpxH>v;qKhvTR+
zi7I0>-64m^CB<bDRUY@TrT5xQqDoY`Hi4*2%DQ>jY4l;I0F$V4tteXBh%?p_m`PNL
zC&hmWuZ-&>{S>zE7O^bj$${N;#xgcNuxt*?Hkg!Em|OrE*9@m5Cs2|}v84$qsM08C
zn|8`#cE40fxKT{{s2!82(j;pOEDJM<DlMAW42{D=T4EAawgG2(CQ&7-OiQ30CS~0`
z>@@MPW5Oh=OcO;LTX6O&nqm@F;>o063)!fG?K?h}R-PR2&DMF!iC`HV%T}3`b)|4@
zBXMR~lz=UhJnSrLO6ONo!%U*eplq8ni7HX$R04Y-zukFRzDzFP-IETgG|763vE>CE
z^tk`-!;;9|T+1t6@kt)QgFJxW(>TyQ_{18@6{ICylwj!_%f~d<WKymH6D(oUDCp#N
zj?>r!ld?vzbcW>=jg^^1mC0@~*;>k0H4o%LBi6T*_w$*=j4B<dauJR7J!z^+$;9LW
zDC?PsOGu#61(T*&Mr>&4nv-elk4aQ%MtCNTUYJCcO>Ot9XzY?nR9RG&3P1{$yJyn-
z=iqAZibi!9oCok?58wxo4pFahe^*Q%u0f69)`Z^FxtcT%!FXYkyUKW=>eJXKld@`d
z@YOqbDH`1|i7ErAvMh}rnFLGMSXuxn0XVv!9G>}2o<D|F^KIkeP5i)#VRr@`y!>mo
zaFdx_t8X>|QyQJ_-KN{O1U}o8Za+|gM!!s&V%aTn6AQ0KBTRBvd2&BlnMT)4qROE?
zrvJJCQdaElx%=)xYhrIv{n0J~)e%iWQmOoafy!X32l2}!s<dF+7mdS;Ve+t9tiHT0
z5K=7CBaH!=G*zYaNU`Idhw@8f3?@yn^bC?pZF?G>Uwp3j?%{byr5kgD3^_EdO7D8S
zyY~seB&xjYR_2>9G=|x`O_`MT%_%h#j4HzhqcIYbrdU>iM}5+eG{WSl@OC#d>V#Mh
z7?{RjOrpxsOX$JDJ&m#NKIA+2-PeoK@Bl9>*~C=kp_NuCJ-8ZFCOse+iAkwhW$kl=
zL}RiY8V4$aF$tCrF3b2diXTp1F!`X#2Zau?IR3p*n=}r1#$!_IK9E!N%`O>}nbMZg
zGL0}f&4NEw?rD_5rYm>-)03V0^gu{Y_NdDEdOU^ii6byMVHF>$?1;tz(x^;!q00C)
z%56sa3nnK#Is9lBk?}oTr!)@y24+$gU_y#5lU>sYlgp7d!E#Td%(c8Qcb`n(sZY;{
z?a6jj8DEd5Y~>ya&t!Nkq46=hFu8F18-h~(wlO}9S&!9^5j^>S3rxmSB{ZIZcys_J
z7kW}YrlCq`Jc93uw~a6<t223A-NltR(;d=Ar4|X~35s+N!(>wLa#a~$kGj}Rj@Ay7
zvdlbzC7zY2N@$$qZ|sLKnL+Y0EaTHCS8I(|Q%p*LiPFpa{2Y_exC&*MRK*e+SJ60}
z+!~WLRT&>h1)vm$XpqSYSVE%$ig!c6WZvE_XARNq12nmh%`SE3#5)>%ylIn3$<_oC
zNzZ1YQnUDg@KF^oS*qR6aec&rr~fv~q=f98idyA)!f&(|nCuAMQ3CuOY?(<(yOxW*
z&Fc@miHcydeQqb(@A5~DGbx#SQ<h~tE|Hrp3MSixcDC`3KhQpt627IHs?X&ZwuPm2
z!DJ^`E^N8`kHKUM7IlwVQh~iNDWO!~RSOl6)b9u%hRMLJMgT0M#*UbjbPAcue%Opo
z$2kQigMk_ct?WwsVp3wVcbe9W**%VSB1{ILG#XSZ>+Oz7$xBOIHsh>paKO`H(l4R`
zaZ)L{M<yjW8^vYMqSD&1gLKNITP(wZq*ypidU2*=Q-crHFO$-^?7da@#NY_2mk*Pb
p$yD!X`~kaWQrf3$yrj|M!&7JlFj)c1LcMHd*nvs@B>_(f{14b_By9iy
diff --git a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
index 164c060..a5cc7fd 100644
--- a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
+++ b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
@@ -118,8 +118,7 @@ namespace mln
 
 	mln_psite(I) pt, pu;
 
-	typedef mln_coord(I)& coord_ref;
-	coord_ref
+	def::coord&
 	  ct = pt[f.dir],
 	  cu = pu[f.dir],
 	  p_dir = f.p[f.dir];
diff --git a/milena/mln/level/median.hh b/milena/mln/level/median.hh
index e224964..771c064 100644
--- a/milena/mln/level/median.hh
+++ b/milena/mln/level/median.hh
@@ -188,7 +188,7 @@ namespace mln
       struct median_dir_t
       {
 	typedef I_ I;
-	enum { dim = I::point::dim };
+	enum { dim = I::site::dim };
 
 	// i/o
 	const I& input;
@@ -210,7 +210,7 @@ namespace mln
 	    output(exact(output)),
 	    // aux data
 	    p(),
-	    med(input.values_eligible())
+	    med()
 	{
 	}
 
diff --git a/milena/mln/level/naive/median.hh b/milena/mln/level/naive/median.hh
index e2034b9..f6a71b9 100644
--- a/milena/mln/level/naive/median.hh
+++ b/milena/mln/level/naive/median.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_LEVEL_NAIVE_MEDIAN_HH
 # define MLN_LEVEL_NAIVE_MEDIAN_HH
 
-/*! \file mln/level/naive/median.hh
- *
- * \brief Naive version of median filtering.
- */
+/// \file mln/level/naive/median.hh
+///
+/// Naive version of median filtering.
 
 # include <mln/core/concept/image.hh>
 # include <mln/core/alias/window2d.hh>
@@ -47,9 +47,9 @@ namespace mln
     namespace naive
     {
 
-      /*! Compute in \p output the median filter of image \p input by
-       *  the window \p win.
-       *
+      /// Compute in \p output the median filter of image \p input by
+      ///  the window \p win.
+      /*!
        * \param[in] input The image to be filtered.
        * \param[in] win The window.
        * \param[in,out] output The output image.
@@ -79,7 +79,7 @@ namespace mln
 	{
 	  mln_piter(I) p(input.domain());
 	  mln_qiter(W) q(win, p);
-	  accu::median_h<mln_vset(I)> med(input.values());
+	  accu::median_h<mln_value(I)> med;
 
 	  for_all(p)
 	    {
diff --git a/milena/mln/trace/entering.hh b/milena/mln/trace/entering.hh
index 20fc58d..dc8f707 100644
--- a/milena/mln/trace/entering.hh
+++ b/milena/mln/trace/entering.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_TRACE_ENTERING_HH
 # define MLN_TRACE_ENTERING_HH
 
-/*! \file mln/trace/entering.hh
- *
- * \brief Definition of the trace entering procedure.
- */
+/// \file mln/trace/entering.hh
+///
+/// Definition of the trace entering procedure.
 
 # include <string>
 # include <iostream>
diff --git a/milena/mln/trace/exiting.hh b/milena/mln/trace/exiting.hh
index 9b7e9f5..ad342a3 100644
--- a/milena/mln/trace/exiting.hh
+++ b/milena/mln/trace/exiting.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_TRACE_EXITING_HH
 # define MLN_TRACE_EXITING_HH
 
-/*! \file mln/trace/exiting.hh
- *
- * \brief Definition of the trace exiting procedure.
- */
+/// \file mln/trace/exiting.hh
+///
+/// Definition of the trace exiting procedure.
 
 # include <string>
 # include <iostream>
diff --git a/milena/mln/util/timer.hh b/milena/mln/util/timer.hh
index 23aabd8..49b0b2e 100644
--- a/milena/mln/util/timer.hh
+++ b/milena/mln/util/timer.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_UTIL_TIMER_HH
 # define MLN_UTIL_TIMER_HH
 
-/*! \file mln/util/timer.hh
- *
- * \brief Definition of a timer.
- */
+/// \file mln/util/timer.hh
+///
+/// Definition of a timer.
 
 # include <mln/core/concept/proxy.hh>
 # include <ctime>
@@ -43,9 +42,7 @@ namespace mln
   namespace util
   {
 
-    /*! \brief Timer structure.
-     *
-     */
+    /// Timer structure.
     class timer : public Proxy< timer >,
 		  public internal::proxy_impl<float, timer>
     {
@@ -162,7 +159,7 @@ namespace mln
 	time_ + float(std::clock()) / CLOCKS_PER_SEC - start_ :
 	time_;
     }
-    
+
     inline
     float
     timer::subj_()
diff --git a/milena/tests/level/median_.cc b/milena/tests/level/median_.cc
index 0821a44..3d97c7c 100644
--- a/milena/tests/level/median_.cc
+++ b/milena/tests/level/median_.cc
@@ -34,7 +34,7 @@ int main()
 
 
   {
-    win::rectangle2d rect(20, 20);
+    win::rectangle2d rect(21, 21);
     border::thickness = 6;
 
     image2d<int_u8> lena;
-- 
1.5.6.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                        
                            
                                
                            
                            2865: Make Olena compile with MLN_INCLUDE_ONLY and	cleanup comments.
                        
                        
by Guillaume Lazzara 13 Nov '08
                    by Guillaume Lazzara 13 Nov '08
13 Nov '08
                    
                        	* mln/arith/diff_abs.hh: Fix bad namespace closure.
	* mln/morpho/dilation_fast.hh,
	* mln/trait/image/print.hh,
	* mln/trait/op/ord.hh,
	* mln/level/median.hh,
	* mln/estim/mean.hh,
	* mln/estim/min_max.hh,
	* mln/estim/sum.hh,
	* mln/estim/all.hh,
	* mln/estim/essential.hh,
	* mln/arith/diff_abs.hh,
	* mln/arith/min.hh,
	* mln/arith/min.spe.hh,
	* mln/arith/minus.hh,
	* mln/arith/plus.hh,
	* mln/arith/revert.hh,
	* mln/arith/revert.spe.hh,
	* mln/arith/times.hh,
	* mln/arith/times.spe.hh: Cleanup comments.
	* mln/morpho/hit_or_miss.hh,
	* mln/display/save.hh,
	* mln/canvas/browsing/backdiagonal2d.hh,
	* mln/canvas/browsing/diagonal2d.hh,
	* mln/canvas/browsing/dir_struct_elt_incr_update.hh,
	* mln/canvas/browsing/directional.hh,
	* mln/canvas/browsing/essential.hh,
	* mln/canvas/browsing/fwd.hh,
	* mln/canvas/browsing/hyper_directional.hh,
	* mln/canvas/browsing/snake_fwd.hh,
	* mln/canvas/browsing/snake_generic.hh,
	* mln/canvas/browsing/snake_vert.hh: Fix wrong declaration of global
	variables.
	* mln/value/float01.hh,
	* mln/core/contract.hh: add missing inline.
	* mln/fun/p2b/chess.hh,
	* mln/fun/p2v/iota.hh: remove global variables.
	* mln/fun/v2v/rgb_to_hsi.hh: Split interface and implementation.
	* mln/geom/chamfer.hh: Fix compilation issue.
	* mln/make/win_chamfer.hh: Move implementation between
	MLN_INCLUDE_ONLY guards.
	* tests/Makefile.am,
	* tests/global_vars1.cc,
	* tests/global_vars2.cc: Add a new test to check whether global
	variables are declared correctly or not.
	* tests/border/find_full.cc,
	* tests/border/get_full.cc,
	* tests/convert/to_image.cc,
	* tests/core/image/cast_image.cc,
	* tests/core/image/image_if.cc,
	* tests/core/site_set/pset_if.cc,
	* tests/level/fill_with_image.cc,
	* tests/level/fill_with_value.cc,
	* tests/level/paste.cc,
	* tests/level/transform.cc,
	* tests/trait/image/images.cc: update according the new use of
	p2v::iota and p2b::chess.
	* tests/pw/image.cc: Make it a real test.
	* mln/level/compute.hh: Fix ambiguity.
	* tests/border/get.cc,
	* tests/border/resize_image_if.cc: Fix tests.
---
 milena/ChangeLog                                   |   77 ++++++++++
 milena/mln/arith/diff_abs.hh                       |   22 ++--
 milena/mln/arith/min.hh                            |   18 ++--
 milena/mln/arith/min.spe.hh                        |   10 +-
 milena/mln/arith/minus.hh                          |   42 +++---
 milena/mln/arith/plus.hh                           |   46 +++---
 milena/mln/arith/revert.hh                         |   22 ++--
 milena/mln/arith/revert.spe.hh                     |   11 +-
 milena/mln/arith/times.hh                          |   26 ++--
 milena/mln/arith/times.spe.hh                      |   11 +-
 milena/mln/canvas/browsing/backdiagonal2d.hh       |   24 ++--
 milena/mln/canvas/browsing/diagonal2d.hh           |   24 ++--
 .../canvas/browsing/dir_struct_elt_incr_update.hh  |   61 ++------
 milena/mln/canvas/browsing/directional.hh          |   19 ++-
 milena/mln/canvas/browsing/essential.hh            |    1 +
 milena/mln/canvas/browsing/fwd.hh                  |   20 ++--
 milena/mln/canvas/browsing/hyper_directional.hh    |   19 ++--
 milena/mln/canvas/browsing/snake_fwd.hh            |   29 ++---
 milena/mln/canvas/browsing/snake_generic.hh        |   16 +--
 milena/mln/canvas/browsing/snake_vert.hh           |   33 ++---
 milena/mln/core/contract.hh                        |    1 +
 milena/mln/display/save.hh                         |   30 ++--
 milena/mln/estim/all.hh                            |   10 +-
 milena/mln/estim/essential.hh                      |    9 +-
 milena/mln/estim/mean.hh                           |   16 +-
 milena/mln/estim/min_max.hh                        |   16 +-
 milena/mln/estim/sum.hh                            |   20 ++--
 milena/mln/fun/p2b/chess.hh                        |    8 +-
 milena/mln/fun/p2v/iota.hh                         |   26 ++--
 milena/mln/fun/v2v/rgb_to_hsi.hh                   |  148 +++++++++++--------
 milena/mln/geom/chamfer.hh                         |   16 +--
 milena/mln/level/compute.hh                        |   18 ++--
 milena/mln/level/median.hh                         |   12 +-
 milena/mln/make/win_chamfer.hh                     |   44 +++++-
 milena/mln/morpho/dilation_fast.hh                 |   22 ++--
 milena/mln/morpho/hit_or_miss.hh                   |   37 +++---
 milena/mln/trait/image/print.hh                    |    8 +-
 milena/mln/trait/op/ord.hh                         |   14 +-
 milena/mln/value/float01.hh                        |   12 +-
 milena/tests/Makefile.am                           |    4 +-
 milena/tests/border/find_full.cc                   |   14 +-
 milena/tests/border/get.cc                         |   12 +-
 milena/tests/border/get_full.cc                    |   16 +-
 milena/tests/border/resize_image_if.cc             |   14 +-
 milena/tests/convert/to_image.cc                   |    2 +-
 milena/tests/core/image/cast_image.cc              |   12 +-
 milena/tests/core/image/image_if.cc                |   18 ++--
 milena/tests/core/site_set/pset_if.cc              |   14 +-
 milena/tests/global_vars1.cc                       |  101 +++++++++++++
 milena/tests/global_vars2.cc                       |  101 +++++++++++++
 milena/tests/level/fill_with_image.cc              |   18 ++--
 milena/tests/level/fill_with_value.cc              |   12 +-
 milena/tests/level/paste.cc                        |   14 +-
 milena/tests/level/transform.cc                    |   13 +-
 milena/tests/pw/image.cc                           |   25 +++-
 milena/tests/trait/image/images.cc                 |   14 +-
 56 files changed, 841 insertions(+), 561 deletions(-)
 create mode 100644 milena/tests/global_vars1.cc
 create mode 100644 milena/tests/global_vars2.cc
diff --git a/milena/ChangeLog b/milena/ChangeLog
index fc79c11..5a6dbc7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -29,6 +29,83 @@
 	* mln/logical/includes.hh: New.
 	* mln/logical/all.hh: Update.
 
+2008-11-13  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
+	Make Olena compile with MLN_INCLUDE_ONLY and cleanup comments.
+
+	* mln/arith/diff_abs.hh: Fix bad namespace closure.
+
+	* mln/morpho/dilation_fast.hh,
+	* mln/trait/image/print.hh,
+	* mln/trait/op/ord.hh,
+	* mln/level/median.hh,
+	* mln/estim/mean.hh,
+	* mln/estim/min_max.hh,
+	* mln/estim/sum.hh,
+	* mln/estim/all.hh,
+	* mln/estim/essential.hh,
+	* mln/arith/diff_abs.hh,
+	* mln/arith/min.hh,
+	* mln/arith/min.spe.hh,
+	* mln/arith/minus.hh,
+	* mln/arith/plus.hh,
+	* mln/arith/revert.hh,
+	* mln/arith/revert.spe.hh,
+	* mln/arith/times.hh,
+	* mln/arith/times.spe.hh: Cleanup comments.
+	 
+	* mln/morpho/hit_or_miss.hh,
+	* mln/display/save.hh,
+	* mln/canvas/browsing/backdiagonal2d.hh,
+	* mln/canvas/browsing/diagonal2d.hh,
+	* mln/canvas/browsing/dir_struct_elt_incr_update.hh,
+	* mln/canvas/browsing/directional.hh,
+	* mln/canvas/browsing/essential.hh,
+	* mln/canvas/browsing/fwd.hh,
+	* mln/canvas/browsing/hyper_directional.hh,
+	* mln/canvas/browsing/snake_fwd.hh,
+	* mln/canvas/browsing/snake_generic.hh,
+	* mln/canvas/browsing/snake_vert.hh: Fix wrong declaration of global
+	variables.
+
+	* mln/value/float01.hh,
+	* mln/core/contract.hh: add missing inline.
+
+	* mln/fun/p2b/chess.hh,
+	* mln/fun/p2v/iota.hh: remove global variables.
+
+	* mln/fun/v2v/rgb_to_hsi.hh: Split interface and implementation.
+
+	* mln/geom/chamfer.hh: Fix compilation issue.
+
+	* mln/make/win_chamfer.hh: Move implementation between
+	MLN_INCLUDE_ONLY guards.
+
+	* tests/Makefile.am,
+	* tests/global_vars1.cc,
+	* tests/global_vars2.cc: Add a new test to check whether global
+	variables are declared correctly or not.
+
+	* tests/border/find_full.cc,
+	* tests/border/get_full.cc,
+	* tests/convert/to_image.cc,
+	* tests/core/image/cast_image.cc,
+	* tests/core/image/image_if.cc,
+	* tests/core/site_set/pset_if.cc,
+	* tests/level/fill_with_image.cc,
+	* tests/level/fill_with_value.cc,
+	* tests/level/paste.cc,
+	* tests/level/transform.cc,
+	* tests/trait/image/images.cc: update according the new use of
+	p2v::iota and p2b::chess.
+
+	* tests/pw/image.cc: Make it a real test.
+
+	* mln/level/compute.hh: Fix ambiguity.
+
+	* tests/border/get.cc,
+	* tests/border/resize_image_if.cc: Fix tests.
+	
 2008-11-13  Thierry Geraud  <thierry.geraud(a)lrde.epita.fr>
 
 	Specialize accu tranform for fastest images.
diff --git a/milena/mln/arith/diff_abs.hh b/milena/mln/arith/diff_abs.hh
index 141a38a..623a0b0 100644
--- a/milena/mln/arith/diff_abs.hh
+++ b/milena/mln/arith/diff_abs.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ARITH_DIFF_ABS_HH
 # define MLN_ARITH_DIFF_ABS_HH
 
-/*! \file mln/arith/diff_abs.hh
- *
- * \brief Point-wise addition between images.
- *
- * \todo Speedup; some versions are not optimal.
- */
+/// \file mln/arith/diff_abs.hh
+///
+/// Point-wise addition between images.
+///
+/// \todo Speedup; some versions are not optimal.
 
 # include <mln/arith/includes.hh>
 # include <mln/fun/vv2v/diff_abs.hh>
@@ -45,8 +45,8 @@ namespace mln
   namespace arith
   {
 
-    /*! Point-wise absolute difference of images \p lhs and \p rhs.
-     *
+    /// Point-wise absolute difference of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \result The result image.
@@ -76,10 +76,10 @@ namespace mln
       return output;
     }
 
-  } // end of namespace mln::arith
-
 # endif // ! MLN_INCLUDE_ONLY
 
+  } // end of namespace mln::arith
+
 } // end of namespace mln
 
 
diff --git a/milena/mln/arith/min.hh b/milena/mln/arith/min.hh
index a8aaa10..67ae6c0 100644
--- a/milena/mln/arith/min.hh
+++ b/milena/mln/arith/min.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ARITH_MIN_HH
 # define MLN_ARITH_MIN_HH
 
-/*! \file mln/arith/min.hh
- *
- * \brief Point-wise min between images.
- */
+/// \file mln/arith/min.hh
+///
+/// Point-wise min between images.
 
 # include <mln/core/concept/image.hh>
 
@@ -45,8 +45,8 @@ namespace mln
   namespace arith
   {
 
-    /*! Point-wise min of images \p lhs and \p rhs.
-     *
+    /// Point-wise min of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \result The result image.
@@ -58,8 +58,8 @@ namespace mln
     min(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise min of image \p lhs in image \p rhs.
-     *
+    /// Point-wise min of image \p lhs in image \p rhs.
+    /*!
      * \param[in,out] lhs First operand image.
      * \param[in] rhs Second operand image.
      *
diff --git a/milena/mln/arith/min.spe.hh b/milena/mln/arith/min.spe.hh
index 25fca00..b31029b 100644
--- a/milena/mln/arith/min.spe.hh
+++ b/milena/mln/arith/min.spe.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ARITH_MIN_SPE_HH
 # define MLN_ARITH_MIN_SPE_HH
 
-/*! \file mln/arith/min.spe.hh
- *
- * \brief Specializations for mln::arith::min.
- */
+/// \file mln/arith/min.spe.hh
+///
+/// Specializations for mln::arith::min.
 
 # ifndef MLN_ARITH_MIN_HH
 #  error "Forbidden inclusion of *.spe.hh"
diff --git a/milena/mln/arith/minus.hh b/milena/mln/arith/minus.hh
index 6419e03..5a7db44 100644
--- a/milena/mln/arith/minus.hh
+++ b/milena/mln/arith/minus.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ARITH_MINUS_HH
 # define MLN_ARITH_MINUS_HH
 
-/*! \file mln/arith/minus.hh
- *
- * \brief Point-wise substraction between images.
- *
- * \todo Speedup; some versions are not optimal.
- */
+/// \file mln/arith/minus.hh
+///
+/// Point-wise substraction between images.
+///
+/// \todo Speedup; some versions are not optimal.
 
 # include <mln/arith/includes.hh>
 
@@ -87,8 +87,8 @@ namespace mln
   namespace arith
   {
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \result The result image.
@@ -100,8 +100,8 @@ namespace mln
       minus(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \param[in] f   Function.
@@ -114,8 +114,8 @@ namespace mln
       minus(const Image<L>& lhs, const Image<R>& rhs, const Function_v2v<F>& f);
 
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \result The result image.
@@ -129,8 +129,8 @@ namespace mln
       minus(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise addition of image \p rhs in image \p lhs.
-     *
+    /// Point-wise addition of image \p rhs in image \p lhs.
+    /*!
      * \param[in,out] lhs First operand image (subject to addition).
      * \param[in] rhs Second operand image (to be added to \p lhs).
      *
@@ -145,8 +145,8 @@ namespace mln
     minus_inplace(Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in] input The image.
      * \param[in] val The value.
      * \result The result image.
@@ -158,8 +158,8 @@ namespace mln
       minus_cst(const Image<I>& input, const V& val);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in] input The image.
      * \param[in] val The value.
      * \param[in] f   Function.
@@ -172,8 +172,8 @@ namespace mln
       minus_cst(const Image<I>& input, const V& val, const Function_v2v<F>& f);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in,out] input The image.
      * \param[in] val The value.
      *
diff --git a/milena/mln/arith/plus.hh b/milena/mln/arith/plus.hh
index a18026a..b4f7b2f 100644
--- a/milena/mln/arith/plus.hh
+++ b/milena/mln/arith/plus.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ARITH_PLUS_HH
 # define MLN_ARITH_PLUS_HH
 
-/*! \file mln/arith/plus.hh
- *
- * \brief Point-wise addition between images.
- *
- * \todo Speedup; some versions are not optimal.
- */
+/// \file mln/arith/plus.hh
+///
+/// Point-wise addition between images.
+///
+/// \todo Speedup; some versions are not optimal.
 
 # include <mln/arith/includes.hh>
 
@@ -87,8 +87,8 @@ namespace mln
   namespace arith
   {
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \result The result image.
@@ -100,8 +100,8 @@ namespace mln
       plus(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \param[in] f   Function.
@@ -114,8 +114,8 @@ namespace mln
       plus(const Image<L>& lhs, const Image<R>& rhs, const Function_v2v<F>& f);
 
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \result The result image.
@@ -129,8 +129,8 @@ namespace mln
       plus(const Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise addition of image \p rhs in image \p lhs.
-     *
+    /// Point-wise addition of image \p rhs in image \p lhs.
+    /*!
      * \param[in,out] lhs First operand image (subject to addition).
      * \param[in] rhs Second operand image (to be added to \p lhs).
      *
@@ -145,8 +145,8 @@ namespace mln
     plus_inplace(Image<L>& lhs, const Image<R>& rhs);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in] input The image.
      * \param[in] val The value.
      * \result The result image.
@@ -158,8 +158,8 @@ namespace mln
       plus_cst(const Image<I>& input, const V& val);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in] input The image.
      * \param[in] val The value.
      * \param[in] f   Function.
@@ -172,8 +172,8 @@ namespace mln
       plus_cst(const Image<I>& input, const V& val, const Function_v2v<F>& f);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in] input The image.
      * \param[in] val The value.
      * \result The result image.
@@ -185,8 +185,8 @@ namespace mln
       plus_cst(const Image<I>& input, const V& val);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in,out] input The image.
      * \param[in] val The value.
      *
diff --git a/milena/mln/arith/revert.hh b/milena/mln/arith/revert.hh
index c4d1044..ee0a386 100644
--- a/milena/mln/arith/revert.hh
+++ b/milena/mln/arith/revert.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ARITH_REVERT_HH
 # define MLN_ARITH_REVERT_HH
 
-/*! \file mln/arith/revert.hh
- *
- * \brief Point-wise revert (min -> max and max -> min) of images.
- *
- * \todo Add static assertion and save one iterator in in-place version.
- */
+/// \file mln/arith/revert.hh
+///
+/// Point-wise revert (min -> max and max -> min) of images.
+///
+/// \todo Add static assertion and save one iterator in in-place version.
 
 # include <mln/core/concept/image.hh>
 # include <mln/trait/value_.hh>
@@ -52,8 +52,8 @@ namespace mln
   namespace arith
   {
 
-    /*! Point-wise reversion of image \p input.
-     *
+    /// Point-wise reversion of image \p input.
+    /*!
      * \param[in] input the input image.
      * \result The result image.
      *
@@ -67,8 +67,8 @@ namespace mln
     mln_concrete(I) revert(const Image<I>& input);
 
 
-    /*! Point-wise in-place reversion of image \p input.
-     *
+    /// Point-wise in-place reversion of image \p input.
+    /*!
      * \param[in,out] input The target image.
      *
      * \pre \p input.has_data
diff --git a/milena/mln/arith/revert.spe.hh b/milena/mln/arith/revert.spe.hh
index 8a512b5..fcf8b74 100644
--- a/milena/mln/arith/revert.spe.hh
+++ b/milena/mln/arith/revert.spe.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,11 +29,9 @@
 #ifndef MLN_ARITH_REVERT_SPE_HH
 # define MLN_ARITH_REVERT_SPE_HH
 
-/*! \file mln/arith/revert.spe.hh
- *
- * \brief Specializations for mln::arith::revert.
- *
- */
+/// \file mln/arith/revert.spe.hh
+///
+/// Specializations for mln::arith::revert.
 
 # ifndef MLN_ARITH_REVERT_HH
 #  error "Forbidden inclusion of *.spe.hh"
diff --git a/milena/mln/arith/times.hh b/milena/mln/arith/times.hh
index f0609c4..eedab41 100644
--- a/milena/mln/arith/times.hh
+++ b/milena/mln/arith/times.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ARITH_TIMES_HH
 # define MLN_ARITH_TIMES_HH
 
-/*! \file mln/arith/times.hh
- *
- * \brief Point-wise multiplication between images.
- *
- * \todo Speedup; some versions are not optimal.
- */
+/// \file mln/arith/times.hh
+///
+/// Point-wise multiplication between images.
+///
+/// \todo Speedup; some versions are not optimal.
 
 # include <mln/arith/includes.hh>
 
@@ -88,8 +88,8 @@ namespace mln
   namespace arith
   {
 
-    /*! Point-wise addition of images \p lhs and \p rhs.
-     *
+    /// Point-wise addition of images \p lhs and \p rhs.
+    /*!
      * \param[in] lhs First operand image.
      * \param[in] rhs Second operand image.
      * \param[out] output The result image.
@@ -100,8 +100,8 @@ namespace mln
     void times(const Image<L>& lhs, const Image<R>& rhs, Image<O>& output);
 
 
-    /*! Point-wise addition of the value \p val to image \p input.
-     *
+    /// Point-wise addition of the value \p val to image \p input.
+    /*!
      * \param[in] input The image.
      * \param[in] val The value.
      * \param[out] output The result image.
@@ -112,8 +112,8 @@ namespace mln
     void times_cst(const Image<I>& input, const V& val, Image<O>& output);
 
 
-    /*! Point-wise addition of image \p rhs in image \p lhs.
-     *
+    /// Point-wise addition of image \p rhs in image \p lhs.
+    /*!
      * \param[in] lhs First operand image (subject to addition).
      * \param[in,out] rhs Second operand image (to be added to \p lhs).
      *
diff --git a/milena/mln/arith/times.spe.hh b/milena/mln/arith/times.spe.hh
index e88ae78..ef192bb 100644
--- a/milena/mln/arith/times.spe.hh
+++ b/milena/mln/arith/times.spe.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,11 +29,9 @@
 #ifndef MLN_ARITH_TIMES_SPE_HH
 # define MLN_ARITH_TIMES_SPE_HH
 
-/*! \file mln/arith/times.spe.hh
- *
- * \brief Specializations for mln::arith::times.
- *
- */
+/// \file mln/arith/times.spe.hh
+///
+/// Specializations for mln::arith::times.
 
 # ifndef MLN_ARITH_TIMES_HH
 #  error "Forbidden inclusion of *.spe.hh"
diff --git a/milena/mln/canvas/browsing/backdiagonal2d.hh b/milena/mln/canvas/browsing/backdiagonal2d.hh
index ee07c80..0ad407e 100644
--- a/milena/mln/canvas/browsing/backdiagonal2d.hh
+++ b/milena/mln/canvas/browsing/backdiagonal2d.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_BACKDIAGONAL2D_HH
 # define MLN_CANVAS_BROWSING_BACKDIAGONAL2D_HH
 
-/*! \file mln/canvas/browsing/backdiagonal2d.hh
- *
- * \brief Backdiagonal2d browsing of an image.
- */
+/// \file mln/canvas/browsing/backdiagonal2d.hh
+///
+/// Backdiagonal2d browsing of an image.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/core/concept/image.hh>
@@ -45,9 +45,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Browsing in a certain direction.
       /*!
-       * \brief Browsing in a certain direction.
-       *
        * This canvas browse all the point of an image 'input' of type
        * 'I' and of dimension 'dim' in the direction 'dir'.
        *
@@ -86,12 +85,14 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
+      };
 
-      backdiagonal2d;
+      extern const backdiagonal2d_t backdiagonal2d;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const backdiagonal2d_t backdiagonal2d;
+
       template <typename F>
       inline
       void
@@ -118,10 +119,7 @@ namespace mln
 	f.p[0] = pmax[0];
 	f.p[1] = pmin[1];
 
-	trace::entering("canvas::browsing::backdiagonal2d::init");
 	f.init();
-	trace::exiting("canvas::browsing::backdiagonal2d::init");
-
 
 	while (f.input.domain().has(f.p))
 	{
@@ -157,9 +155,7 @@ namespace mln
 	  f.p = start_diag + dp_second;
 	}
 
-	trace::entering("canvas::browsing::backdiagonal2d::final");
 	f.final();
-	trace::exiting("canvas::browsing::backdiagonal2d::final");
 	trace::exiting("canvas::browsing::backdiagonal2d");
       }
 
diff --git a/milena/mln/canvas/browsing/diagonal2d.hh b/milena/mln/canvas/browsing/diagonal2d.hh
index 1b825e8..87bdaa9 100644
--- a/milena/mln/canvas/browsing/diagonal2d.hh
+++ b/milena/mln/canvas/browsing/diagonal2d.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_DIAGONAL2D_HH
 # define MLN_CANVAS_BROWSING_DIAGONAL2D_HH
 
-/*! \file mln/canvas/browsing/diagonal2d.hh
- *
- * \brief Diagonal2d browsing of an image.
- */
+/// \file mln/canvas/browsing/diagonal2d.hh
+///
+/// Diagonal2d browsing of an image.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/core/concept/image.hh>
@@ -45,9 +45,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Browsing in a certain direction.
       /*!
-       * \brief Browsing in a certain direction.
-       *
        * This canvas browse all the point of an image 'input' of type
        * 'I' and of dimension 'dim' in the direction 'dir'.
        *
@@ -86,12 +85,14 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
+      };
 
-      diagonal2d;
+      extern const diagonal2d_t diagonal2d;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const diagonal2d_t diagonal2d;
+
       template <typename F>
       inline
       void
@@ -116,10 +117,7 @@ namespace mln
 
 	f.p = pmin;
 
-	trace::entering("canvas::browsing::diagonal2d::init");
 	f.init();
-	trace::exiting("canvas::browsing::diagonal2d::init");
-
 
 	while (f.input.domain().has(f.p))
 	{
@@ -155,9 +153,7 @@ namespace mln
 	  f.p = start_diag + dp_second;
 	}
 
-	trace::entering("canvas::browsing::diagonal2d::final");
 	f.final();
-	trace::exiting("canvas::browsing::diagonal2d::final");
 	trace::exiting("canvas::browsing::diagonal2d");
       }
 
diff --git a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
index 2ea522f..164c060 100644
--- a/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
+++ b/milena/mln/canvas/browsing/dir_struct_elt_incr_update.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_DIR_STRUCT_ELT_INCR_UPDATE_HH
 # define MLN_CANVAS_BROWSING_DIR_STRUCT_ELT_INCR_UPDATE_HH
 
-/*! \file mln/canvas/browsing/dir_struct_elt_incr_update.hh
- *
- * \brief Directional browsing of an image with structuring element.
- */
+/// \file mln/canvas/browsing/dir_struct_elt_incr_update.hh
+///
+/// Directional browsing of an image with structuring element.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/core/concept/image.hh>
@@ -44,10 +44,9 @@ namespace mln
 
     namespace browsing
     {
-      
+
+      /// Browsing in a certain direction with a segment.
       /*!
-       * \brief Browsing in a certain direction with a segment.
-       *
        * This canvas browse all the point of an image 'input' of type
        * 'I', of dimension 'dim' in the direction 'dir' with
        * considering weigh the 'length' nearest points.
@@ -90,12 +89,14 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
+      };
 
-      dir_struct_elt_incr_update;
+      extern const dir_struct_elt_incr_update_t dir_struct_elt_incr_update;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const dir_struct_elt_incr_update_t dir_struct_elt_incr_update;
+
       template <typename F>
       inline
       void
@@ -116,7 +117,7 @@ namespace mln
 	  pmax_dir_minus_half_length = pmax_dir - f.length / 2;
 
 	mln_psite(I) pt, pu;
-	
+
 	typedef mln_coord(I)& coord_ref;
 	coord_ref
 	  ct = pt[f.dir],
@@ -124,41 +125,27 @@ namespace mln
 	  p_dir = f.p[f.dir];
 
 	f.p = pmin;
-	
-	trace::entering("canvas::browsing::dir_struct_elt_incr_update::init");
+
 	f.init();
-	trace::exiting("canvas::browsing::dir_struct_elt_incr_update::init");
-	
+
 	do
 	{
 	  pt = f.p;
 	  pu = f.p;
 
-	  trace::entering("canvas::browsing::dir_struct_elt_incr_update::init_line");
 	  f.init_line();
-	  trace::exiting("canvas::browsing::dir_struct_elt_incr_update::init_line");
 
 	  // initialization (before first point of the line)
 	  for (ct = pmin_dir; ct < pmin_dir_plus_half_length; ++ ct)
 	    if (f.input.has(pt))
-	    {
-	      trace::entering("canvas::browsing::dir_struct_elt_incr_update::add_point");
 	      f.add_point(pt);
-	      trace::exiting("canvas::browsing::dir_struct_elt_incr_update::add_point");
-	    }
 
 	  // left columns (just take new points)
 	  for (p_dir = pmin_dir; p_dir <= pmin_dir_plus_half_length; ++p_dir, ++ct)
 	  {
 	    if (f.input.has(pt))
-	    {
-	      trace::entering("canvas::browsing::dir_struct_elt_incr_update::add_point");
 	      f.add_point(pt);
-	      trace::exiting("canvas::browsing::dir_struct_elt_incr_update::add_point");
-	    }
-	    trace::entering("canvas::browsing::dir_struct_elt_incr_update::next");
 	    f.next();
-	    trace::exiting("canvas::browsing::dir_struct_elt_incr_update::next");
 	  }
 
 	  // middle columns (both take and untake)
@@ -166,38 +153,22 @@ namespace mln
 	  for (; p_dir <= pmax_dir_minus_half_length; ++cu, ++p_dir, ++ct)
 	  {
 	    if (f.input.has(pt))
-	    {
-	      trace::entering("canvas::browsing::dir_struct_elt_incr_update::add_point");
 	      f.add_point(pt);
-	      trace::exiting("canvas::browsing::dir_struct_elt_incr_update::add_point");
-	    }
 	    if (f.input.has(pu))
-	    {
-	      trace::entering("canvas::browsing::dir_struct_elt_incr_update::remove_point");
 	      f.remove_point(pu);
-	      trace::exiting("canvas::browsing::dir_struct_elt_incr_update::remove_point");
-	    }
-	    trace::entering("canvas::browsing::dir_struct_elt_incr_update::next");
 	    f.next();
-	    trace::exiting("canvas::browsing::dir_struct_elt_incr_update::next");
 	  }
 
 	  // right columns (now just untake old points)
 	  for (; p_dir <= pmax_dir; ++cu, ++p_dir)
 	  {
 	    if (f.input.has(pu))
-	    {
-	      trace::entering("canvas::browsing::dir_struct_elt_incr_update::remove_point");
 	      f.remove_point(pu);
-	      trace::exiting("canvas::browsing::dir_struct_elt_incr_update::remove_point");
-	    }
-	    trace::entering("canvas::browsing::dir_struct_elt_incr_update::next");
 	    f.next();
-	    trace::exiting("canvas::browsing::dir_struct_elt_incr_update::next");
 	  }
 
 	  p_dir = pmin_dir;
-	  
+
 	  for (int c = F::dim - 1; c >= 0; --c)
 	  {
 	    if (c == int(f.dir))
@@ -211,9 +182,7 @@ namespace mln
 	  }
 	} while (f.p != pmin);
 
-	trace::entering("canvas::browsing::dir_struct_elt_incr_update::final");
 	f.final();
-	trace::exiting("canvas::browsing::dir_struct_elt_incr_update::final");
 	trace::exiting("canvas::browsing::dir_struct_elt_incr_update");
       }
 
diff --git a/milena/mln/canvas/browsing/directional.hh b/milena/mln/canvas/browsing/directional.hh
index adab4fc..c9f7b58 100644
--- a/milena/mln/canvas/browsing/directional.hh
+++ b/milena/mln/canvas/browsing/directional.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_DIRECTIONAL_HH
 # define MLN_CANVAS_BROWSING_DIRECTIONAL_HH
 
-/*! \file mln/canvas/browsing/directional.hh
- *
- * \brief Directional browsing of an image.
- */
+/// \file mln/canvas/browsing/directional.hh
+///
+/// Directional browsing of an image.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/core/concept/image.hh>
@@ -45,9 +45,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Browsing in a certain direction.
       /*!
-       * \brief Browsing in a certain direction.
-       *
        * This canvas browse all the point of an image 'input' of type
        * 'I' and of dimension 'dim' in the direction 'dir'.
        *
@@ -94,17 +93,20 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
+      };
 
-      directional;
+      extern const directional_t directional;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const directional_t directional;
+
       template <typename F>
       inline
       void
       directional_t::operator()(F& f) const
       {
+	trace::entering("canvas::browsing::directional");
 	mln_precondition(f.dir < f.dim);
 	typedef typename F::I I;
 
@@ -145,6 +147,7 @@ namespace mln
 	} while (f.p != pmin);
 
 	f.final();
+	trace::exiting("canvas::browsing::directional");
       }
 
 # endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/canvas/browsing/essential.hh b/milena/mln/canvas/browsing/essential.hh
index 58447c6..db94973 100644
--- a/milena/mln/canvas/browsing/essential.hh
+++ b/milena/mln/canvas/browsing/essential.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2008 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
diff --git a/milena/mln/canvas/browsing/fwd.hh b/milena/mln/canvas/browsing/fwd.hh
index d4b1602..79a07d5 100644
--- a/milena/mln/canvas/browsing/fwd.hh
+++ b/milena/mln/canvas/browsing/fwd.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_FWD_HH
 # define MLN_CANVAS_BROWSING_FWD_HH
 
-/*! \file mln/canvas/browsing/fwd.hh
- *
- * \brief Canvas for forward browsing.
- */
+/// \file mln/canvas/browsing/fwd.hh
+///
+/// Canvas for forward browsing.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/core/concept/image.hh>
@@ -46,9 +46,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Canvas for forward browsing
       /*!
-       * \brief Canvas for forward browsing
-       *
        * This canvas browse all the points of an image 'input' of type
        * 'I' from left to right and from top to bottom
        *
@@ -77,13 +76,14 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
+      };
 
-      fwd;
-      
+      extern const fwd_t fwd;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const fwd_t fwd;
+
       template <typename F>
       inline
       void
diff --git a/milena/mln/canvas/browsing/hyper_directional.hh b/milena/mln/canvas/browsing/hyper_directional.hh
index 00afd5e..beba7a1 100644
--- a/milena/mln/canvas/browsing/hyper_directional.hh
+++ b/milena/mln/canvas/browsing/hyper_directional.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_HYPER_DIRECTIONAL_HH
 # define MLN_CANVAS_BROWSING_HYPER_DIRECTIONAL_HH
 
-/*! \file mln/canvas/browsing/hyper_directional.hh
- *
- * \brief Hyper_Directional browsing of an image.
- */
+/// \file mln/canvas/browsing/hyper_directional.hh
+///
+/// Hyper_Directional browsing of an image.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/core/concept/image.hh>
@@ -45,9 +45,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Browsing in a certain direction.
       /*!
-       * \brief Browsing in a certain direction.
-       *
        * This canvas browse all the point of an image 'input' of type
        * 'I' and of dimension 'dim' in the direction 'dir'.
        *
@@ -79,12 +78,14 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
+      };
 
-      hyper_directional;
+      extern const hyper_directional_t hyper_directional;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const hyper_directional_t hyper_directional;
+
       template <typename F>
       inline
       void
diff --git a/milena/mln/canvas/browsing/snake_fwd.hh b/milena/mln/canvas/browsing/snake_fwd.hh
index 41e1bcd..52e39e9 100644
--- a/milena/mln/canvas/browsing/snake_fwd.hh
+++ b/milena/mln/canvas/browsing/snake_fwd.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_SNAKE_FWD_HH
 # define MLN_CANVAS_BROWSING_SNAKE_FWD_HH
 
-/*! \file mln/canvas/browsing/snake_fwd.hh
- *
- * \brief Browsing in a snake-way, forward.
- */
+/// \file mln/canvas/browsing/snake_fwd.hh
+///
+/// Browsing in a snake-way, forward.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/geom/size2d.hh>
@@ -46,9 +46,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Browsing in a snake-way, forward.
       /*!
-       * \brief Browsing in a snake-way, forward.
-       *
        * This canvas browse all the point of an image 'input' like
        * this :
        *
@@ -88,14 +87,14 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
-
-      snake_fwd;
-
+      };
 
+      extern const snake_fwd_t snake_fwd;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const snake_fwd_t snake_fwd;
+
       template <typename F>
       inline
       void
@@ -116,36 +115,28 @@ namespace mln
 	def::coord& col = f.p.col();
 
 	// initialization
-	trace::entering("canvas::browsing::snake_fwd::init");
 	f.init();
-	trace::exiting("canvas::browsing::snake_fwd::init");
 
 	bool fwd = true;
 	for (row = min_row; row <= max_row; ++row)
 	  // FIXME: Add "if (f.input.has(p))"?
 	  {
 	    // go down
-	    trace::entering("canvas::browsing::snake_fwd::init");
 	    f.down();
-	    trace::exiting("canvas::browsing::snake_fwd::init");
 
 	    if (fwd)
 	      // browse line fwd
 	      while (col < max_col)
 		{
 		  ++col;
-		  trace::entering("canvas::browsing::snake_fwd::fwd");
 		  f.fwd();
-		  trace::exiting("canvas::browsing::snake_fwd::fwd");
 		}
 	    else
 	      // browse line bkd
 	      while (col > min_col)
 		{
 		  --col;
-		  trace::entering("canvas::browsing::snake_fwd::bkd");
 		  f.bkd();
-		  trace::exiting("canvas::browsing::snake_fwd::bkd");
 		}
 
 	    // change browsing
diff --git a/milena/mln/canvas/browsing/snake_generic.hh b/milena/mln/canvas/browsing/snake_generic.hh
index be275d9..540c2e4 100644
--- a/milena/mln/canvas/browsing/snake_generic.hh
+++ b/milena/mln/canvas/browsing/snake_generic.hh
@@ -45,9 +45,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Multidimentional Browsing in a given-way.
       /*!
-       * \brief Multidimentional Browsing in a given-way.
-       *
        * F shall feature: \n
        * { \n
        *   --- as attributes: \n
@@ -80,14 +79,15 @@ namespace mln
 
 	template <typename F>
 	void operator()(F& f) const;
-      }
-
-      snake_generic;
 
+      };
 
+      extern const snake_generic_t snake_generic;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const snake_generic_t snake_generic;
+
       template <typename F>
       inline
       void
@@ -97,16 +97,14 @@ namespace mln
 	mln_precondition(f.input.has_data());
 
 	// p init
- 	f.p = f.input.bbox().pmin();// - f.dps[0];
+	f.p = f.input.bbox().pmin();// - f.dps[0];
 
 	std::vector< int > directions(f.moves.size(), 0);
 	unsigned deph = 0;
 	unsigned total_deph = f.moves.size() / 2 + 1;
 
 	// initialization
-	trace::entering("canvas::browsing::snake_generic::init");
 	f.init();
-	trace::exiting("canvas::browsing::snake_generic::init");
 
 	bool first = true;
 	directions[deph] = 1;
@@ -124,7 +122,7 @@ namespace mln
 	  {
 	    // Go up the tree
 	    deph--;
-	    if  (deph >= 1)
+	    if (deph >= 1)
 	      // Change directions
 	      directions[deph] = directions[deph] == 1 ? 0 : 1;
 	    continue;
diff --git a/milena/mln/canvas/browsing/snake_vert.hh b/milena/mln/canvas/browsing/snake_vert.hh
index bfa2df0..36b1ceb 100644
--- a/milena/mln/canvas/browsing/snake_vert.hh
+++ b/milena/mln/canvas/browsing/snake_vert.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_CANVAS_BROWSING_SNAKE_VERT_HH
 # define MLN_CANVAS_BROWSING_SNAKE_VERT_HH
 
-/*! \file mln/canvas/browsing/snake_vert.hh
- *
- * \brief Browsing in a snake-way, forward.
- */
+/// \file mln/canvas/browsing/snake_vert.hh
+///
+/// Browsing in a snake-way, forward.
 
 # include <mln/core/concept/browsing.hh>
 # include <mln/geom/size2d.hh>
@@ -46,9 +46,8 @@ namespace mln
     namespace browsing
     {
 
+      /// Browsing in a snake-way, forward.
       /*!
-       * \brief Browsing in a snake-way, forward.
-       *
        * This canvas browse all the point of an image 'input' like
        * this :
        *
@@ -88,22 +87,22 @@ namespace mln
       {
 	template <typename F>
 	void operator()(F& f) const;
-      }
-
-      snake_vert;
-
+      };
 
+      extern const snake_vert_t snake_vert;
 
 # ifndef MLN_INCLUDE_ONLY
 
+      const snake_vert_t snake_vert;
+
       template <typename F>
       inline
       void
       snake_vert_t::operator()(F& f) const
       {
 	// Fixme: check the dimension of the input
-// 	mlc_equal(mln_trait_image_dimension(I)(),
-// 		  trait::image::dimension::two_d)::check();
+//	mlc_equal(mln_trait_image_dimension(I)(),
+//		  trait::image::dimension::two_d)::check();
 	trace::entering("canvas::browsing::snake_vert");
 	mln_precondition(f.input.has_data());
 	int
@@ -116,36 +115,28 @@ namespace mln
 	def::coord& col = f.p.col();
 
 	// initialization
-	trace::entering("canvas::browsing::snake_vert::init");
 	f.init();
-	trace::exiting("canvas::browsing::snake_vert::init");
 
 	bool down = true;
 	for (col = min_col; col <= max_col; ++col)
 	  // FIXME: Add "if (f.input.has(p))"?
 	  {
 	    // go fwd
-	    trace::entering("canvas::browsing::snake_vert::init");
 	    f.fwd();
-	    trace::exiting("canvas::browsing::snake_vert::init");
 
 	    if (down)
 	      // browse col down.
 	      while (row < max_row)
 		{
 		  ++row;
-		  trace::entering("canvas::browsing::snake_vert::down");
 		  f.down();
-		  trace::exiting("canvas::browsing::snake_vert::down");
 		}
 	    else
 	      // browse col up.
 	      while (row > min_row)
 		{
 		  --row;
-		  trace::entering("canvas::browsing::snake_vert::up");
 		  f.up();
-		  trace::exiting("canvas::browsing::snake_vert::up");
 		}
 
 	    // change browsing
diff --git a/milena/mln/core/contract.hh b/milena/mln/core/contract.hh
index 5d03057..58e71cc 100644
--- a/milena/mln/core/contract.hh
+++ b/milena/mln/core/contract.hh
@@ -67,6 +67,7 @@ namespace mln
 
 # ifndef MLN_INCLUDE_ONLY
 
+  inline
   bool implies(bool lexpr, bool rexpr)
   {
     return ! (rexpr) || (lexpr);
diff --git a/milena/mln/display/save.hh b/milena/mln/display/save.hh
index 88b09f2..addd6b7 100644
--- a/milena/mln/display/save.hh
+++ b/milena/mln/display/save.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,11 +29,10 @@
 #ifndef MLN_DISPLAY_SAVE_HH
 # define MLN_DISPLAY_SAVE_HH
 
-/*! \file mln/display/save.hh
- *
- * \brief Definition of function which saves an image on a temporary
- * files.
- */
+/// \file mln/display/save.hh
+///
+/// Definition of function which saves an image on a temporary
+/// files.
 
 # include <mln/trait/image_from_grid.hh>
 # include <mln/core/image/image_if.hh>
@@ -49,23 +49,21 @@ namespace mln
   namespace display
   {
 
-    /*! Map which stocks the location of the saved file by the id of
-     *  the image.
-     *
-     */
-    std::map<void*, std::string> map_saved_image_tmp_;
+    /// Map which stocks the location of the saved file by the id of
+    /// the image.
+    extern std::map<void*, std::string> map_saved_image_tmp_;
 
-    /*! Save an image in a temporary file in ppm format.
-     *
-     * \param[in] input_ the image to save.
-     *
-     */
+    /// Save an image in a temporary file in ppm format.
+    ///
+    /// \param[in] input_ the image to save.
     template <typename I>
     void
     save(const Image<I>& input_);
 
 # ifndef MLN_INCLUDE_ONLY
 
+    std::map<void*, std::string> map_saved_image_tmp_;
+
     namespace impl
     {
       template <typename I>
diff --git a/milena/mln/estim/all.hh b/milena/mln/estim/all.hh
index 95649b8..4d35d3f 100644
--- a/milena/mln/estim/all.hh
+++ b/milena/mln/estim/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ESTIM_ALL_HH
 # define MLN_ESTIM_ALL_HH
 
-/*! \file mln/estim/all.hh
- *
- * \brief File that includes all estimation materials.
- */
+/// \file mln/estim/all.hh
+///
+/// File that includes all estimation materials.
 
 
 namespace mln
diff --git a/milena/mln/estim/essential.hh b/milena/mln/estim/essential.hh
index 4afe74d..3d807ad 100644
--- a/milena/mln/estim/essential.hh
+++ b/milena/mln/estim/essential.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ESTIM_ESSENTIAL_HH
 # define MLN_ESTIM_ESSENTIAL_HH
 
-/*! \file mln/estim/essential.hh
- *
- * \brief File that includes essential estimation materials.
- */
+/// \file mln/estim/essential.hh
+///
+/// File that includes essential estimation materials.
 
 # include <mln/estim/all.hh>
 
diff --git a/milena/mln/estim/mean.hh b/milena/mln/estim/mean.hh
index 0c6fbdb..25457f8 100644
--- a/milena/mln/estim/mean.hh
+++ b/milena/mln/estim/mean.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ESTIM_MEAN_HH
 # define MLN_ESTIM_MEAN_HH
 
-/*! \file mln/estim/mean.hh
- *
- * \brief Compute the mean pixel value.
- */
+/// \file mln/estim/mean.hh
+///
+/// Compute the mean pixel value.
 
 # include <mln/accu/mean.hh>
 # include <mln/level/compute.hh>
@@ -43,8 +43,8 @@ namespace mln
   namespace estim
   {
 
-    /*! \brief Compute the mean value of the pixels of image \p input.
-     *
+    /// Compute the mean value of the pixels of image \p input.
+    /*!
      * \param[in] input The image.
      * \return The mean value.
      */
@@ -52,8 +52,8 @@ namespace mln
     mln_sum(mln_value(I)) mean(const Image<I>& input);
 
 
-    /*! \brief Compute the mean value of the pixels of image \p input.
-     *
+    /// Compute the mean value of the pixels of image \p input.
+    /*!
      * \param[in] input The image.
      * \param[out] result The mean value.
      *
diff --git a/milena/mln/estim/min_max.hh b/milena/mln/estim/min_max.hh
index 64e6958..14e1581 100644
--- a/milena/mln/estim/min_max.hh
+++ b/milena/mln/estim/min_max.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ESTIM_MIN_MAX_HH
 # define MLN_ESTIM_MIN_MAX_HH
 
-/*! \file mln/estim/min_max.hh
- *
- * \brief Compute the min and max pixel values of an image.
- *
- * \todo Overload while returning an std::pair.
- */
+/// \file mln/estim/min_max.hh
+///
+/// Compute the min and max pixel values of an image.
+///
+/// \todo Overload while returning an std::pair.
 
 # include <mln/accu/min_max.hh>
 # include <mln/level/compute.hh>
@@ -45,8 +45,8 @@ namespace mln
   namespace estim
   {
 
-    /*! \brief Compute the min and max values of the pixels of image \p input.
-     *
+    /// Compute the min and max values of the pixels of image \p input.
+    /*!
      * \param[in] input The image.
      * \param[out] min The minimum pixel value of \p input.
      * \param[out] max The maximum pixel value of \p input.
diff --git a/milena/mln/estim/sum.hh b/milena/mln/estim/sum.hh
index 2defc4f..1df276d 100644
--- a/milena/mln/estim/sum.hh
+++ b/milena/mln/estim/sum.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ESTIM_SUM_HH
 # define MLN_ESTIM_SUM_HH
 
-/*! \file mln/estim/sum.hh
- *
- * \brief Compute the sum pixel value.
- *
- * \todo Sum works on level so move into mln/level; otherwise on pix then ambiguous.
- */
+/// \file mln/estim/sum.hh
+///
+/// Compute the sum pixel value.
+///
+/// \todo Sum works on level so move into mln/level; otherwise on pix then ambiguous.
 
 # include <mln/accu/sum.hh>
 # include <mln/level/compute.hh>
@@ -45,8 +45,8 @@ namespace mln
   namespace estim
   {
 
-    /*! \brief Compute the sum value of the pixels of image \p input.
-     *
+    /// Compute the sum value of the pixels of image \p input.
+    /*!
      * \param[in] input The image.
      * \return The sum value.
      */
@@ -54,8 +54,8 @@ namespace mln
     mln_sum(mln_value(I)) sum(const Image<I>& input);
 
 
-    /*! \brief Compute the sum value of the pixels of image \p input.
-     *
+    /// Compute the sum value of the pixels of image \p input.
+    /*!
      * \param[in] input The image.
      * \param[out] result The sum value.
      */
diff --git a/milena/mln/fun/p2b/chess.hh b/milena/mln/fun/p2b/chess.hh
index 163b566..2f73cf9 100644
--- a/milena/mln/fun/p2b/chess.hh
+++ b/milena/mln/fun/p2b/chess.hh
@@ -48,20 +48,18 @@ namespace mln
 
       // FIXME: Doc!
 
-      struct chess_t : public Function_p2b< chess_t >
+      struct chess : public Function_p2b< chess >
       {
 	typedef bool result;
 	bool operator()(const point2d& p) const;
-      }
-
-      chess;
+      };
 
 
 # ifndef MLN_INCLUDE_ONLY
 
       inline
       bool
-      chess_t::operator()(const point2d& p) const
+      chess::operator()(const point2d& p) const
       {
 	return (p.row() + p.col()) % 2 == 0;
       }
diff --git a/milena/mln/fun/p2v/iota.hh b/milena/mln/fun/p2v/iota.hh
index ef58e90..233caa8 100644
--- a/milena/mln/fun/p2v/iota.hh
+++ b/milena/mln/fun/p2v/iota.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_FUN_P2V_IOTA_HH
 # define MLN_FUN_P2V_IOTA_HH
 
-/*! \file mln/fun/p2v/iota.hh
- *
- * \brief Iota function.
- */
+/// \file mln/fun/p2v/iota.hh
+///
+/// Iota function.
 
 # include <mln/core/concept/function.hh>
 
@@ -45,11 +45,11 @@ namespace mln
     namespace p2v
     {
 
-      struct iota_t : public Function_p2v< iota_t >
+      struct iota : public Function_p2v< iota >
       {
 	typedef unsigned result;
 
-	iota_t();
+	iota();
 
 	template <typename P>
 	unsigned operator()(const P&) const;
@@ -59,15 +59,13 @@ namespace mln
 
       protected:
 	mutable unsigned i_;
-      }
-
-      iota;
+      };
 
 
 # ifndef MLN_INCLUDE_ONLY
 
       inline
-      iota_t::iota_t()
+      iota::iota()
       {
 	reset();
       }
@@ -75,21 +73,21 @@ namespace mln
       template <typename P>
       inline
       unsigned
-      iota_t::operator()(const P&) const
+      iota::operator()(const P&) const
       {
 	return ++i_;
       }
 
       inline
       unsigned
-      iota_t::value() const
+      iota::value() const
       {
 	return i_;
       }
 
       inline
       void
-      iota_t::reset() const
+      iota::reset() const
       {
 	i_ = 0;
       }
diff --git a/milena/mln/fun/v2v/rgb_to_hsi.hh b/milena/mln/fun/v2v/rgb_to_hsi.hh
index 79d26fb..bf9bd5d 100644
--- a/milena/mln/fun/v2v/rgb_to_hsi.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsi.hh
@@ -36,8 +36,6 @@
 #include <mln/value/hsi.hh>
 
 
-// FIXME: Split interface and implementation.
-
 namespace mln
 {
 
@@ -54,40 +52,13 @@ namespace mln
 	typedef T_hsi result;
 
 	template <typename T_rgb>
-	T_hsi operator()(const T_rgb& rgb) const
-	{
-	  // Locals.
-	  static const double sqrt3_3 = std::sqrt(3) / 3;
-	  static const double inv_sqrt6 = 1 / std::sqrt(6);
-	  static const double inv_sqrt2 = 1 / std::sqrt(2);
-
-	  T_hsi hsi;
-
-	  double alpha = inv_sqrt2 * rgb.green() - inv_sqrt2 * rgb.blue();
-	  double beta =
-	    2 * inv_sqrt6 * rgb.red() -
-	    inv_sqrt6 * rgb.green() -
-	    inv_sqrt6 * rgb.blue();
-
-
-	  hsi.hue() = atan2(beta, alpha) / 3.1415 * 180.0;
-	  if (hsi.hue() < 0)
-	    hsi.hue() = hsi.hue() + 360.0;
-	  mln_invariant(hsi.hue() >= 0);
-	  hsi.sat() = std::sqrt(alpha * alpha + beta * beta);
-	  hsi.inty() =
-	    sqrt3_3 * rgb.red() +
-	    sqrt3_3 * rgb.green() +
-	    sqrt3_3 * rgb.blue();
-
-	  return hsi;
-	}
+	T_hsi operator()(const T_rgb& rgb) const;
+
       };
 
       typedef f_rgb_to_hsi_<value::hsi_f> f_rgb_to_hsi_f_t;
 
-      // FIXME: Warning: global object.
-      f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
+      extern f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
 
 
       template <typename T_rgb>
@@ -96,43 +67,96 @@ namespace mln
 	typedef T_rgb result;
 
 	template <typename T_hsi>
-	T_rgb operator()(const T_hsi& hsi) const
-	{
-	  typedef typename T_rgb::red_t   red_t;
-	  typedef typename T_rgb::green_t green_t;
-	  typedef typename T_rgb::blue_t  blue_t;
-
-	  static math::round<red_t>   to_r;
-	  static math::round<green_t> to_g;
-	  static math::round<blue_t>  to_b;
-
-	  static const float
-	    sqrt3_3 = std::sqrt(3) / 3,
-	    inv_sqrt6 = 1 / std::sqrt(6),
-	    inv_sqrt2 = 1 / std::sqrt(2);
-
-	  float
-	    h = hsi.hue() / 180.0 * 3.1415,
-	    alpha = hsi.sat() * std::cos(h),
-	    beta = hsi.sat() * std::sin(h);
+        T_rgb operator()(const T_hsi& hsi) const;
 
+      };
 
-	  red_t   r = to_r(sqrt3_3 * hsi.inty() + 2 * inv_sqrt6 * beta);
-	  green_t g =
-	    to_g(sqrt3_3 * hsi.inty() + inv_sqrt2 * alpha - inv_sqrt6 * beta);
-	  blue_t  b =
-	    to_b(sqrt3_3 * hsi.inty() - inv_sqrt2 * alpha - inv_sqrt6 * beta);
+      typedef f_hsi_to_rgb_<value::rgb8> f_hsi_to_rgb_3x8_t;
 
-	  T_rgb rgb(r, g, b);
+      extern f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
 
-	  return rgb;
-	}
-      };
 
-      typedef f_hsi_to_rgb_<value::rgb8> f_hsi_to_rgb_3x8_t;
+# ifndef MLN_INCLUDE_ONLY
+
+      /// Global variables.
+      /// \{
+      f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
 
-      // FIXME: Warning: global object.
       f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
+      /// \}
+
+
+      template <typename T_hsi>
+      template <typename T_rgb>
+      inline
+      T_hsi
+      f_rgb_to_hsi_<T_hsi>::operator()(const T_rgb& rgb) const
+      {
+	// Locals.
+	static const double sqrt3_3 = std::sqrt(3) / 3;
+	static const double inv_sqrt6 = 1 / std::sqrt(6);
+	static const double inv_sqrt2 = 1 / std::sqrt(2);
+
+	T_hsi hsi;
+
+	double alpha = inv_sqrt2 * rgb.green() - inv_sqrt2 * rgb.blue();
+	double beta =
+	  2 * inv_sqrt6 * rgb.red() -
+	  inv_sqrt6 * rgb.green() -
+	  inv_sqrt6 * rgb.blue();
+
+
+	hsi.hue() = atan2(beta, alpha) / 3.1415 * 180.0;
+	if (hsi.hue() < 0)
+	  hsi.hue() = hsi.hue() + 360.0;
+	mln_invariant(hsi.hue() >= 0);
+	hsi.sat() = std::sqrt(alpha * alpha + beta * beta);
+	hsi.inty() =
+	  sqrt3_3 * rgb.red() +
+	  sqrt3_3 * rgb.green() +
+	  sqrt3_3 * rgb.blue();
+
+	return hsi;
+      }
+
+
+      template <typename T_rgb>
+      template <typename T_hsi>
+      inline
+      T_rgb
+      f_hsi_to_rgb_<T_rgb>::operator()(const T_hsi& hsi) const
+      {
+	typedef typename T_rgb::red_t   red_t;
+	typedef typename T_rgb::green_t green_t;
+	typedef typename T_rgb::blue_t  blue_t;
+
+	static math::round<red_t>   to_r;
+	static math::round<green_t> to_g;
+	static math::round<blue_t>  to_b;
+
+	static const float
+	  sqrt3_3 = std::sqrt(3) / 3,
+		  inv_sqrt6 = 1 / std::sqrt(6),
+		  inv_sqrt2 = 1 / std::sqrt(2);
+
+	float
+	  h = hsi.hue() / 180.0 * 3.1415,
+	    alpha = hsi.sat() * std::cos(h),
+	    beta = hsi.sat() * std::sin(h);
+
+
+	red_t   r = to_r(sqrt3_3 * hsi.inty() + 2 * inv_sqrt6 * beta);
+	green_t g =
+	  to_g(sqrt3_3 * hsi.inty() + inv_sqrt2 * alpha - inv_sqrt6 * beta);
+	blue_t  b =
+	  to_b(sqrt3_3 * hsi.inty() - inv_sqrt2 * alpha - inv_sqrt6 * beta);
+
+	T_rgb rgb(r, g, b);
+
+	return rgb;
+      }
+
+# endif // !MLN_INCLUDE_ONLY
 
     } // end of namespace fun::v2v
 
diff --git a/milena/mln/geom/chamfer.hh b/milena/mln/geom/chamfer.hh
index 934e50a..df3b515 100644
--- a/milena/mln/geom/chamfer.hh
+++ b/milena/mln/geom/chamfer.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_GEOM_CHAMFER_HH
 # define MLN_GEOM_CHAMFER_HH
 
-/*! \file mln/geom/chamfer.hh
- *
- * \brief Connected component chamfer of the image objects.
- */
+/// \file mln/geom/chamfer.hh
+///
+/// Connected component chamfer of the image objects.
 
 # include <mln/level/fill.hh>
 # include <mln/core/alias/w_window2d_int.hh>
@@ -53,7 +53,7 @@ namespace mln
 
     /// Apply chamfer algorithm to a binary image.
     template <typename I, typename W>
-    mln_ch_value( I, unsigned )
+    mln_ch_value(I, unsigned)
       chamfer(const Image<I>& input_, const W& w_win_,
 	      unsigned max = mln_max(unsigned));
 
@@ -131,9 +131,6 @@ namespace mln
 
     } // end of namespace mln::geom::impl
 
-#endif // !MLN_INCLUDE_ONLY
-
-
     // Facade.
 
     template <typename I, typename W>
@@ -141,9 +138,10 @@ namespace mln
       chamfer(const Image<I>& input_, const W& w_win_,
 	      unsigned max = mln_max(unsigned))
     {
-      return impl::chamfer_(exact (input_), exact(w_win_), max);
+      return impl::chamfer_t<I, W>(exact (input_), exact(w_win_), max);
     }
 
+#endif // !MLN_INCLUDE_ONLY
 
   } // end of namespace mln::geom
 
diff --git a/milena/mln/level/compute.hh b/milena/mln/level/compute.hh
index ef7c25a..83ea8ec 100644
--- a/milena/mln/level/compute.hh
+++ b/milena/mln/level/compute.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_LEVEL_COMPUTE_HH
 # define MLN_LEVEL_COMPUTE_HH
 
-/*! \file mln/level/compute.hh
- *
- * \brief Compute an accumulator onto image pixel values.
- */
+/// \file mln/level/compute.hh
+///
+/// Compute an accumulator onto image pixel values.
 
 # include <mln/level/update.hh>
 # include <mln/core/concept/meta_accumulator.hh>
@@ -44,8 +44,8 @@ namespace mln
   namespace level
   {
 
-    /*! Compute an accumulator onto the pixel values of the image \p input.
-     *
+    /// Compute an accumulator onto the pixel values of the image \p input.
+    /*!
      * \param[in] a An accumulator.
      * \param[in] input The input image.
      * \return The accumulator result.
@@ -57,8 +57,8 @@ namespace mln
     compute(const Accumulator<A>& a, const Image<I>& input);
 
 
-    /*! Compute an accumulator onto the pixel values of the image \p input.
-     *
+    /// Compute an accumulator onto the pixel values of the image \p input.
+    /*!
      * \param[in] a A meta-accumulator.
      * \param[in] input The input image.
      * \return The accumulator result.
@@ -97,7 +97,7 @@ namespace mln
     compute(const Meta_Accumulator<A>&, const Image<I>& input)
     {
       mln_accu_with(A, mln_value(I)) accu;
-      return compute(accu, input); // Call the previous version.
+      return level::compute(accu, input); // Call the previous version.
     }
 
 # endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/level/median.hh b/milena/mln/level/median.hh
index 6d847f8..e224964 100644
--- a/milena/mln/level/median.hh
+++ b/milena/mln/level/median.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_LEVEL_MEDIAN_HH
 # define MLN_LEVEL_MEDIAN_HH
 
-/*! \file mln/level/median.hh
- *
- * \brief Median filtering of an image.
- *
- * \todo Add versions for fastest and semi-linear images.
- */
+/// \file mln/level/median.hh
+///
+/// Median filtering of an image.
+///
+/// \todo Add versions for fastest and semi-linear images.
 
 # include <mln/core/concept/image.hh>
 # include <mln/core/window.hh>
diff --git a/milena/mln/make/win_chamfer.hh b/milena/mln/make/win_chamfer.hh
index 9ba3791..a28d145 100644
--- a/milena/mln/make/win_chamfer.hh
+++ b/milena/mln/make/win_chamfer.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2006  EPITA Research and Development Laboratory
+// Copyright (C) 2006, 2008  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
@@ -29,12 +29,9 @@
 #ifndef MLN_MAKE_WIN_CHAMFER_HH
 # define MLN_MAKE_WIN_CHAMFER_HH\
 
-/*!
- * \file   mln/make/win_chamfer.hh
- * 
- * \brief  Routine to create chamfer mln::w_window2d_int.
- *
- */
+/// \file   mln/make/win_chamfer.hh
+///
+/// Routine to create chamfer mln::w_window2d_int.
 
 
 # include <mln/core/alias/w_window2d_int.hh>
@@ -48,6 +45,33 @@ namespace mln
   {
 
     template<int d10, int d11>
+    const mln::w_window2d_int mk_chamfer_3x3_int();
+
+    template<int d10, int d11, int d21>
+    const mln::w_window2d_int mk_chamfer_5x5_int();
+
+    const mln::w_window2d_float mk_chamfer_3x3_float(float d10, float d11);
+
+    const mln::w_window2d_float
+    mk_chamfer_5x5_float(float d10, float d11, float d21);
+
+    const mln::w_window2d_float mk_chamfer_exact();
+
+  } // end of namespace mln::make
+
+} // end of namespace mln
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+namespace mln
+{
+
+  namespace make
+  {
+
+    template<int d10, int d11>
+    inline
     const mln::w_window2d_int
     mk_chamfer_3x3_int()
     {
@@ -59,6 +83,7 @@ namespace mln
     }
 
     template<int d10, int d11, int d21>
+    inline
     const mln::w_window2d_int
     mk_chamfer_5x5_int()
     {
@@ -71,6 +96,7 @@ namespace mln
       return (make::w_window2d(ws));
     }
 
+    inline
     const mln::w_window2d_float
     mk_chamfer_3x3_float(float d10, float d11)
     {
@@ -81,6 +107,7 @@ namespace mln
       return (make::w_window2d(ws));
     }
 
+    inline
     const mln::w_window2d_float
     mk_chamfer_5x5_float(float d10, float d11, float d21)
     {
@@ -93,6 +120,7 @@ namespace mln
       return (make::w_window2d(ws));
     }
 
+    inline
     const mln::w_window2d_float
     mk_chamfer_exact()
     {
@@ -108,4 +136,6 @@ namespace mln
 
 } // end of namespace mln
 
+# endif // !MLN_INCLUDE_ONLY
+
 #endif // ! MLN_MAKE_WIN_CHAMFER_HH
diff --git a/milena/mln/morpho/dilation_fast.hh b/milena/mln/morpho/dilation_fast.hh
index e977253..482ca94 100644
--- a/milena/mln/morpho/dilation_fast.hh
+++ b/milena/mln/morpho/dilation_fast.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_MORPHO_DILATION_FAST_HH
 # define MLN_MORPHO_DILATION_FAST_HH
 
-/*! \file mln/morpho/dilation_fast.hh
- *
- * \brief Dilation filtering of an image with arbitrary s.e.
- *
- * \todo Add fastest versions.
- */
+/// \file mln/morpho/dilation_fast.hh
+///
+/// Dilation filtering of an image with arbitrary s.e.
+///
+/// \todo Add fastest versions.
 
 # include <mln/core/concept/image.hh>
 # include <mln/core/window.hh>
@@ -52,9 +52,9 @@ namespace mln
   namespace morpho
   {
 
-    /*! Compute in \p output the dilation filter of image \p input by
-     *  the window \p win.
-     *
+    /// Compute in \p output the dilation filter of image \p input by
+    /// the window \p win.
+    /*!
      * \param[in] input The image to be filtered.
      * \param[in] win The window.
      * \param[out] output The output image.
@@ -79,7 +79,7 @@ namespace mln
 
       template <typename I, typename W, typename O>
       struct dilation_fast_t
-      { 
+      {
 	typedef mln_psite(I)  P;
 	typedef mln_dpsite(I) D;
 
@@ -186,7 +186,7 @@ namespace mln
 		      Image<O>& output)
     {
       mln_assertion(exact(output).domain() == exact(input).domain());
-      impl::dilation_fast_(exact(input), exact(win), exact(output)); 
+      impl::dilation_fast_(exact(input), exact(win), exact(output));
     }
 
 # endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/morpho/hit_or_miss.hh b/milena/mln/morpho/hit_or_miss.hh
index 3d0bf29..38bb1d5 100644
--- a/milena/mln/morpho/hit_or_miss.hh
+++ b/milena/mln/morpho/hit_or_miss.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_MORPHO_HIT_OR_MISS_HH
 # define MLN_MORPHO_HIT_OR_MISS_HH
 
-/*! \file mln/morpho/hit_or_miss.hh
- *
- * \brief Morphological hit-or-miss.
- *
- * \todo Save memory.
- */
+/// \file mln/morpho/hit_or_miss.hh
+///
+/// Morphological hit-or-miss.
+///
+/// \todo Save memory.
 
 # include <mln/morpho/includes.hh>
 # include <mln/pw/all.hh>
@@ -49,12 +49,12 @@ namespace mln
   {
 
 
-    bool constrained_hit_or_miss = true;
+    extern bool constrained_hit_or_miss;
 
 
-    /*! Morphological hit-or-miss.
-     *
-     * This operator is HMT_(Bh,Bm) = e_Bh /\ (e_Bm o C). 
+    /// Morphological hit-or-miss.
+    /*!
+     * This operator is HMT_(Bh,Bm) = e_Bh /\ (e_Bm o C).
      */
     template <typename I, typename Wh, typename Wm>
     mln_concrete(I)
@@ -62,8 +62,8 @@ namespace mln
 		  const Window<Wh>& win_hit, const Window<Wm>& win_miss);
 
 
-    /*! Morphological hit-or-miss opening.
-     *
+    /// Morphological hit-or-miss opening.
+    /*!
      * This operator is HMTope_(Bh,Bm) = d_(-Bh) o HMT_(Bh,Bm).
      */
     template <typename I, typename Wh, typename Wm>
@@ -72,8 +72,8 @@ namespace mln
 			  const Window<Wh>& win_hit, const Window<Wm>& win_miss);
 
 
-    /*! Morphological hit-or-miss opening of the background.
-     *
+    /// Morphological hit-or-miss opening of the background.
+    /*!
      * This operator is HMTopeBG = HMTope_(Bm,Bh) o C = d_(-Bm) o HMT_(Bh,Bm).
      */
     template <typename I, typename Wh, typename Wm>
@@ -82,8 +82,8 @@ namespace mln
 				     const Window<Wh>& win_hit, const Window<Wm>& win_miss);
 
 
-    /*! Morphological hit-or-miss closing.
-     *
+    /// Morphological hit-or-miss closing.
+    /*!
      * This operator is C o HMTope o C.
      */
     template <typename I, typename Wh, typename Wm>
@@ -92,8 +92,8 @@ namespace mln
 			  const Window<Wh>& win_hit, const Window<Wm>& win_miss);
 
 
-    /*! Morphological hit-or-miss closing of the background.
-     *
+    /// Morphological hit-or-miss closing of the background.
+    /*!
      * This operator is C o HMTopeBG o C.
      */
     template <typename I, typename Wh, typename Wm>
@@ -105,6 +105,7 @@ namespace mln
 
 # ifndef MLN_INCLUDE_ONLY
 
+    bool constrained_hit_or_miss = true;
 
     namespace internal
     {
diff --git a/milena/mln/trait/image/print.hh b/milena/mln/trait/image/print.hh
index 16d8de4..baef596 100644
--- a/milena/mln/trait/image/print.hh
+++ b/milena/mln/trait/image/print.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_TRAIT_IMAGE_PRINT_HH
 # define MLN_TRAIT_IMAGE_PRINT_HH
 
-/*! \file mln/trait/image/print.hh
- *
- * \brief Print the collection of traits for an image type.
- */
+/// \file mln/trait/image/print.hh
+///
+/// Print the collection of traits for an image type.
 
 # include <iostream>
 # include <mln/trait/images.hh>
diff --git a/milena/mln/trait/op/ord.hh b/milena/mln/trait/op/ord.hh
index 0a4fa11..c1b49ee 100644
--- a/milena/mln/trait/op/ord.hh
+++ b/milena/mln/trait/op/ord.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_TRAIT_OP_ORD_HH
 # define MLN_TRAIT_OP_ORD_HH
 
-/*! \file mln/trait/op/ord.hh
- *
- * \brief Declaration of an ordering operator trait.
- */
+/// \file mln/trait/op/ord.hh
+///
+/// Declaration of an ordering operator trait.
 
 # include <mln/trait/op/decl.hh>
 
@@ -62,7 +61,6 @@ namespace mln
       };
 
     } // end of namespace mln::trait::op
-    
 
 
     template <template <class> class Category, typename T>
@@ -77,14 +75,14 @@ namespace mln
 
   namespace internal
   {
-    
+
     template <typename T>
     struct ord_less
     {
       bool strict(const T& lhs, const T& rhs) const;
       bool weak(const T& lhs, const T& rhs) const;
     };
-    
+
     template <typename T>
     struct ord_vec
     {
diff --git a/milena/mln/value/float01.hh b/milena/mln/value/float01.hh
index 3bb78ab..f5348b0 100644
--- a/milena/mln/value/float01.hh
+++ b/milena/mln/value/float01.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2006, 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2006, 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_VALUE_FLOAT01_HH
 # define MLN_VALUE_FLOAT01_HH
 
-/*! \file mln/value/float01.hh
- *
- * \brief Define a generic class for float.
- */
+/// \file mln/value/float01.hh
+///
+/// Define a generic class for float.
 
 # include <iostream>
 # include <utility>
@@ -151,7 +151,7 @@ namespace mln
 
 
     // Float01.
-
+    inline
     float01::float01()
       : nbits_(0) // FIXME: Cost at run-time...
     {
diff --git a/milena/tests/Makefile.am b/milena/tests/Makefile.am
index d311f76..b60fcd8 100644
--- a/milena/tests/Makefile.am
+++ b/milena/tests/Makefile.am
@@ -47,9 +47,11 @@ SUBDIRS =					\
 
 check_PROGRAMS =				\
   all_headers 					\
-  essential_headers
+  essential_headers 				\
+  global_vars
 
 all_headers_SOURCES = all_headers.cc
 essential_headers_SOURCES = essential_headers.cc
+global_vars_SOURCES = global_vars1.cc global_vars2.cc
 
 TESTS = $(check_PROGRAMS)
diff --git a/milena/tests/border/find_full.cc b/milena/tests/border/find_full.cc
index 890a005..74f8df5 100644
--- a/milena/tests/border/find_full.cc
+++ b/milena/tests/border/find_full.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/border/find_full.cc
- *
- * \brief Tests on mln::border::find.
- */
+/// \file tests/border/find_full.cc
+///
+/// Tests on mln::border::find.
 
 #include <mln/core/image/image1d.hh>
 #include <mln/core/image/image2d.hh>
@@ -98,7 +98,7 @@ int main()
   f_box1d_t f_b1(b1);
   f_box2d_t f_b2(b2);
   f_box3d_t f_b3(b3);
-  mln::fun::p2b::chess_t c_b;
+  mln::fun::p2b::chess c_b;
 
   {
     typedef image1d<int> I;
@@ -129,7 +129,7 @@ int main()
     image_if<I, f_box2d_t > imaif(ima, f_b2);
     mln_assertion(border::find(imaif) == 42);
 
-    image_if<I, fun::p2b::chess_t > imaif_chess(ima, c_b);
+    image_if<I, fun::p2b::chess > imaif_chess(ima, c_b);
     mln_assertion(border::find(imaif_chess) == 42);
 
 
diff --git a/milena/tests/border/get.cc b/milena/tests/border/get.cc
index df9fae2..88d552a 100644
--- a/milena/tests/border/get.cc
+++ b/milena/tests/border/get.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/border/get.cc
- *
- * \brief Tests on mln::border::get.
- */
+/// \file tests/border/get.cc
+///
+/// Tests on mln::border::get.
 
 #include <mln/core/image/image2d.hh>
 #include <mln/core/image/sub_image.hh>
@@ -75,7 +75,7 @@ int main()
 
   image_if<I, f_box2d_t> imaif(ima, f_b);
   mln_assertion( imaif.has  (point2d(2,2)) == false &&
-		 imaif.has(point2d(2,2)) == true );
+		 ima.has(point2d(2,2)) == true );
   mln_assertion(border::get(imaif) == 51);
 
   mln_assertion(border::get( (ima | b) | f_b ) == 0);
diff --git a/milena/tests/border/get_full.cc b/milena/tests/border/get_full.cc
index b67f25e..ef68eeb 100644
--- a/milena/tests/border/get_full.cc
+++ b/milena/tests/border/get_full.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/border/get_full.cc
- *
- * \brief Tests on mln::border::get.
- */
+/// \file tests/border/get_full.cc
+///
+/// Tests on mln::border::get.
 
 #include <mln/core/image/image2d.hh>
 #include <mln/core/image/sub_image.hh>
@@ -62,7 +62,7 @@ int main()
 
   box2d b(literal::origin, point2d(1,1));
   f_box2d_t f_b(b);
-  mln::fun::p2b::chess_t c_b;
+  mln::fun::p2b::chess c_b;
 
   {
     typedef image2d<int> I;
@@ -90,7 +90,7 @@ int main()
     sub_image<I, box2d> sub(ima, b);
     mln_assertion(border::get(sub) == 0);
 
-    image_if<I, mln::fun::p2b::chess_t > imaif(ima, c_b);
+    image_if<I, mln::fun::p2b::chess > imaif(ima, c_b);
     mln_assertion(border::get(imaif) == 42);
     mln_assertion(border::get( (ima | b) ) == 0);
     mln_assertion(border::get( (ima | b) | c_b ) == 0);
@@ -106,7 +106,7 @@ int main()
     sub_image<I, box2d> sub(ima, b);
     mln_assertion(border::get(sub) == 0);
 
-    image_if<I, mln::fun::p2b::chess_t > imaif(ima, c_b);
+    image_if<I, mln::fun::p2b::chess > imaif(ima, c_b);
     mln_assertion(border::get(imaif) == 36);
     mln_assertion(border::get( (ima | b) ) == 0);
     mln_assertion(border::get( (ima | b) | c_b ) == 0);
diff --git a/milena/tests/border/resize_image_if.cc b/milena/tests/border/resize_image_if.cc
index 7ca70a7..5b738d3 100644
--- a/milena/tests/border/resize_image_if.cc
+++ b/milena/tests/border/resize_image_if.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/border/resize_image_if.cc
- *
- * \brief Tests on mln::border::resize.
- */
+/// \file tests/border/resize_image_if.cc
+///
+/// Tests on mln::border::resize.
 
 #include <mln/core/image/image2d.hh>
 #include <mln/core/image/sub_image.hh>
@@ -70,8 +70,8 @@ int main()
 
   my_box2d f_b(b);
   image_if<I, my_box2d> imaif(ima, f_b);
-  mln_assertion( imaif.has  (point2d(2,2)) == false && 
-		 imaif.has(point2d(2,2)) == true );
+  mln_assertion( imaif.has(point2d(2,2)) == false && 
+		 ima.has(point2d(2,2)) == true );
 
 
   mln_assertion(border::get(imaif) == border);
diff --git a/milena/tests/convert/to_image.cc b/milena/tests/convert/to_image.cc
index 4d21afd..7517c36 100644
--- a/milena/tests/convert/to_image.cc
+++ b/milena/tests/convert/to_image.cc
@@ -53,7 +53,7 @@ int main()
 	       0, 1, 0,   // < center point
 	       1, 0, 1 };
 
-  image2d<bool> ima_X = convert::to_image(box_3x3 | fun::p2b::chess, 0);
+  image2d<bool> ima_X = convert::to_image(box_3x3 | fun::p2b::chess(), 0);
   window2d win_X = convert::to<window2d>(X);
   mln_assertion(convert::to_image(win_X) == ima_X);
 }
diff --git a/milena/tests/core/image/cast_image.cc b/milena/tests/core/image/cast_image.cc
index afce74f..6090492 100644
--- a/milena/tests/core/image/cast_image.cc
+++ b/milena/tests/core/image/cast_image.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/core/image/cast_image.cc
- *
- * \brief Tests on mln::cast_image.
- */
+/// \file tests/core/image/cast_image.cc
+///
+/// Tests on mln::cast_image.
 
 #include <mln/core/image/image2d.hh>
 #include <mln/fun/p2b/chess.hh>
@@ -42,7 +42,7 @@ int main()
   using namespace mln;
 
   image2d<bool> ima(8, 8);
-  level::fill(ima, fun::p2b::chess);
+  level::fill(ima, fun::p2b::chess());
   debug::println(ima);
   debug::println( cast_image<int>(ima) );
 }
diff --git a/milena/tests/core/image/image_if.cc b/milena/tests/core/image/image_if.cc
index 4351a25..f646191 100644
--- a/milena/tests/core/image/image_if.cc
+++ b/milena/tests/core/image/image_if.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/core/image/image_if.cc
- *
- * \brief Tests on mln::image_if.
- */
+/// \file tests/core/image/image_if.cc
+///
+/// Tests on mln::image_if.
 
 #include <mln/core/image/image2d.hh>
 #include <mln/core/image/image_if.hh>
@@ -42,13 +42,13 @@ int main()
 
   typedef image2d<int> I;
   I ima(8, 8);
-  // debug::println(ima | fun::p2b::chess);
+  // debug::println(ima | fun::p2b::chess());
   // FIXME: is this line corret?
-  ///mln_assertion((ima | fun::p2b::chess).nsites() == 32);
+  ///mln_assertion((ima | fun::p2b::chess()).nsites() == 32);
 
   {
-    typedef image_if<I, fun::p2b::chess_t> II;
-    II ima_ref = ima | fun::p2b::chess;
+    typedef image_if<I, fun::p2b::chess> II;
+    II ima_ref = ima | fun::p2b::chess();
     debug::println(ima_ref);
     {
       II ima_ref_;
diff --git a/milena/tests/core/site_set/pset_if.cc b/milena/tests/core/site_set/pset_if.cc
index 9918f56..1319848 100644
--- a/milena/tests/core/site_set/pset_if.cc
+++ b/milena/tests/core/site_set/pset_if.cc
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/core/site_set/pset_if.cc
- *
- * \brief Tests on mln::p_if.
- */
+/// \file tests/core/site_set/pset_if.cc
+///
+/// Tests on mln::p_if.
 
 #include <mln/core/image/image2d.hh>
 #include <mln/core/site_set/p_set.hh>
@@ -44,10 +44,10 @@ int main()
   using namespace mln;
 
   box2d box_8x8 = make::box2d(8, 8);
-  mln_assertion(geom::nsites((box_8x8 | fun::p2b::chess)) == 32);
+  mln_assertion(geom::nsites((box_8x8 | fun::p2b::chess())) == 32);
 
   {
-    p_set<point2d> s = convert::to_p_set(box_8x8 | fun::p2b::chess);
-    mln_precondition(s == (box_8x8 | fun::p2b::chess));
+    p_set<point2d> s = convert::to_p_set(box_8x8 | fun::p2b::chess());
+    mln_precondition(s == (box_8x8 | fun::p2b::chess()));
   }
 }
diff --git a/milena/tests/global_vars1.cc b/milena/tests/global_vars1.cc
new file mode 100644
index 0000000..f41407d
--- /dev/null
+++ b/milena/tests/global_vars1.cc
@@ -0,0 +1,101 @@
+// Copyright (C) 2008 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.
+
+/// \file tests/global_vars1.cc
+///
+/// Tests proper global variable declarations
+
+#include <mln/util/all.hh>
+#include <mln/fun/p2v/all.hh>
+#include <mln/fun/x2x/all.hh>
+#include <mln/fun/v2v/all.hh>
+#include <mln/fun/i2v/all.hh>
+#include <mln/fun/all.hh>
+#include <mln/fun/x2v/all.hh>
+#include <mln/fun/p2b/all.hh>
+#include <mln/extension/all.hh>
+#include <mln/histo/all.hh>
+#include <mln/trait/op/all.hh>
+#include <mln/trait/all.hh>
+#include <mln/trait/value/all.hh>
+#include <mln/win/all.hh>
+#include <mln/core/routine/all.hh>
+#include <mln/core/trait/all.hh>
+#include <mln/core/def/all.hh>
+#include <mln/core/internal/check/image_all.hh>
+#include <mln/core/image/all.hh>
+#include <mln/core/site_set/all.hh>
+#include <mln/io/pbm/all.hh>
+#include <mln/io/pfm/all.hh>
+#include <mln/io/pgm/all.hh>
+#include <mln/io/all.hh>
+#include <mln/io/fits/all.hh>
+#include <mln/io/pnm/all.hh>
+#include <mln/io/ppm/all.hh>
+#include <mln/make/all.hh>
+#include <mln/canvas/morpho/all.hh>
+#include <mln/canvas/all.hh>
+#include <mln/canvas/browsing/all.hh>
+#include <mln/estim/all.hh>
+#include <mln/arith/all.hh>
+#include <mln/display/all.hh>
+#include <mln/test/all.hh>
+#include <mln/border/all.hh>
+#include <mln/trace/all.hh>
+#include <mln/debug/all.hh>
+#include <mln/morpho/elementary/all.hh>
+#include <mln/morpho/all.hh>
+#include <mln/accu/all.hh>
+#include <mln/pw/all.hh>
+#include <mln/linear/all.hh>
+#include <mln/metal/all.hh>
+#include <mln/metal/math/all.hh>
+#include <mln/set/all.hh>
+#include <mln/convert/impl/all.hh>
+#include <mln/convert/all.hh>
+#include <mln/geom/all.hh>
+#include <mln/literal/all.hh>
+#include <mln/level/approx/all.hh>
+#include <mln/level/all.hh>
+#include <mln/level/naive/all.hh>
+#include <mln/math/all.hh>
+#include <mln/norm/all.hh>
+#include <mln/logical/all.hh>
+#include <mln/draw/all.hh>
+#include <mln/value/builtin/all.hh>
+#include <mln/value/all.hh>
+#include <mln/value/internal/all.hh>
+#include <mln/value/concept/all.hh>
+#include <mln/tag/all.hh>
+#include <mln/labeling/all.hh>
+
+int f1();
+
+int main ()
+{
+  f1();
+}
diff --git a/milena/tests/global_vars2.cc b/milena/tests/global_vars2.cc
new file mode 100644
index 0000000..a3b93a6
--- /dev/null
+++ b/milena/tests/global_vars2.cc
@@ -0,0 +1,101 @@
+// Copyright (C) 2008 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.
+
+/// \file tests/global_vars2.cc
+///
+/// Tests proper global variable declarations
+
+# define MLN_INCLUDE_ONLY
+
+#include <mln/util/all.hh>
+#include <mln/fun/p2v/all.hh>
+#include <mln/fun/x2x/all.hh>
+#include <mln/fun/v2v/all.hh>
+#include <mln/fun/i2v/all.hh>
+#include <mln/fun/all.hh>
+#include <mln/fun/x2v/all.hh>
+#include <mln/fun/p2b/all.hh>
+#include <mln/extension/all.hh>
+#include <mln/histo/all.hh>
+#include <mln/trait/op/all.hh>
+#include <mln/trait/all.hh>
+#include <mln/trait/value/all.hh>
+#include <mln/win/all.hh>
+#include <mln/core/routine/all.hh>
+#include <mln/core/trait/all.hh>
+#include <mln/core/def/all.hh>
+#include <mln/core/internal/check/image_all.hh>
+#include <mln/core/image/all.hh>
+#include <mln/core/site_set/all.hh>
+#include <mln/io/pbm/all.hh>
+#include <mln/io/pfm/all.hh>
+#include <mln/io/pgm/all.hh>
+#include <mln/io/all.hh>
+#include <mln/io/fits/all.hh>
+#include <mln/io/pnm/all.hh>
+#include <mln/io/ppm/all.hh>
+#include <mln/make/all.hh>
+#include <mln/canvas/morpho/all.hh>
+#include <mln/canvas/all.hh>
+#include <mln/canvas/browsing/all.hh>
+#include <mln/estim/all.hh>
+#include <mln/arith/all.hh>
+#include <mln/display/all.hh>
+#include <mln/test/all.hh>
+#include <mln/border/all.hh>
+#include <mln/trace/all.hh>
+#include <mln/debug/all.hh>
+#include <mln/morpho/elementary/all.hh>
+#include <mln/morpho/all.hh>
+#include <mln/accu/all.hh>
+#include <mln/pw/all.hh>
+#include <mln/linear/all.hh>
+#include <mln/metal/all.hh>
+#include <mln/metal/math/all.hh>
+#include <mln/set/all.hh>
+#include <mln/convert/impl/all.hh>
+#include <mln/convert/all.hh>
+#include <mln/geom/all.hh>
+#include <mln/literal/all.hh>
+#include <mln/level/approx/all.hh>
+#include <mln/level/all.hh>
+#include <mln/level/naive/all.hh>
+#include <mln/math/all.hh>
+#include <mln/norm/all.hh>
+#include <mln/logical/all.hh>
+#include <mln/draw/all.hh>
+#include <mln/value/builtin/all.hh>
+#include <mln/value/all.hh>
+#include <mln/value/internal/all.hh>
+#include <mln/value/concept/all.hh>
+#include <mln/tag/all.hh>
+#include <mln/labeling/all.hh>
+
+int f1 ()
+{
+  return 0;
+}
diff --git a/milena/tests/level/fill_with_image.cc b/milena/tests/level/fill_with_image.cc
index 2c6edf8..4b921d0 100644
--- a/milena/tests/level/fill_with_image.cc
+++ b/milena/tests/level/fill_with_image.cc
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/level/fill_with_value.cc
- *
- * \brief Tests on mln::level::fill_with_value
- */
+/// \file tests/level/fill_with_value.cc
+///
+/// Tests on mln::level::fill_with_value
 
 #include <mln/level/fill_with_value.hh>
 #include <mln/level/fill_with_image.hh>
@@ -96,14 +96,14 @@ int main()
 
   {
     typedef image2d<unsigned char> I;
-    typedef image_if<I, fun::p2b::chess_t> II;
+    typedef image_if<I, fun::p2b::chess> II;
 
     I ima(size, size);
     I ima2(size, size);
     level::fill_with_value(ima, 51);
     level::fill_with_value(ima2, 42);
 
-    II ima_if = ima | fun::p2b::chess;
+    II ima_if = ima | fun::p2b::chess();
     level::fill_with_image(ima_if, ima2);
 
     II::piter p(ima_if.domain());
@@ -145,7 +145,7 @@ int main()
 
   // pw image test
   {
-    const pw::image<fun::p2v::iota_t, box2d> ima(fun::p2v::iota,
+    const pw::image<fun::p2v::iota, box2d> ima(fun::p2v::iota(),
                                                  make::box2d(-2,-2, 15,15));
     image2d<short unsigned int> out(8, 8);
 
@@ -167,11 +167,11 @@ int main()
   // image if test
   {
     typedef image2d<unsigned short> I;
-    typedef image_if<I, fun::p2b::chess_t> II;
+    typedef image_if<I, fun::p2b::chess> II;
 
     I ima(size, size);
     I out(size, size);
-    II ima_if = ima | fun::p2b::chess;
+    II ima_if = ima | fun::p2b::chess();
 
     level::fill_with_value(ima, 42);
     level::fill_with_value(out, 0);
diff --git a/milena/tests/level/fill_with_value.cc b/milena/tests/level/fill_with_value.cc
index 5f8adb2..fa2eb55 100644
--- a/milena/tests/level/fill_with_value.cc
+++ b/milena/tests/level/fill_with_value.cc
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/level/fill_with_value.cc
- *
- * \brief Tests on mln::level::fill_with_value
- */
+/// \file tests/level/fill_with_value.cc
+///
+/// Tests on mln::level::fill_with_value
 
 
 #include <mln/level/fill_with_value.hh>
@@ -91,12 +91,12 @@ int main()
 
   {
     typedef image2d<unsigned char> I;
-    typedef image_if<I, fun::p2b::chess_t> II;
+    typedef image_if<I, fun::p2b::chess> II;
 
     I ima(size, size);
     level::fill_with_value(ima, 51);
 
-    II ima_if = ima | fun::p2b::chess;
+    II ima_if = ima | fun::p2b::chess();
     level::fill_with_value(ima_if, 42);
 
     II::piter p(ima_if.domain());
diff --git a/milena/tests/level/paste.cc b/milena/tests/level/paste.cc
index e748602..42f0ce6 100644
--- a/milena/tests/level/paste.cc
+++ b/milena/tests/level/paste.cc
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/level/paste.cc
- *
- * \brief Tests on mln::level::paste.
- */
+/// \file tests/level/paste.cc
+///
+/// Tests on mln::level::paste.
 
 #include <mln/core/image/image1d.hh>
 #include <mln/core/image/image2d.hh>
@@ -109,7 +109,7 @@ int main()
 
   /// pw image test
   {
-    const pw::image<fun::p2v::iota_t, box2d> ima(fun::p2v::iota,
+    const pw::image<fun::p2v::iota, box2d> ima(fun::p2v::iota(),
                                                  make::box2d(2,2, 5,5));
     image2d<short unsigned int> out(8, 8);
 
@@ -131,11 +131,11 @@ int main()
   // image if test
   {
     typedef image2d<unsigned short> I;
-    typedef image_if<I, fun::p2b::chess_t> II;
+    typedef image_if<I, fun::p2b::chess> II;
 
     I ima(size, size);
     I out(size, size);
-    II ima_if = ima | fun::p2b::chess;
+    II ima_if = ima | fun::p2b::chess();
 
     level::fill_with_value(ima, 0);
     debug::iota(ima);
diff --git a/milena/tests/level/transform.cc b/milena/tests/level/transform.cc
index e0b8ec9..c0d550b 100644
--- a/milena/tests/level/transform.cc
+++ b/milena/tests/level/transform.cc
@@ -25,10 +25,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/level/transform.cc
- *
- * \brief Tests on mln::level::transform
- */
+/// \file tests/level/transform.cc
+///
+/// Tests on mln::level::transform
 
 #include <cmath>
 
@@ -123,7 +122,7 @@ int main()
   /// pw image test
   {
 
-    const pw::image<fun::p2v::iota_t, box2d> ima(fun::p2v::iota,
+    const pw::image<fun::p2v::iota, box2d> ima(fun::p2v::iota(),
                                                  make::box2d(2,2, 5,5));
     image2d<short unsigned int> out(8, 8);
 
@@ -147,11 +146,11 @@ int main()
   // image if test
   {
     typedef image2d<unsigned short> I;
-    typedef image_if<I, fun::p2b::chess_t> II;
+    typedef image_if<I, fun::p2b::chess> II;
 
     I ima(size, size);
     I out(size, size);
-    II ima_if = ima | fun::p2b::chess;
+    II ima_if = ima | fun::p2b::chess();
 
     level::fill_with_value(ima, 0);
     debug::iota(ima);
diff --git a/milena/tests/pw/image.cc b/milena/tests/pw/image.cc
index dbddce9..cbd07cd 100644
--- a/milena/tests/pw/image.cc
+++ b/milena/tests/pw/image.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,20 +26,30 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/pw/image.cc
- *
- * \brief Tests on mln::pw::image.
- */
+/// \file tests/pw/image.cc
+///
+/// Tests on mln::pw::image.
 
 #include <mln/fun/p2b/chess.hh>
 #include <mln/core/alias/box2d.hh>
 #include <mln/pw/image.hh>
-#include <mln/debug/println.hh>
+#include <mln/core/var.hh>
 
 
 int main()
 {
   using namespace mln;
 
-  debug::println( fun::p2b::chess | make::box2d(8, 8) );
+  mln_VAR(ima, fun::p2b::chess() | make::box2d(8, 8));
+  mln_piter_(ima_t) p(ima.domain());
+  unsigned i = 0;
+  for_all(p)
+  {
+    if (p.row() % 2)
+      mln_assertion(ima(p) == (p.col() % 2));
+    else
+      mln_assertion(ima(p) == !(p.col() % 2));
+    ++i;
+  }
+  mln_assertion(i == 64);
 }
diff --git a/milena/tests/trait/image/images.cc b/milena/tests/trait/image/images.cc
index a596440..51dd710 100644
--- a/milena/tests/trait/image/images.cc
+++ b/milena/tests/trait/image/images.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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,10 +26,9 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/*! \file tests/trait/image/images.cc
- *
- * \brief Tests on mln::trait::images.
- */
+/// \file tests/trait/image/images.cc
+///
+/// \brief Tests on mln::trait::images.
 
 #include <mln/core/image/image2d.hh>
 
@@ -53,10 +53,10 @@ int main()
 
   std::cout << std::endl
 	    << "image_if< image2d >: ";
-  mln::trait::image::print< image_if<I, fun::p2b::chess_t> >(std::cout);
+  mln::trait::image::print< image_if<I, fun::p2b::chess> >(std::cout);
 
 
   std::cout << std::endl
 	    << "image_if< sub_image< image2d > >: ";
-  mln::trait::image::print< image_if<Isub, fun::p2b::chess_t> >(std::cout);
+  mln::trait::image::print< image_if<Isub, fun::p2b::chess> >(std::cout);
 }
-- 
1.5.6.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    13 Nov '08
                    
                        https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from  Nicolas Ballas  <ballas(a)lrde.epita.fr>
	Temporary fix in complex_image properties.
	* doc/tutorial/design/include/imagetours.tex: Update documentation.
	* mln/core/image/complex_image.hh: Fix properties.
 doc/tutorial/design/include/imagetours.tex |    8 ++++----
 mln/core/image/complex_image.hh            |    8 +++++---
 2 files changed, 9 insertions(+), 7 deletions(-)
Index: doc/tutorial/design/include/imagetours.tex
--- doc/tutorial/design/include/imagetours.tex	(revision 2863)
+++ doc/tutorial/design/include/imagetours.tex	(working copy)
@@ -39,7 +39,7 @@
 %%However, the $site$ concept allows Milena to deal with complicated image type
 %%(for instance see the \verb+graph_image+ type).
 
-An image is composed by a set of localized objects ($sites$): the definition domain of the image.
+An image is composed by a set of localized objects ($sites$), the definition domain of the image.
 A value is associated to each site of the image. This is the destination domain
 of the image.
 To access to a value  localized at the site p in an image named $ima$, we
@@ -75,10 +75,10 @@
 
 %% Primary image definition
 
-Primary images are a major category of Milena image type.
+Primary images are a major category of the Milena image types.
 Primary images are not based on another image type.
 They are sufficient to define themselves.
-Thus, a primary image types directly holds in memory its data (values).
+Thus, a primary image types directly holds its data (values) in memory.
 
 
 \begin{itemize}
@@ -145,7 +145,7 @@
 will be transformed).
 Since, it extends an image, an image morpher is also an image type.
 
-The Milena library provide different kinds of morphers.
+The Milena library provides different kinds of morphers.
 Domain morphers only modify the domain (the set of points/sites composing the image) of the input image.
 Value morphers only change the input image values (cast the values into another
 type\ldots{})
Index: mln/core/image/complex_image.hh
--- mln/core/image/complex_image.hh	(revision 2863)
+++ mln/core/image/complex_image.hh	(working copy)
@@ -85,9 +85,11 @@
 
       // Value.
       typedef trait::image::value_access::direct           value_access;
-      // FIXME: Is that right?
-      typedef trait::image::vw_io::read_write              vw_io;
-      typedef trait::image::vw_set::multi                  vw_set;
+      // FIXME: This image is value wise read_write, and provides
+      // an access to its values throught a multi-set,
+      // but we need to add the corresponding interface in the class.
+      typedef trait::image::vw_io::none                    vw_io;
+      typedef trait::image::vw_set::none                   vw_set;
       typedef trait::image::value_storage::disrupted       value_storage;
       typedef trait::image::value_browsing::site_wise_only value_browsing;
       typedef trait::image::value_alignement::irrelevant   value_alignement;
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from  Thierry Geraud  <thierry.geraud(a)lrde.epita.fr>
	Make logical and use level transform.
	* mln/level/transform.spe.hh: Layout.
	(transform_tests): Fix sig.
	(transform_fastest): New impl.
	(transform_dispatch): Move out of impl and augment.
	* mln/level/transform.hh: Call dispatch.
	* mln/level/transform_inplace.hh (todo): New.
	(transform_inplace_fastest): New impl.
	(transform_inplace_dispatch): New.
	* tests/level/transform_inplace.cc: Fix warning.
	* mln/fun/vv2v/min.hh: Add second parm with default.
	* mln/fun/vv2v/macros.hh: New.
	* mln/fun/vv2v/land.hh: New.
	* mln/fun/vv2v/all.hh: Update.
	* mln/logical/and.hh: Fix return type in sig.
	(and__): Remove.
	Use level transform.
	* mln/logical/and.spe.hh: Remove.
	* mln/logical/includes.hh: New.
	* mln/logical/all.hh: Update.
 mln/fun/vv2v/all.hh              |    3 
 mln/fun/vv2v/land.hh             |   76 ++++++++++++++++++
 mln/fun/vv2v/macros.hh           |   48 +++++++++++
 mln/fun/vv2v/min.hh              |   20 ++--
 mln/level/transform.hh           |   17 +---
 mln/level/transform.spe.hh       |  164 ++++++++++++++++++++++++---------------
 mln/level/transform_inplace.hh   |  134 +++++++++++++++++++++++++++++--
 mln/logical/all.hh               |   13 +--
 mln/logical/and.hh               |   70 +++++-----------
 mln/logical/includes.hh          |   77 ++++++++++++++++++
 tests/level/transform_inplace.cc |    2 
 11 files changed, 478 insertions(+), 146 deletions(-)
Index: tests/level/transform_inplace.cc
--- tests/level/transform_inplace.cc	(revision 2862)
+++ tests/level/transform_inplace.cc	(working copy)
@@ -45,7 +45,7 @@
   using namespace mln;
   const unsigned size = 50;
 
-  image2d<int> ref(3, 3);
+  image2d<int> ref(size, size);
   debug::iota(ref);
 
   image2d<int> ima = clone(ref);
Index: mln/level/transform.spe.hh
--- mln/level/transform.spe.hh	(revision 2862)
+++ mln/level/transform.spe.hh	(working copy)
@@ -55,41 +55,42 @@
   namespace level
   {
 
+    // Forward declarations.
+
     namespace internal
     {
 
       template <typename I, typename F>
-      inline
       void transform_tests(const Image<I>& input,
                            const Function_v2v<F>& f);
 
       template <typename I1, typename I2, typename F>
-      inline
       void transform_tests(const Image<I1>& input1, const Image<I2>& input2,
-                           const Function_v2v<F>& f);
+                           const Function_vv2v<F>& f);
 
     }
 
 
-    // Implementation
-    // --------------
+    // Implementations.
+
+
     namespace impl
     {
 
 
       namespace generic
       {
+	// Forward declaration.
+	
 	template <typename I, typename F>
         mln_ch_value(I, mln_result(F))
-	  transform(const Image<I>& input_,
-		    const Function_v2v<F>& f_);
+	  transform(const Image<I>& input_, const Function_v2v<F>& f_);
       }
 
 
       template <typename I, typename F>
       mln_ch_value(I, mln_result(F))
-	transform_lowq(const Image<I>& input_,
-		       const Function_v2v<F>& f_)
+	transform_lowq(const Image<I>& input_, const Function_v2v<F>& f_)
       {
 	trace::entering("level::impl::transform_lowq");
 
@@ -111,14 +112,13 @@
 	  output(p) = lut(input(p));
 
 	trace::exiting("level::impl::transform_lowq");
-
         return output;
       }
 
+
       template <typename I, typename F>
       mln_ch_value(I, mln_result(F))
-	transform_taken(const Image<I>& input_,
-			const Function_v2v<F>& f_)
+	transform_taken(const Image<I>& input_, const Function_v2v<F>& f_)
       {
         trace::entering("level::impl::transform_taken");
 
@@ -140,15 +140,13 @@
 	  output(p) = lut(input(p));
 
 	trace::exiting("level::impl::transform_taken");
-
         return output;
       }
 
 
       template <typename I, typename F>
       mln_ch_value(I, mln_result(F))
-	transform_singleton(const Image<I>& input_,
-			    const Function_v2v<F>& f_)
+	transform_singleton(const Image<I>& input_, const Function_v2v<F>& f_)
       {
         trace::entering("level::impl::transform_singleton");
 
@@ -163,14 +161,13 @@
         fill_with_value(output, val);
 
 	trace::exiting("level::impl::transform_singleton");
-
         return output;
       }
 
+
       template <typename I, typename F>
       mln_ch_value(I, mln_result(F))
-	transform_fast(const Image<I>& input_,
-		       const Function_v2v<F>& f_)
+	transform_fast(const Image<I>& input_, const Function_v2v<F>& f_)
       {
         trace::entering("level::impl::transform_fast");
 
@@ -193,16 +190,13 @@
         }
 
 	trace::exiting("level::impl::transform_fast");
-
         return output;
       }
 
 
-
       template <typename I, typename F>
       mln_ch_value(I, mln_result(F))
-	transform_fast_lowq(const Image<I>& input_,
-			    const Function_v2v<F>& f_)
+	transform_fast_lowq(const Image<I>& input_, const Function_v2v<F>& f_)
       {
         trace::entering("level::impl::transform_fast_lowq");
 
@@ -219,23 +213,48 @@
 
         mln_pixter(const I) pi(input);
         mln_pixter(O) po(output);
-
-        po.start();
-        for_all(pi)
-        {
+        for_all_2(pi, po)
           po.val() = lut(pi.val());
-          po.next();
-        }
 
 	trace::exiting("level::impl::transform_fast_lowq");
+        return output;
+      }
+
+
+      template <typename I1, typename I2, typename F>
+      mln_ch_value(I1, mln_result(F))
+	transform_fastest(const Image<I1>& input1_, const Image<I2>& input2_,
+			  const Function_vv2v<F>& f_)
+      {
+        trace::entering("level::impl::transform_fastest");
 
+        const I1& input1 = exact(input1_);
+        const I2& input2 = exact(input2_);
+        const  F& f      = exact(f_);
+        level::internal::transform_tests(input1, input2, f);
+
+        typedef mln_ch_value(I1, mln_result(F)) O;
+        O output;
+        initialize(output, input1);
+        mln_pixter(O) po(output);
+
+        mln_pixter(const I1) pi1(input1);
+        mln_pixter(const I2) pi2(input2);
+        for_all_3(pi1, pi2, po)
+          po.val() = f(pi1.val(), pi2.val());
+
+	trace::exiting("level::impl::transform_fastest");
         return output;
       }
 
 
 
-      // Dispatch
-      // --------
+    } // end of namespace mln::level::impl
+
+
+
+    // Dispatch.
+
       namespace internal
       {
 
@@ -245,10 +264,9 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::undef,
 			     mln::trait::image::quant::any,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return impl::generic::transform(input, f);
+	return level::impl::generic::transform(input, f);
         }
 
         template <typename I, typename F>
@@ -256,10 +274,9 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::vw_set::any,
 			     mln::trait::image::quant::any,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return impl::generic::transform(input, f);
+	return level::impl::generic::transform(input, f);
         }
 
         template <typename I, typename F>
@@ -267,10 +284,9 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::vw_set::uni,
 			     mln::trait::image::quant::any,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return impl::transform_taken(input, f);
+	return level::impl::transform_taken(input, f);
         }
 
 
@@ -279,10 +295,9 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::vw_set::any,
 			     mln::trait::image::quant::low,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return impl::transform_lowq(input, f);
+	return level::impl::transform_lowq(input, f);
         }
 
 
@@ -292,10 +307,9 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::quant::any,
 			     mln::trait::image::value_access::direct,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return transform_fast(input, f);
+	return level::impl::transform_fast(input, f);
         }
 
         /// FIXME check that is right
@@ -304,10 +318,9 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::quant::low,
 			     mln::trait::image::value_access::direct,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return transform_fast_lowq(input, f);
+	return level::impl::transform_fast_lowq(input, f);
         }
 
 
@@ -317,8 +330,7 @@
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::quant::any,
 			     mln::trait::image::value_access::any,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
           return transform_dispatch(mln_trait_image_vw_set(I)(),
 				    mln_trait_image_quant(I)(),
@@ -330,8 +342,7 @@
         inline
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::value_storage::any,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
           return transform_dispatch(mln_trait_image_vw_set(I)(),
 				    mln_trait_image_quant(I)(),
@@ -342,18 +353,16 @@
         inline
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::value_storage::singleton,
-			     const Image<I>& input,
-			     const Function_v2v<F>& f)
+			   const Image<I>& input, const Function_v2v<F>& f)
         {
-          return transform_singleton(input, f);
+	return level::impl::transform_singleton(input, f);
         }
 
         template <typename I, typename F>
         inline
         mln_ch_value(I, mln_result(F))
 	  transform_dispatch(mln::trait::image::value_storage::one_block,
-			     const Image<I>& input_,
-			     const Function_v2v<F>& f_)
+			   const Image<I>& input_, const Function_v2v<F>& f_)
         {
           const I& input  = exact(input_);
 
@@ -371,20 +380,55 @@
 
 
 
+      // Dispatch for transformation from a couple of images.
+
+      template <typename I1, typename I2, typename F>
+      mln_ch_value(I1, mln_result(F))
+	transform_dispatch_2(trait::image::speed::any,
+			     trait::image::speed::any,
+			     const Image<I1>& input1, const Image<I2>& input2,
+			     const Function_vv2v<F>& f)
+      {
+	return level::impl::generic::transform(input1, input2, f);
+      }
+
+      template <typename I1, typename I2, typename F>
+      mln_ch_value(I1, mln_result(F))
+	transform_dispatch_2(trait::image::speed::fastest,
+			     trait::image::speed::fastest,
+			     const Image<I1>& input1, const Image<I2>& input2,
+			     const Function_vv2v<F>& f)
+      {
+	return level::impl::transform_fastest(input1, input2, f);
+      }
+
+      // end of Dispatch for transformation from a couple of images.
+
+
+
+      // Dispatch entry points.
+
         template <typename I, typename F>
         mln_ch_value(I, mln_result(F))
-	  transform_dispatch(const Image<I>& input,
-			     const Function_v2v<F>& f)
+	transform_dispatch(const Image<I>& input, const Function_v2v<F>& f)
         {
           return transform_dispatch(mln_trait_image_value_storage(I)(),
 				    input, f);
         }
 
+      template <typename I1, typename I2, typename F>
+      mln_ch_value(I1, mln_result(F))
+	transform_dispatch(const Image<I1>& input1, const Image<I2>& input2,
+			   const Function_vv2v<F>& f)
+      {
+	return transform_dispatch_2(mln_trait_image_speed(I1)(),
+				    mln_trait_image_speed(I2)(),
+				    input1, input2, f);
       }
 
+    } // end of namespace mln::level::internal
 
 
-    } // end of namespace mln::level::impl
 
   } // end of namespace mln::level
 
Index: mln/level/transform.hh
--- mln/level/transform.hh	(revision 2862)
+++ mln/level/transform.hh	(working copy)
@@ -89,7 +89,6 @@
     {
 
       template <typename I, typename F>
-      inline
       void transform_tests(const Image<I>& input,
                            const Function_v2v<F>& f)
       {
@@ -103,9 +102,7 @@
       }
 
       template <typename I1, typename I2, typename F>
-      inline
-      void transform_tests(const Image<I1>& input1,
-			   const Image<I2>& input2,
+      void transform_tests(const Image<I1>& input1, const Image<I2>& input2,
                            const Function_vv2v<F>& f)
       {
         // Dynamic tests.
@@ -135,7 +132,6 @@
       {
 
 	template <typename I, typename F>
-	inline
         mln_ch_value(I, mln_result(F))
         transform(const Image<I>& input_, const Function_v2v<F>& f_)
 	{
@@ -162,7 +158,6 @@
 
 
 	template <typename I1, typename I2, typename F>
-	inline
         mln_ch_value(I1, mln_result(F))
 	  transform(const Image<I1>& input1_,
 		    const Image<I2>& input2_,
@@ -193,8 +188,10 @@
     } // end of namespace mln::level::impl
 
 
+
     // Facades.
 
+
     template <typename I, typename F>
     inline
     mln_ch_value(I, mln_result(F))
@@ -205,17 +202,17 @@
       internal::transform_tests(input, f);
 
       mln_ch_value(I, mln_result(F)) output;
-      output = impl::internal::transform_dispatch(exact(input), exact(f));
+      output = internal::transform_dispatch(input, f);
 
       trace::exiting("level::transform");
       return output;
     }
 
+
     template <typename I1, typename I2, typename F>
     inline
     mln_ch_value(I1, mln_result(F))
-    transform(const Image<I1>& input1,
-	      const Image<I2>& input2,
+    transform(const Image<I1>& input1, const Image<I2>& input2,
 	      const Function_vv2v<F>& f)
     {
       trace::entering("level::transform");
@@ -223,7 +220,7 @@
       internal::transform_tests(input1, input2, f);
 
       mln_ch_value(I1, mln_result(F)) output;
-      output = impl::generic::transform(input1, input2, f);
+      output = internal::transform_dispatch(input1, input2, f);
 
       trace::exiting("level::transform");
       return output;
Index: mln/level/transform_inplace.hh
--- mln/level/transform_inplace.hh	(revision 2862)
+++ mln/level/transform_inplace.hh	(working copy)
@@ -31,6 +31,8 @@
 /// \file mln/level/transform_inplace.hh
 ///
 /// Transform inplace the contents of an image through a function.
+///
+/// \todo Take into account more properties; see level/transform.hh.
 
 # include <mln/core/concept/image.hh>
 # include <mln/core/concept/function.hh>
@@ -75,6 +77,9 @@
 
 # ifndef MLN_INCLUDE_ONLY
 
+
+    // Tests.
+
     namespace internal
     {
 
@@ -116,7 +121,7 @@
 	mln_precondition(exact(aux).has_data());
 	mln_precondition(exact(aux).domain() == exact(ima).domain());
 
-	// Avoid a warning.
+	// Avoid warnings.
 	(void) ima;
 	(void) aux;
         (void) f;
@@ -128,13 +133,12 @@
     namespace impl
     {
 
+      // Generic implementations.
 
       namespace generic
       {
 
-        // Generic implementation.
 	template <typename I, typename F>
-	inline
         void
         transform_inplace(Image<I>& ima_, const Function_v2v<F>& f_)
 	{
@@ -155,10 +159,7 @@
 	  trace::exiting("level::impl::generic::transform_inplace");
 	}
 
-
-        // Generic implementation.
 	template <typename I1, typename I2, typename F>
-	inline
         void
 	transform_inplace(Image<I1>& ima_, const Image<I2>& aux_,
 			  const Function_vv2v<F>& f_)
@@ -184,20 +185,131 @@
       } // end of namespace mln::level::impl::generic
 
 
+      template <typename I, typename F>
+      void
+      transform_inplace_fastest(Image<I>& ima_, const Function_v2v<F>& f_)
+      {
+	trace::entering("level::impl::transform_inplace_fastest");
+
+	mlc_is(mln_trait_image_pw_io(I),
+	       trait::image::pw_io::read_write)::check();
+
+	I& ima = exact(ima_);
+	const F& f = exact(f_);
+	
+	level::internal::transform_inplace_tests(ima, f);
+	
+	mln_pixter(I) p(ima);
+	for_all(p)
+	  p.val() = f(p.val());
+	
+	trace::exiting("level::impl::transform_inplace_fastest");
+      }
+
+
+      template <typename I1, typename I2, typename F>
+      void
+      transform_inplace_fastest(Image<I1>& ima_, const Image<I2>& aux_,
+				const Function_vv2v<F>& f_)
+      {
+	trace::entering("level::impl::transform_inplace_fastest");
+
+	mlc_is(mln_trait_image_pw_io(I1),
+	       trait::image::pw_io::read_write)::check();
+
+	I1&       ima = exact(ima_);
+	const I2& aux = exact(aux_);
+	const F&  f   = exact(f_);
+	
+	level::internal::transform_inplace_tests(ima, aux, f);
+	
+	mln_pixter(I1) pi(ima);
+	mln_pixter(const I2) pa(aux);
+	for_all_2(pi, pa)
+	  pi.val() = f(pi.val(), pa.val());
+	
+	trace::exiting("level::impl::transform_inplace_fastest");
+      }
+
+
     } // end of namespace mln::level::impl
 
 
+
+    // Dispatch.
+
+    namespace internal
+    {
+
+      // (ima, f) version.
+
+      template <typename I, typename F>
+      void
+      transform_inplace_dispatch(trait::image::speed::any,
+				 Image<I>& ima, const Function_v2v<F>& f)
+      {
+	level::impl::generic::transform_inplace(ima, f);
+      }
+
+      template <typename I, typename F>
+      void
+      transform_inplace_dispatch(trait::image::speed::fastest,
+				 Image<I>& ima, const Function_v2v<F>& f)
+      {
+	level::impl::transform_inplace_fastest(ima, f);
+      }
+
+      template <typename I, typename F>
+      void
+      transform_inplace_dispatch(Image<I>& ima, const Function_v2v<F>& f)
+      {
+	transform_inplace_dispatch(mln_trait_image_speed(I)(),
+				   ima, f);
+      }
+
+      // (ima, aux, f) version.
+
+      template <typename I1, typename I2, typename F>
+      void
+      transform_inplace_dispatch(trait::image::speed::any,
+				 trait::image::speed::any,
+				 Image<I1>& ima, const Image<I2>& aux, const Function_vv2v<F>& f)
+      {
+	level::impl::generic::transform_inplace(ima, aux, f);
+      }
+
+      template <typename I1, typename I2, typename F>
+      void
+      transform_inplace_dispatch(trait::image::speed::fastest,
+				 trait::image::speed::fastest,
+				 Image<I1>& ima, const Image<I2>& aux, const Function_vv2v<F>& f)
+      {
+	level::impl::transform_inplace_fastest(ima, aux, f);
+      }
+
+      template <typename I1, typename I2, typename F>
+      void
+      transform_inplace_dispatch(Image<I1>& ima, const Image<I2>& aux, const Function_vv2v<F>& f)
+      {
+	transform_inplace_dispatch(mln_trait_image_speed(I1)(),
+				   mln_trait_image_speed(I2)(),
+				   ima, aux, f);
+      }
+
+    } // end of namespace mln::level::internal
+
+
+
     // Facades.
 
     template <typename I, typename F>
-    inline
     void
     transform_inplace(Image<I>& ima, const Function_v2v<F>& f)
     {
       trace::entering("level::transform_inplace");
 
-      level::internal::transform_inplace_tests(ima, f);
-      impl::generic::transform_inplace(ima, f);
+      internal::transform_inplace_tests(ima, f);
+      internal::transform_inplace_dispatch(ima, f);
 
       trace::exiting("level::transform_inplace");
     }
@@ -209,8 +321,8 @@
     {
       trace::entering("level::transform_inplace");
 
-      level::internal::transform_inplace_tests(ima, aux, f);
-      impl::generic::transform_inplace(ima, aux, f);
+      internal::transform_inplace_tests(ima, aux, f);
+      internal::transform_inplace_dispatch(ima, aux, f);
 
       trace::exiting("level::transform_inplace");
     }
Index: mln/fun/vv2v/min.hh
--- mln/fun/vv2v/min.hh	(revision 2862)
+++ mln/fun/vv2v/min.hh	(working copy)
@@ -29,7 +29,8 @@
 # define MLN_FUN_VV2V_MIN_HH
 
 /// \file mln/fun/vv2v/min.hh
-/// \brief computing the minimum of two values using a functor.
+///
+/// Functor that computes the minimum of two values.
 
 # include <mln/core/concept/function.hh>
 # include <mln/math/min.hh>
@@ -47,22 +48,23 @@
       // FIXME: Doc.
 
       /// \brief A functor computing the minimum of two values.
-      template <typename V>
-      struct min : public Function_vv2v< min<V> >
+      template <typename L, typename R = L>
+      struct min : public Function_vv2v< min<L,R> >,
+		   private mlc_converts_to(R,L)::check_t
       {
-	typedef V result;
-	V operator()(const V& v1, const V& v2) const;
+	typedef L result;
+	L operator()(const L& v1, const R& v2) const;
       };
 
 
 # ifndef MLN_INCLUDE_ONLY
 
-      template <typename V>
+      template <typename L, typename R>
       inline
-      V
-      min<V>::operator()(const V& v1, const V& v2) const
+      L
+      min<L,R>::operator()(const L& v1, const R& v2) const
       {
-	return mln::math::min(v1, v2);
+	return mln::math::min(v1, L(v2));
       }
 
 # endif // ! MLN_INCLUDE_ONLY
Index: mln/fun/vv2v/macros.hh
--- mln/fun/vv2v/macros.hh	(revision 0)
+++ mln/fun/vv2v/macros.hh	(revision 0)
@@ -0,0 +1,48 @@
+// Copyright (C) 2008 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_FUN_VV2V_MACROS_HH
+# define MLN_FUN_VV2V_MACROS_HH
+
+/// \file mln/fun/vv2v/macros.hh
+///
+/// Define a bunch of macros related to a binary function and a couple
+/// of images.
+
+
+#define mln_fun_vv2v(F, L, R)  mln::fun::vv2v::F< mln_value(L), mln_value(R) >
+
+
+#define mln_fun_vv2v_result(F, L, R)  typename mln_fun_vv2v(F, L, R)::result
+
+
+#define mln_ch_fun_vv2v(F, L, R)						\
+  typename mln::trait::ch_value< L,						\
+                                 typename mln_fun_vv2v(F, L, R)::result >::ret
+
+
+#endif // ! MLN_FUN_VV2V_MACROS_HH
Index: mln/fun/vv2v/all.hh
--- mln/fun/vv2v/all.hh	(revision 2862)
+++ mln/fun/vv2v/all.hh	(working copy)
@@ -48,6 +48,9 @@
 }
 
 
+# include <mln/fun/vv2v/macros.hh>
+
+# include <mln/fun/vv2v/land.hh>
 # include <mln/fun/vv2v/max.hh>
 # include <mln/fun/vv2v/min.hh>
 # include <mln/fun/vv2v/vec.hh>
Index: mln/fun/vv2v/land.hh
--- mln/fun/vv2v/land.hh	(revision 0)
+++ mln/fun/vv2v/land.hh	(revision 0)
@@ -0,0 +1,76 @@
+// Copyright (C) 2008 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_FUN_VV2V_LAND_HH
+# define MLN_FUN_VV2V_LAND_HH
+
+/// \file mln/fun/vv2v/land.hh
+///
+/// Functor that computes "logical and" between two values.
+
+# include <mln/core/concept/function.hh>
+# include <mln/trait/op/and.hh>
+
+
+namespace mln
+{
+
+  namespace fun
+  {
+
+    namespace vv2v
+    {
+
+      /// Functor computing logical-and between two values.
+      template <typename L, typename R = L>
+      struct land : public Function_vv2v< land<L,R> >
+      {
+	typedef mln_trait_op_and(L, R) result;
+	result operator()(const L& v1, const R& v2) const;
+      };
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+      template <typename L, typename R>
+      inline
+      typename land<L,R>::result
+      land<L,R>::operator()(const L& v1, const R& v2) const
+      {
+	return v1 && v2;
+      }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+    } // end of namespace mln::fun::vv2v
+
+  } // end of namespace mln::fun
+
+} // end of namespace mln
+
+
+#endif // ! MLN_FUN_VV2V_LAND_HH
Index: mln/logical/and.hh
--- mln/logical/and.hh	(revision 2862)
+++ mln/logical/and.hh	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,18 +29,14 @@
 #ifndef MLN_LOGICAL_AND_HH
 # define MLN_LOGICAL_AND_HH
 
-/*! \file mln/logical/and.hh
- *
- * \brief Point-wise "logical and" between binary images.
- *
- * \todo Add static assertion and save one iterator in in-place version.
- */
-
-# include <mln/core/concept/image.hh>
-
+/// \file mln/logical/and.hh
+///
+/// Point-wise "logical and" between binary images.
+///
+/// \todo Add static assertion and save one iterator in in-place version.
 
-// Specializations are in:
-# include <mln/logical/and.spe.hh>
+# include <mln/logical/includes.hh>
+# include <mln/fun/vv2v/land.hh>
 
 
 namespace mln
@@ -57,7 +54,8 @@
      * \pre \p lhs.domain == \p rhs.domain
      */
     template <typename L, typename R>
-    mln_concrete(L) and_(const Image<L>& lhs, const Image<R>& rhs);
+    mln_ch_fun_vv2v(land, L, R)
+    and_(const Image<L>& lhs, const Image<R>& rhs);
 
 
     /*! Point-wise in-place "logical and" of image \p rhs in image \p lhs.
@@ -77,44 +75,17 @@
 
 # ifndef MLN_INCLUDE_ONLY
 
-    namespace impl
-    {
-
-      namespace generic
-      {
-
-	template <typename L, typename R, typename O>
-	inline
-	void and__(const L& lhs, const R& rhs, O& output)
-	{
-	  trace::entering("logical::impl::generic::and__");
-
-	  mln_piter(L) p(lhs.domain());
-	  for_all(p)
-	    output(p) = lhs(p) && rhs(p);
-
-	  trace::exiting("logical::impl::generic::and__");
-	}
-
-      } // end of namespace mln::logical::impl::generic
-
-    } // end of namespace mln::logical::impl
-
-
-    // Facades.
-
     template <typename L, typename R>
     inline
-    mln_concrete(L) and_(const Image<L>& lhs, const Image<R>& rhs)
+    mln_ch_fun_vv2v(land, L, R)
+    and_(const Image<L>& lhs, const Image<R>& rhs)
     {
       trace::entering("logical::and_");
 
-      mln_precondition(exact(rhs).domain() == exact(lhs).domain());
+      internal::tests(lhs, rhs);
 
-      mln_concrete(L) output;
-      initialize(output, lhs);
-      impl::and__(mln_trait_image_speed(L)(), exact(lhs),
-		  mln_trait_image_speed(R)(), exact(rhs), output);
+      mln_fun_vv2v(land, L, R) f;
+      mln_ch_fun_vv2v(land, L, R) output = level::transform(lhs, rhs, f);
 
       trace::exiting("logical::and_");
       return output;
@@ -126,10 +97,13 @@
     {
       trace::entering("logical::and_inplace");
 
-      mln_precondition(exact(rhs).domain() >= exact(lhs).domain());
+      mlc_converts_to(mln_fun_vv2v_result(land, L, R),
+		      mln_value(L))::check();
+
+      internal::tests(lhs, rhs);
 
-      impl::and__(mln_trait_image_speed(L)(), exact(lhs),
-		  mln_trait_image_speed(R)(), exact(rhs), exact(lhs));
+      mln_fun_vv2v(land, L, R) f;
+      level::transform_inplace(lhs, rhs, f);
 
       trace::exiting("logical::and_inplace");
     }
Index: mln/logical/includes.hh
--- mln/logical/includes.hh	(revision 0)
+++ mln/logical/includes.hh	(revision 0)
@@ -0,0 +1,77 @@
+// Copyright (C) 2008 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_LOGICAL_INCLUDES_HH
+# define MLN_LOGICAL_INCLUDES_HH
+
+/// \file mln/logical/includes.hh
+
+
+# include <mln/core/concept/image.hh>
+# include <mln/level/transform.hh>
+# include <mln/level/transform_inplace.hh>
+# include <mln/fun/vv2v/macros.hh>
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+namespace mln
+{
+
+  namespace logical
+  {
+
+    namespace internal
+    {
+
+      template <typename L, typename R>
+      inline
+      void
+      tests(const Image<L>& lhs_, const Image<R>& rhs_)
+      {
+	const L& lhs = exact(lhs_);
+	const R& rhs = exact(rhs_);
+
+	mln_precondition(lhs.has_data());
+	mln_precondition(rhs.has_data());
+	mln_precondition(rhs.domain() == lhs.domain());
+
+	(void) lhs;
+	(void) rhs;
+      }
+      
+    } // end of namespace mln::logical::internal
+
+  } // end of namespace mln::logical
+
+} // end of namespace mln
+
+# endif // ! MLN_INCLUDE_ONLY
+
+
+#endif // ! MLN_LOGICAL_INCLUDES_HH
Index: mln/logical/all.hh
--- mln/logical/all.hh	(revision 2862)
+++ mln/logical/all.hh	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_LOGICAL_ALL_HH
 # define MLN_LOGICAL_ALL_HH
 
-/*! \file mln/logical/all.hh
- *
- * \brief File that includes all logical operators.
- */
+/// \file mln/logical/all.hh
+///
+/// File that includes all logical operators.
 
 
 namespace mln
@@ -47,11 +47,10 @@
       namespace generic {}
 
     }
-
   }
-
 }
 
+# include <mln/logical/includes.hh>
 # include <mln/logical/and.hh>
 # include <mln/logical/and_not.hh>
 # include <mln/logical/not.hh>
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    13 Nov '08
                    
                        https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena
Index: ChangeLog
from  Thierry Geraud  <thierry.geraud(a)lrde.epita.fr>
	Specialize accu tranform for fastest images.
	* mln/accu/snake_2d.hh (todo): New.
	* mln/accu/transform.hh (transform_fastest): New.
	(transform_dispatch): New overload.
	(todo): Remove; obsolete.
	* mln/canvas/browsing/snake_generic.hh: Upgrade doc style.
	(include): Remove useless 'stack'.
 accu/snake_2d.hh                 |    2 +
 accu/transform.hh                |   77 ++++++++++++++++++++++++++++++++-------
 canvas/browsing/snake_generic.hh |   12 +++---
 3 files changed, 72 insertions(+), 19 deletions(-)
Index: mln/accu/snake_2d.hh
--- mln/accu/snake_2d.hh	(revision 2861)
+++ mln/accu/snake_2d.hh	(working copy)
@@ -31,6 +31,8 @@
 /// \file mln/accu/snake_2d.hh
 ///
 /// Run an accumulator in a snake-like browsing.
+///
+/// \todo Make it n-D.
 
 #include <mln/core/concept/image.hh>
 #include <mln/core/concept/meta_accumulator.hh>
Index: mln/accu/transform.hh
--- mln/accu/transform.hh	(revision 2861)
+++ mln/accu/transform.hh	(working copy)
@@ -32,8 +32,6 @@
 ///
 /// Transform an image by applying locally an accumulator on its
 /// values.
-///
-/// \todo Specialize for fastest images.
 
 # include <mln/core/concept/meta_accumulator.hh>
 # include <mln/core/concept/image.hh>
@@ -67,6 +65,8 @@
     namespace impl
     {
 
+      // Generic version.
+
       namespace generic
       {
 
@@ -79,8 +79,8 @@
 	  trace::entering("accu::impl::generic::transform");
 
 	  const I& input = exact(input_);
-	  A a = exact(a_);
 	  const W& win   = exact(win_);
+	  A a = exact(a_);
 
 	  mln_precondition(input.has_data());
 	  // mln_precondition(win.is_valid());
@@ -106,32 +106,85 @@
 
       } // end of namespace mln::accu::impl::generic
 
+	
+      // Fastest version.
+
+      template <typename I, typename A, typename W>
+      mln_ch_value(I, mln_result(A))
+      transform_fastest(const Image<I>& input_, const Accumulator<A>& a_, const Window<W>& win_)
+      {
+	trace::entering("accu::impl::transform_fastest");
+
+	const I& input = exact(input_);
+	const W& win   = exact(win_);
+	A a = exact(a_);
+
+	mln_precondition(input.has_data());
+	// mln_precondition(win.is_valid());
+
+	extension::adjust(input, win);
+	  
+	typedef mln_ch_value(I, mln_result(A)) O;
+	O output;
+	initialize(output, input);
+	mln_pixter(O) o(output);
+
+	mln_pixter(const I)    p(input);
+	mln_qixter(const I, W) q(p, win);
+	for_all_2(p, o)
+	  {
+	    a.init();
+	    for_all(q)
+	      a.take(q.val());
+	    o.val() = a.to_result();
+	  }
+
+	trace::exiting("accu::impl::transform_fastest");
+	return output;
+      }
+
+      
     } // end of namespace mln::accu::impl
 
 
+    // Dispatch.
+
     namespace internal
     {
 
       template <typename I, typename A, typename W>
-      inline
       mln_ch_value(I, mln_result(A))
-      transform_dispatch(const Image<I>& input,
-			 const Accumulator<A>& a,
-			 const Window<W>& win)
+      transform_dispatch(trait::image::speed::any,
+			 const Image<I>& input, const Accumulator<A>& a, const Window<W>& win)
       {
 	return impl::generic::transform(input, a, win);
       }
 
+      template <typename I, typename A, typename W>
+      mln_ch_value(I, mln_result(A))
+      transform_dispatch(trait::image::speed::fastest,
+			 const Image<I>& input, const Accumulator<A>& a, const Window<W>& win)
+      {
+	return impl::transform_fastest(input, a, win);
+      }
+
+      template <typename I, typename A, typename W>
+      mln_ch_value(I, mln_result(A))
+      transform_dispatch(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win)
+      {
+	return transform_dispatch(mln_trait_image_speed(I)(),
+				  input, a, win);
+      }
+
     } // end of namespace mln::accu::internal
 
 
+    // Facades.
 
     template <typename I, typename A, typename W>
     inline
     mln_ch_value(I, mln_result(A))
-    transform(const Image<I>& input,
-	      const Accumulator<A>& a,
-	      const Window<W>& win)
+    transform(const Image<I>& input, const Accumulator<A>& a, const Window<W>& win)
     {
       trace::entering("accu::transform");
 
@@ -147,9 +200,7 @@
 
     template <typename I, typename A, typename W>
     mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
-    transform(const Image<I>& input,
-	      const Meta_Accumulator<A>& a,
-	      const Window<W>& win)
+    transform(const Image<I>& input, const Meta_Accumulator<A>& a, const Window<W>& win)
     {
       trace::entering("accu::transform");
 
Index: mln/canvas/browsing/snake_generic.hh
--- mln/canvas/browsing/snake_generic.hh	(revision 2861)
+++ mln/canvas/browsing/snake_generic.hh	(working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,14 +29,13 @@
 #ifndef MLN_CANVAS_BROWSING_SNAKE_GENERIC_HH
 # define MLN_CANVAS_BROWSING_SNAKE_GENERIC_HH
 
-/*! \file mln/canvas/browsing/snake_generic.hh
- *
- * \brief Browsing in a snake-way, forward.
- */
+/// \file mln/canvas/browsing/snake_generic.hh
+///
+/// Browsing in a snake-way, forward.
 
-# include <stack>
 # include <mln/core/concept/browsing.hh>
 
+
 namespace mln
 {
 
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        	* mln/accu/all.hh,
	* mln/accu/bbox.hh,
	* mln/accu/compute.hh,
	* mln/accu/convolve.hh,
	* mln/accu/count.hh,
	* mln/accu/count_adjacent_vertices.hh,
	* mln/accu/essential.hh,
	* mln/accu/height.hh,
	* mln/accu/histo.hh,
	* mln/accu/internal/base.hh,
	* mln/accu/land.hh,
	* mln/accu/line.hh,
	* mln/accu/maj_h.hh,
	* mln/accu/max.hh,
	* mln/accu/max_h.hh,
	* mln/accu/mean.hh,
	* mln/accu/median_alt.hh,
	* mln/accu/median_h.hh,
	* mln/accu/min.hh,
	* mln/accu/min_h.hh,
	* mln/accu/min_max.hh,
	* mln/accu/nil.hh,
	* mln/accu/p.hh,
	* mln/accu/pair.hh,
	* mln/accu/rank.hh,
	* mln/accu/rank_bool.hh,
	* mln/accu/rank_high_quant.hh,
	* mln/accu/snake_2d.hh,
	* mln/accu/sum.hh,
	* mln/accu/take.hh,
	* mln/accu/transform.hh,
	* mln/accu/tuple.hh,
	* mln/accu/v.hh,
	* mln/accu/volume.hh: Update comments and add missing unmeta.
	* mln/morpho/elementary/like_ero_fun.hh,
	* mln/algebra/quat.hh: Fix warnings.
	* mln/geom/essential.hh,
	* mln/value/essential.hh: Fix includes.
	* tests/accu/rank.cc: Use a new constructor for accu::meta::rank.
---
 milena/ChangeLog                             |   47 ++++++++++++++++++++++++++
 milena/mln/accu/all.hh                       |   19 +++++-----
 milena/mln/accu/bbox.hh                      |   13 +++----
 milena/mln/accu/compute.hh                   |    8 ++--
 milena/mln/accu/convolve.hh                  |   17 ++++-----
 milena/mln/accu/count.hh                     |    6 ++--
 milena/mln/accu/count_adjacent_vertices.hh   |    6 ++--
 milena/mln/accu/essential.hh                 |   10 ++---
 milena/mln/accu/height.hh                    |   17 +++++----
 milena/mln/accu/histo.hh                     |   20 +++++-----
 milena/mln/accu/internal/base.hh             |   15 ++++----
 milena/mln/accu/land.hh                      |   10 +++---
 milena/mln/accu/line.hh                      |    2 +-
 milena/mln/accu/maj_h.hh                     |   14 ++++----
 milena/mln/accu/max.hh                       |   16 ++++-----
 milena/mln/accu/max_h.hh                     |   14 +++----
 milena/mln/accu/mean.hh                      |   17 ++++-----
 milena/mln/accu/median_alt.hh                |   26 ++++++++++----
 milena/mln/accu/median_h.hh                  |   20 +++++------
 milena/mln/accu/min.hh                       |    4 +-
 milena/mln/accu/min_h.hh                     |   18 ++++------
 milena/mln/accu/min_max.hh                   |   17 ++++-----
 milena/mln/accu/nil.hh                       |   16 ++++-----
 milena/mln/accu/p.hh                         |   16 ++++-----
 milena/mln/accu/pair.hh                      |   22 ++++++------
 milena/mln/accu/rank.hh                      |   12 ++++--
 milena/mln/accu/rank_bool.hh                 |   22 +++++------
 milena/mln/accu/rank_high_quant.hh           |   25 ++++++++++---
 milena/mln/accu/snake_2d.hh                  |    2 +-
 milena/mln/accu/sum.hh                       |   12 +++---
 milena/mln/accu/take.hh                      |   14 ++++----
 milena/mln/accu/transform.hh                 |   10 +++---
 milena/mln/accu/tuple.hh                     |   14 ++++----
 milena/mln/accu/v.hh                         |   19 +++++-----
 milena/mln/accu/volume.hh                    |   15 ++++----
 milena/mln/algebra/quat.hh                   |    1 +
 milena/mln/geom/essential.hh                 |   10 +++++
 milena/mln/morpho/elementary/like_ero_fun.hh |    2 +-
 milena/mln/value/essential.hh                |    4 +-
 milena/tests/accu/rank.cc                    |    4 +--
 40 files changed, 309 insertions(+), 247 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 7b16037..2e64654 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,52 @@
 2008-11-12  Guillaume Lazzara  <z(a)lrde.epita.fr>
 
+	Various small fixes.
+
+	* mln/accu/all.hh,
+	* mln/accu/bbox.hh,
+	* mln/accu/compute.hh,
+	* mln/accu/convolve.hh,
+	* mln/accu/count.hh,
+	* mln/accu/count_adjacent_vertices.hh,
+	* mln/accu/essential.hh,
+	* mln/accu/height.hh,
+	* mln/accu/histo.hh,
+	* mln/accu/internal/base.hh,
+	* mln/accu/land.hh,
+	* mln/accu/line.hh,
+	* mln/accu/maj_h.hh,
+	* mln/accu/max.hh,
+	* mln/accu/max_h.hh,
+	* mln/accu/mean.hh,
+	* mln/accu/median_alt.hh,
+	* mln/accu/median_h.hh,
+	* mln/accu/min.hh,
+	* mln/accu/min_h.hh,
+	* mln/accu/min_max.hh,
+	* mln/accu/nil.hh,
+	* mln/accu/p.hh,
+	* mln/accu/pair.hh,
+	* mln/accu/rank.hh,
+	* mln/accu/rank_bool.hh,
+	* mln/accu/rank_high_quant.hh,
+	* mln/accu/snake_2d.hh,
+	* mln/accu/sum.hh,
+	* mln/accu/take.hh,
+	* mln/accu/transform.hh,
+	* mln/accu/tuple.hh,
+	* mln/accu/v.hh,
+	* mln/accu/volume.hh: Update comments and add missing unmeta.
+
+	* mln/morpho/elementary/like_ero_fun.hh,
+	* mln/algebra/quat.hh: Fix warnings.
+
+	* mln/geom/essential.hh,
+	* mln/value/essential.hh: Fix includes.
+
+	* tests/accu/rank.cc: Use a new constructor for accu::meta::rank.
+
+2008-11-12  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
 	Update tutorial.
 
 	* doc/Doxyfile.in: Add new example/include paths.
diff --git a/milena/mln/accu/all.hh b/milena/mln/accu/all.hh
index 76b09d9..6f9e7a5 100644
--- a/milena/mln/accu/all.hh
+++ b/milena/mln/accu/all.hh
@@ -29,16 +29,15 @@
 #ifndef MLN_ACCU_ALL_HH
 # define MLN_ACCU_ALL_HH
 
-/*! \file mln/accu/all.hh
- *
- * \brief File that includes all accumulator types.
- *
- * \todo Update accumulators s.a. count so that they are like min_/min.
- *
- * \todo Propagate those updates to mln/estim/.
- *
- * \todo Update the include list...
- */
+/// \file mln/accu/all.hh
+///
+/// File that includes all accumulator types.
+///
+/// \todo Update accumulators s.a. count so that they are like min_/min.
+///
+/// \todo Propagate those updates to mln/estim/.
+///
+/// \todo Update the include list...
 
 
 namespace mln
diff --git a/milena/mln/accu/bbox.hh b/milena/mln/accu/bbox.hh
index 4066428..90c2e5d 100644
--- a/milena/mln/accu/bbox.hh
+++ b/milena/mln/accu/bbox.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_BBOX_HH
 # define MLN_ACCU_BBOX_HH
 
-/*! \file mln/accu/bbox.hh
- *
- * \brief Define an accumulator that computes a bbox.
- */
+/// \file mln/accu/bbox.hh
+///
+/// Define an accumulator that computes a bbox.
 
 # include <mln/core/site_set/box.hh>
 # include <mln/core/concept/meta_accumulator.hh>
@@ -45,8 +44,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic bbox accumulator class.
-     *
+    /// Generic bbox accumulator class.
+    /*!
      * The parameter \c P is the type of points.
      */
     template <typename P>
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index ad40de3..3da8d5f 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -47,8 +47,8 @@ namespace mln
   namespace accu
   {
 
-    /*! \brief Make an accumulator compute the pixels of the image \p input.
-     *
+    /// Make an accumulator compute the pixels of the image \p input.
+    /*!
      * \param[in] input The input image.
      *
      * This routine runs: \n
@@ -62,8 +62,8 @@ namespace mln
     compute(const Accumulator<A>& a, const Image<I>& input);
 
 
-    /*! \brief Make an accumulator compute the pixels of the image \p input.
-     *
+    /// Make an accumulator compute the pixels of the image \p input.
+    /*!
      * \param[in] input The input image.
      *
      * This routine runs: \n
diff --git a/milena/mln/accu/convolve.hh b/milena/mln/accu/convolve.hh
index bad43c7..91db932 100644
--- a/milena/mln/accu/convolve.hh
+++ b/milena/mln/accu/convolve.hh
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_CONVOLVE_HH
 # define MLN_ACCU_CONVOLVE_HH
 
-/*! \file mln/accu/convolve.hh
- *
- * \brief Define an accumulator that computes a convolution.
- */
+/// \file mln/accu/convolve.hh
+///
+/// Define an accumulator that computes a convolution.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/value/ops.hh>
@@ -45,11 +44,11 @@ namespace mln
   {
 
 
-    /*! \brief Generic convolution accumulator class.
-     *
-     * Parameters \c T1 and \c T2 are the type of values to be
-     * convolved.  Parameter \c R is the result type.
-     */
+    /// Generic convolution accumulator class.
+    ///
+    /// Parameters \c T1 and \c T2 are the type of values to be
+    /// convolved.  Parameter \c R is the result type.
+    ///
     template <typename T1, typename T2,
 	      typename R = mln_sum_x(T1, T2)>
     struct convolve : public mln::accu::internal::base< R, convolve<T1,T2,R> >,
diff --git a/milena/mln/accu/count.hh b/milena/mln/accu/count.hh
index da5fd21..9d68fec 100644
--- a/milena/mln/accu/count.hh
+++ b/milena/mln/accu/count.hh
@@ -31,7 +31,7 @@
 
 /// \file mln/accu/count.hh
 ///
-/// \brief Define an accumulator that counts.
+/// Define an accumulator that counts.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/core/concept/meta_accumulator.hh>
@@ -43,7 +43,7 @@ namespace mln
   namespace accu
   {
 
-    /// \brief Generic counter accumulator class.
+    /// Generic counter accumulator class.
     /// The parameter \a T is the type to be count.
     template <typename T>
     struct count : public mln::accu::internal::base< unsigned , count<T> >
@@ -81,7 +81,7 @@ namespace mln
     namespace meta
     {
 
-      /// \brief Meta accumulator for count.
+      /// Meta accumulator for count.
       struct count : public Meta_Accumulator< count >
       {
 	template <typename T>
diff --git a/milena/mln/accu/count_adjacent_vertices.hh b/milena/mln/accu/count_adjacent_vertices.hh
index 69e8530..6d32509 100644
--- a/milena/mln/accu/count_adjacent_vertices.hh
+++ b/milena/mln/accu/count_adjacent_vertices.hh
@@ -30,7 +30,7 @@
 # define MLN_ACCU_COUNT_ADJACENT_VERTICES_HH
 
 /// \file mln/accu/count_adjacent_vertices.hh
-/// \brief Define an accumulator that counts the vertices adjacent to a
+/// Define an accumulator that counts the vertices adjacent to a
 /// set of line graph psite.
 
 # include <mln/accu/internal/base.hh>
@@ -44,7 +44,7 @@ namespace mln
   namespace accu
   {
 
-    /// \brief Accumulator class counting the number of vertices
+    /// Accumulator class counting the number of vertices
     /// adjacent to a set of mln::line_graph_psite (i.e., a set of
     /// edges).
     ///
@@ -90,7 +90,7 @@ namespace mln
     namespace meta
     {
 
-      /// \brief Meta accumulator for count_adjacent_vertices.
+      /// Meta accumulator for count_adjacent_vertices.
       struct count_adjacent_vertices
 	: public Meta_Accumulator< count_adjacent_vertices >
       {
diff --git a/milena/mln/accu/essential.hh b/milena/mln/accu/essential.hh
index 34124ba..18498f2 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
+// Copyright (C) 2008 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
@@ -28,11 +28,9 @@
 #ifndef MLN_ACCU_ESSENTIAL_HH_
 # define MLN_ACCU_ESSENTIAL_HH_
 
-/*! \file mln/accu/essential.hh
- *
- * \brief File that includes the most useful accumulator types.
- *
- */
+/// \file mln/accu/essential.hh
+///
+/// File that includes the most useful accumulator types.
 
 # include <mln/accu/bbox.hh>
 # include <mln/accu/count.hh>
diff --git a/milena/mln/accu/height.hh b/milena/mln/accu/height.hh
index f3dc59b..90eead5 100644
--- a/milena/mln/accu/height.hh
+++ b/milena/mln/accu/height.hh
@@ -29,17 +29,18 @@
 #ifndef MLN_ACCU_HEIGHT_HH
 # define MLN_ACCU_HEIGHT_HH
 
-/** \file mln/accu/height.hh
-    \brief Define an accumulator that computes the height of a
-    component through one of its pixels.
-
+/// \file mln/accu/height.hh
+/// Define an accumulator that computes the height of a
+/// component through one of its pixels.
+/*
     This accumulator uses an mln::util::pix (pixel) to update the
     height information of the component.
 
     The class mln/accu/height is not a general-purpose accumulator;
     it is used to implement height-based connected filters.
     \see mln::morpho::closing_height
-    \see mln::morpho::opening_height  */
+    \see mln::morpho::opening_height
+*/
 
 # include <mln/accu/internal/base.hh>
 # include <mln/core/concept/meta_accumulator.hh>
@@ -54,7 +55,7 @@ namespace mln
   namespace accu
   {
 
-    /// \brief Height accumulator class.
+    /// Height accumulator class.
     ///
     /// The parameter \p I is the image type on which the accumulator
     /// of pixels is built.
@@ -62,7 +63,7 @@ namespace mln
     struct height
       : public mln::accu::internal::base< unsigned , height<I> >
     {
-      /// \brief The accumulated data type.
+      /// The accumulated data type.
       ///
       /// The height of component is represented by the height of its
       /// root pixel.  See mln::morpho::closing_height and
@@ -104,7 +105,7 @@ namespace mln
     namespace meta
     {
 
-      /// \brief Meta accumulator for height.
+      /// Meta accumulator for height.
       struct height : public Meta_Accumulator< height >
       {
 	template <typename I>
diff --git a/milena/mln/accu/histo.hh b/milena/mln/accu/histo.hh
index 8468e4e..d4cc29a 100644
--- a/milena/mln/accu/histo.hh
+++ b/milena/mln/accu/histo.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +28,12 @@
 #ifndef MLN_ACCU_HISTO_HH
 # define MLN_ACCU_HISTO_HH
 
-/*! \file mln/accu/histo.hh
- *
- * \brief Define a generic histogram accumulator class.
- *
- * \todo Use histo::data instead of std::vector!
- */
+/// \file mln/accu/histo.hh
+///
+/// Define a generic histogram accumulator class.
+///
+/// \todo Use histo::data instead of std::vector!
+
 
 # include <vector>
 # include <algorithm>
@@ -51,9 +51,9 @@ namespace mln
   {
 
 
-    /*!
-     * \brief Generic histogram class over a value set with type \c V.
-     */
+    ///
+    /// Generic histogram class over a value set with type \c V.
+    ///
     template <typename V>
     struct histo :
       public mln::accu::internal::base<const std::vector<unsigned>& ,
diff --git a/milena/mln/accu/internal/base.hh b/milena/mln/accu/internal/base.hh
index ed9528f..50d38c4 100644
--- a/milena/mln/accu/internal/base.hh
+++ b/milena/mln/accu/internal/base.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,11 +29,10 @@
 #ifndef MLN_ACCU_INTERNAL_BASE_HH
 # define MLN_ACCU_INTERNAL_BASE_HH
 
-/*! \file mln/accu/internal/base.hh
- *
- * \brief Define a base class for implementation of accumulator
- * classes.
- */
+/// \file mln/accu/internal/base.hh
+///
+/// Define a base class for implementation of accumulator
+/// classes.
 
 # include <mln/core/concept/accumulator.hh>
 
@@ -46,9 +46,8 @@ namespace mln
     namespace internal
     {
 
-      /*! Generic min accumulator class.
-       * Base class for implementation of accumulator classes.
-       */
+      /// Generic min accumulator class.
+      /// Base class for implementation of accumulator classes.
       template <typename R, typename E>
       class base : public Accumulator<E>,
 		   public mln::internal::proxy_impl< R, E >
diff --git a/milena/mln/accu/land.hh b/milena/mln/accu/land.hh
index be7bb4d..c0b0171 100644
--- a/milena/mln/accu/land.hh
+++ b/milena/mln/accu/land.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,10 @@
 #ifndef MLN_ACCU_LAND_HH
 # define MLN_ACCU_LAND_HH
 
-/*! \file mln/accu/land.hh
- *
- * \brief Define a 'logical-and' accumulator.
- */
+/// \file mln/accu/land.hh
+///
+/// Define a 'logical-and' accumulator.
+///
 
 # include <mln/accu/internal/base.hh>
 
diff --git a/milena/mln/accu/line.hh b/milena/mln/accu/line.hh
index cb484d7..f7a3da3 100644
--- a/milena/mln/accu/line.hh
+++ b/milena/mln/accu/line.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
diff --git a/milena/mln/accu/maj_h.hh b/milena/mln/accu/maj_h.hh
index ffd545d..f73b216 100644
--- a/milena/mln/accu/maj_h.hh
+++ b/milena/mln/accu/maj_h.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,10 @@
 #ifndef MLN_ACCU_MAJ_H_HH
 # define MLN_ACCU_MAJ_H_HH
 
-/*! \file mln/accu/maj_h.hh
- *
- * \brief Define an accumulator that computes a maj_h.
- */
+/// \file mln/accu/maj_h.hh
+///
+/// Define an accumulator that computes a maj_h.
+
 
 # include <mln/core/concept/meta_accumulator.hh>
 # include <mln/accu/internal/base.hh>
@@ -48,8 +48,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic maj_h accumulator class.
-     *
+    /// Generic maj_h accumulator class.
+    /*!
      * The parameter \c T is the type of values.
      */
     template <typename T>
diff --git a/milena/mln/accu/max.hh b/milena/mln/accu/max.hh
index 0cacbed..99de2e4 100644
--- a/milena/mln/accu/max.hh
+++ b/milena/mln/accu/max.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_MAX_HH
 # define MLN_ACCU_MAX_HH
 
-/*! \file mln/accu/max.hh
- *
- * \brief Define an accumulator that computes a max.
- */
+/// \file mln/accu/max.hh
+///
+/// Define an accumulator that computes a max.
 
 # include <mln/core/concept/meta_accumulator.hh>
 # include <mln/accu/internal/base.hh>
@@ -46,10 +45,9 @@ namespace mln
   {
 
 
-    /*! \brief Generic max accumulator class.
-     *
-     * The parameter \c T is the type of values.
-     */
+    /// Generic max accumulator class.
+    ///
+    /// The parameter \c T is the type of values.
     template <typename T>
     struct max : public mln::accu::internal::base< const T& , max<T> >
     {
diff --git a/milena/mln/accu/max_h.hh b/milena/mln/accu/max_h.hh
index ece814a..dd3a3dc 100644
--- a/milena/mln/accu/max_h.hh
+++ b/milena/mln/accu/max_h.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_MAX_H_HH
 # define MLN_ACCU_MAX_H_HH
 
-/*! \file mln/accu/max_h.hh
- *
- * \brief Define a generic max accumulator class based on histogram.
- */
+/// \file mln/accu/max_h.hh
+///
+/// Define a generic max accumulator class based on histogram.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/accu/histo.hh>
@@ -45,9 +44,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic max function based on histogram over a value set with
-     * type \c V.
-     */
+    /// Generic max function based on histogram over a value set with
+    /// type \c V.
     template <typename V>
     struct max_h : public mln::accu::internal::base< const V&, max_h<V> >
     {
diff --git a/milena/mln/accu/mean.hh b/milena/mln/accu/mean.hh
index b58c100..c508ce1 100644
--- a/milena/mln/accu/mean.hh
+++ b/milena/mln/accu/mean.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +28,11 @@
 #ifndef MLN_ACCU_MEAN_HH
 # define MLN_ACCU_MEAN_HH
 
-/*! \file mln/accu/mean.hh
- *
- * \brief Define an accumulator that computes a mean.
- *
- * \todo Use accu::pair just like in accu::min_max.
- */
+/// \file mln/accu/mean.hh
+///
+/// Define an accumulator that computes a mean.
+///
+/// \todo Use accu::pair just like in accu::min_max.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/accu/count.hh>
@@ -47,8 +46,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic mean accumulator class.
-     *
+    /// Generic mean accumulator class.
+    /*!
      * Parameter \c T is the type of values that we sum.  Parameter \c
      * S is the type to store the sum of values; the default type of
      * \c S is the summation type (property) of \c T.  Parameter \c M
diff --git a/milena/mln/accu/median_alt.hh b/milena/mln/accu/median_alt.hh
index 66bc5c5..98d0cac 100644
--- a/milena/mln/accu/median_alt.hh
+++ b/milena/mln/accu/median_alt.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_MEDIAN_ALT_HH
 # define MLN_ACCU_MEDIAN_ALT_HH
 
-/*! \file mln/accu/median_alt.hh
- *
- * \brief Define alternative generic median accumulator class.
- */
+/// \file mln/accu/median_alt.hh
+///
+/// Define alternative generic median accumulator class.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/accu/histo.hh>
@@ -44,9 +43,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic median_alt function based on histogram over a
-     * value set with type \c S.
-     */
+    /// Generic median_alt function based on histogram over a
+    /// value set with type \c S.
     template <typename S>
     struct median_alt : public mln::accu::internal::base< const mln_value(S)&, median_alt<S> >
     {
@@ -103,17 +101,29 @@ namespace mln
 
       struct median_alt : public Meta_Accumulator< median_alt >
       {
+	median_alt(const Value_Set<S>& s_) : s(s_) {}
+
 	template <typename V>
 	struct with
 	{
 	  typedef accu::median_alt<V> ret;
 	};
+
+	Value_Set<S> s;
       };
 
     } // end of namespace mln::accu::meta
 
 
     template <typename T>
+    median_alt<T> unmeta(const meta::median_alt& m, T)
+    {
+      median_alt<T> a(m.s);
+      return a;
+    }
+
+
+    template <typename T>
     struct median_alt_on : public median_alt< value::set<T> >
     {
       median_alt_on()
diff --git a/milena/mln/accu/median_h.hh b/milena/mln/accu/median_h.hh
index 0c04e24..c7ea0e8 100644
--- a/milena/mln/accu/median_h.hh
+++ b/milena/mln/accu/median_h.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_MEDIAN_H_HH
 # define MLN_ACCU_MEDIAN_H_HH
 
-/*! \file mln/accu/median_h.hh
- *
- * \brief Define a generic median accumulator class.
- */
+/// \file mln/accu/median_h.hh
+///
+/// Define a generic median accumulator class.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/accu/histo.hh>
@@ -45,9 +44,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic median function based on histogram over a value
-     * set with type \c V.
-     */
+    /// Generic median function based on histogram over a value
+    /// set with type \c V.
     template <typename V>
     struct median_h : public mln::accu::internal::base< const V&, median_h<V> >
     {
@@ -77,13 +75,13 @@ namespace mln
     protected:
 
       mutable accu::histo<V> h_;
-      const value::set<V>& s_; // derived from h_
+      const value::set<V>& s_;	// derived from h_
 
       mutable unsigned sum_minus_, sum_plus_;
 
       mutable bool valid_;
-      mutable unsigned i_; // the median_h index
-      mutable argument t_;       // the median_h value
+      mutable unsigned i_;	// the median_h index
+      mutable argument t_;	// the median_h value
 
       // Auxiliary methods
       void update_() const;
diff --git a/milena/mln/accu/min.hh b/milena/mln/accu/min.hh
index 83e6804..1825c7f 100644
--- a/milena/mln/accu/min.hh
+++ b/milena/mln/accu/min.hh
@@ -46,8 +46,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic min accumulator class.
-     *
+    /// Generic min accumulator class.
+    /*!
      * The parameter \c T is the type of values.
      */
     template <typename T>
diff --git a/milena/mln/accu/min_h.hh b/milena/mln/accu/min_h.hh
index fd3706e..e4e8fee 100644
--- a/milena/mln/accu/min_h.hh
+++ b/milena/mln/accu/min_h.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +28,9 @@
 #ifndef MLN_ACCU_MIN_H_HH
 # define MLN_ACCU_MIN_H_HH
 
-/*! \file mln/accu/min_h.hh
- *
- * \brief Define a generic min accumulator class based on histogram.
- */
+/// \file mln/accu/min_h.hh
+///
+/// Define a generic min accumulator class based on histogram.
 
 # include <mln/accu/internal/base.hh>
 # include <mln/accu/histo.hh>
@@ -46,9 +45,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic min function based on histogram over a value
-     * set with type \c V.
-     */
+    /// Generic min function based on histogram over a value
+    /// set with type \c V.
     template <typename V>
     struct min_h : public mln::accu::internal::base< const V& , min_h<V> >
     {
@@ -102,9 +100,7 @@ namespace mln
     namespace meta
     {
 
-      /*!
-       * \brief Meta accumulator for min.
-       */
+      /// Meta accumulator for min.
       struct min_h : public Meta_Accumulator< min_h >
       {
 	template <typename T>
diff --git a/milena/mln/accu/min_max.hh b/milena/mln/accu/min_max.hh
index 11b1a33..6f90560 100644
--- a/milena/mln/accu/min_max.hh
+++ b/milena/mln/accu/min_max.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,12 +28,11 @@
 #ifndef MLN_ACCU_MIN_MAX_HH
 # define MLN_ACCU_MIN_MAX_HH
 
-/*! \file mln/accu/min_max.hh
- *
- * \brief Define an accumulator that computes a min and a max.
- *
- * \todo A macro to create such accumulators.
- */
+/// \file mln/accu/min_max.hh
+///
+/// Define an accumulator that computes a min and a max.
+///
+/// \todo A macro to create such accumulators.
 
 # include <utility>
 
@@ -50,8 +49,8 @@ namespace mln
   namespace accu
   {
 
-    /*! \brief Generic min and max accumulator class.
-     *
+    /// Generic min and max accumulator class.
+    /*!
      * The parameter \c V is the type of values.
      */
     template <typename V>
diff --git a/milena/mln/accu/nil.hh b/milena/mln/accu/nil.hh
index 0887715..e085deb 100644
--- a/milena/mln/accu/nil.hh
+++ b/milena/mln/accu/nil.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,12 +29,11 @@
 #ifndef MLN_ACCU_NIL_HH
 # define MLN_ACCU_NIL_HH
 
-/*! \file mln/accu/nil.hh
- *
- * \brief Define an accumulator that does nothing.
- *
- * \todo A macro to generate the meta version.
- */
+/// \file mln/accu/nil.hh
+///
+/// Define an accumulator that does nothing.
+///
+/// \todo A macro to generate the meta version.
 
 # include <mln/core/concept/meta_accumulator.hh>
 # include <mln/accu/internal/base.hh>
@@ -47,9 +47,7 @@ namespace mln
   namespace accu
   {
 
-    /*!
-     * \brief Define an accumulator that does nothing.
-     */
+    /// Define an accumulator that does nothing.
     template <typename T>
     struct nil : public mln::accu::internal::base< util::ignore , nil<T> >
     {
diff --git a/milena/mln/accu/p.hh b/milena/mln/accu/p.hh
index bcb36c2..dc3f41f 100644
--- a/milena/mln/accu/p.hh
+++ b/milena/mln/accu/p.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ACCU_P_HH
 # define MLN_ACCU_P_HH
 
-/*! \file mln/accu/p.hh
- *
- * \brief Define an accumulator that computes a min and a max.
- */
+/// \file mln/accu/p.hh
+///
+/// Define an accumulator that computes a min and a max.
 
 # include <mln/core/concept/meta_accumulator.hh>
 
@@ -46,11 +46,9 @@ namespace mln
   {
 
 
-    /*!
-     * \brief Generic p of accumulators.
-     *
-     * The parameter \c V is the type of values.
-     */
+    ///Generic p of accumulators.
+    ///
+    /// The parameter \c V is the type of values.
     template <typename A>
     struct p : public mln::accu::internal::base< const mln_result(A)& , p<A> >
     {
diff --git a/milena/mln/accu/pair.hh b/milena/mln/accu/pair.hh
index b431742..a1bdbd7 100644
--- a/milena/mln/accu/pair.hh
+++ b/milena/mln/accu/pair.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ACCU_PAIR_HH
 # define MLN_ACCU_PAIR_HH
 
-/*! \file mln/accu/pair.hh
- *
- * \brief Define a pair of accumulators.
- */
+/// \file mln/accu/pair.hh
+///
+/// Define a pair of accumulators.
 
 # include <utility>
 
@@ -49,12 +49,11 @@ namespace mln
   {
 
 
-    /*! \brief Generic pair 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.
-     */
+    /// Generic pair 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 T = mln_argument(A1)>
     struct pair : public mln::accu::internal::base< std::pair<mln_result(A1), mln_result(A2)>,
 						    pair<A1,A2,T> >
@@ -65,7 +64,8 @@ namespace mln
       typedef mln_result(A2) result_2;
 
       pair();
-      pair(const A1& a1, const A2& a2);
+// FIXME: not implemented. Do we want it?
+//      pair(const A1& a1, const A2& a2);
 
       /// Manipulators.
       /// \{
diff --git a/milena/mln/accu/rank.hh b/milena/mln/accu/rank.hh
index 7d7ce17..bdd4df0 100644
--- a/milena/mln/accu/rank.hh
+++ b/milena/mln/accu/rank.hh
@@ -50,8 +50,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic rank accumulator class.
-     *
+    /// Generic rank accumulator class.
+    /*!
      * The parameter \c T is the type of values.
      */
     template <typename T>
@@ -82,7 +82,7 @@ namespace mln
       /// Give the rank.
       unsigned k() const;
 
-      /// Give the total number of elements. 
+      /// Give the total number of elements.
       unsigned n() const;
 
     protected:
@@ -116,12 +116,16 @@ namespace mln
 
       struct rank : public Meta_Accumulator< rank >
       {
+	rank(unsigned k_, unsigned n_) : k(k_), n(n_) {}
+
 	template <typename T>
 	struct with
 	{
 	  typedef accu::rank<T> ret;
 	};
-	unsigned k, n;
+
+	unsigned k;
+	unsigned n;
       };
 
     } // end of namespace mln::accu::meta
diff --git a/milena/mln/accu/rank_bool.hh b/milena/mln/accu/rank_bool.hh
index 6fec53a..f5e9b07 100644
--- a/milena/mln/accu/rank_bool.hh
+++ b/milena/mln/accu/rank_bool.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,15 +29,14 @@
 #ifndef MLN_ACCU_RANK_BOOL_HH
 # define MLN_ACCU_RANK_BOOL_HH
 
-/*! \file mln/accu/rank_bool.hh
- *
- * \brief Define an rank accumulator.
- *
- * \todo There is no-arg-ctor so this accumulator does not support
- * deferred initialization!
- *
- * \todo Add untake routines...
- */
+/// \file mln/accu/rank_bool.hh
+///
+/// Define an rank accumulator.
+///
+/// \todo There is no-arg-ctor so this accumulator does not support
+/// deferred initialization!
+///
+/// \todo Add untake routines...
 
 # include <mln/accu/internal/base.hh>
 
@@ -50,9 +50,7 @@ namespace mln
     // Fwd declaration.
     template <typename T> struct rank;
 
-    /*! \brief rank accumulator class for Boolean.
-     *
-     */
+    /// rank accumulator class for Boolean.
     template <>
     struct rank<bool> : public mln::accu::internal::base< bool, rank<bool> >
     {
diff --git a/milena/mln/accu/rank_high_quant.hh b/milena/mln/accu/rank_high_quant.hh
index b4d69a1..0f002cd 100644
--- a/milena/mln/accu/rank_high_quant.hh
+++ b/milena/mln/accu/rank_high_quant.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ACCU_RANK_HH
 # define MLN_ACCU_RANK_HH
 
-/*! \file mln/accu/rank.hh
- *
- * \brief Define an rank accumulator.
- */
+/// \file mln/accu/rank.hh
+///
+/// Define an rank accumulator.
 
 # include <vector>
 # include <mln/accu/internal/base.hh>
@@ -47,8 +47,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic rank accumulator class.
-     *
+    /// Generic rank accumulator class.
+    /*!
      * The parameter \c T is the type of values.
      */
     template <typename T>
@@ -93,16 +93,29 @@ namespace mln
 
       struct rank : public Meta_Accumulator< rank >
       {
+	rank(unsigned k_, unsigned n_) : k(k_), n(n_) {}
+
 	template <typename T>
 	  struct with
 	  {
 	    typedef accu::rank<T> ret;
 	  };
+
+	unsigned k;
+	unsigned n;
       };
 
     }
 
 
+    template <typename T>
+    rank<T> unmeta(const meta::rank& m, T)
+    {
+      rank<T> a(m.k, m.n);
+      return a;
+    }
+
+
 # ifndef MLN_INCLUDE_ONLY
 
     template <typename T>
diff --git a/milena/mln/accu/snake_2d.hh b/milena/mln/accu/snake_2d.hh
index 27e4d5f..c055a90 100644
--- a/milena/mln/accu/snake_2d.hh
+++ b/milena/mln/accu/snake_2d.hh
@@ -75,7 +75,7 @@ namespace mln
 	mln_precondition(input.has_data());
 	mln_precondition(! win.is_empty());
 	// mln_precondition(! win.is_valid());
-	
+
 	(void) input;
 	(void) win;
       }
diff --git a/milena/mln/accu/sum.hh b/milena/mln/accu/sum.hh
index fcfc3ba..d330590 100644
--- a/milena/mln/accu/sum.hh
+++ b/milena/mln/accu/sum.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ACCU_SUM_HH
 # define MLN_ACCU_SUM_HH
 
-/*! \file mln/accu/sum.hh
- *
- * \brief Define an accumulator that computes a sum.
- */
+/// \file mln/accu/sum.hh
+///
+/// Define an accumulator that computes a sum.
 
 # include <mln/core/concept/meta_accumulator.hh>
 # include <mln/accu/internal/base.hh>
@@ -50,8 +50,8 @@ namespace mln
   {
 
 
-    /*! \brief Generic sum accumulator class.
-     *
+    /// Generic sum accumulator class.
+    /*!
      * Parameter \c T is the type of values that we sum.  Parameter \c
      * S is the type to store the value sum; the default type of
      * \c S is the summation type (property) of \c T.
diff --git a/milena/mln/accu/take.hh b/milena/mln/accu/take.hh
index deadcaf..5b7f3e8 100644
--- a/milena/mln/accu/take.hh
+++ b/milena/mln/accu/take.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 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
@@ -28,10 +29,9 @@
 #ifndef MLN_ACCU_TAKE_HH
 # define MLN_ACCU_TAKE_HH
 
-/*! \file mln/accu/take.hh
- *
- * \brief Define an accumulator that takes image pixels.
- */
+/// \file mln/accu/take.hh
+///
+/// Define an accumulator that takes image pixels.
 
 # include <mln/core/concept/accumulator.hh>
 # include <mln/core/concept/image.hh>
@@ -44,8 +44,8 @@ namespace mln
   namespace accu
   {
 
-    /*! \brief Make an accumulator take the pixels of the image \p input.
-     *
+    /// Make an accumulator take the pixels of the image \p input.
+    /*!
      * \param[in] input The input image.
      * \param[in,out] a The accumulator.
      *
diff --git a/milena/mln/accu/transform.hh b/milena/mln/accu/transform.hh
index 275ac21..3829432 100644
--- a/milena/mln/accu/transform.hh
+++ b/milena/mln/accu/transform.hh
@@ -49,13 +49,13 @@ namespace mln
 
     template <typename I, typename A, typename W>
     mln_ch_value(I, mln_result(A))
-    transform(const Image<I>& input, 
+    transform(const Image<I>& input,
 	      const Accumulator<A>& a,
 	      const Window<W>& win);
 
     template <typename I, typename A, typename W>
     mln_ch_value(I, mln_accu_with(A, mln_value(I))::result)
-    transform(const Image<I>& input, 
+    transform(const Image<I>& input,
 	      const Meta_Accumulator<A>& a,
 	      const Window<W>& win);
 
@@ -69,7 +69,7 @@ namespace mln
 
       namespace generic
       {
-	
+
 	template <typename I, typename A, typename W>
 	mln_ch_value(I, mln_result(A))
 	transform(const Image<I>& input_,
@@ -86,7 +86,7 @@ namespace mln
 	  // mln_precondition(win.is_valid());
 
 	  extension::adjust(input, win);
-	  
+
 	  mln_ch_value(I, mln_result(A)) output;
 	  initialize(output, input);
 
@@ -105,7 +105,7 @@ namespace mln
 	}
 
       } // end of namespace mln::accu::impl::generic
-      
+
     } // end of namespace mln::accu::impl
 
 
diff --git a/milena/mln/accu/tuple.hh b/milena/mln/accu/tuple.hh
index f70882b..3ad7be2 100644
--- a/milena/mln/accu/tuple.hh
+++ b/milena/mln/accu/tuple.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2008 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
@@ -28,10 +29,10 @@
 #ifndef MLN_ACCU_TUPLE_HH
 # define MLN_ACCU_TUPLE_HH
 
-/*! \file mln/accu/tuple.hh
- *
- * \brief Define a tuple of accumulators.
- */
+/// \file mln/accu/tuple.hh
+///
+/// Define a tuple of accumulators.
+
 
 # include <utility>
 
@@ -65,10 +66,9 @@ namespace mln
       template <unsigned n, typename T> struct tuplehelper;
     }
 
-    /*! \brief Generic tuple of accumulators.
-     *
+    /// Generic tuple of accumulators.
+    /*!
      * The parameter \c T is the type of values.
-     *
      */
     template <typename A, unsigned n, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(10, typename T, boost::tuples::null_type)>
     struct tuple
diff --git a/milena/mln/accu/v.hh b/milena/mln/accu/v.hh
index a7f4cdf..bb522b7 100644
--- a/milena/mln/accu/v.hh
+++ b/milena/mln/accu/v.hh
@@ -1,4 +1,5 @@
 // Copyright (C) 2007, 2008 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
@@ -28,10 +29,10 @@
 #ifndef MLN_ACCU_V_HH
 # define MLN_ACCU_V_HH
 
-/*! \file mln/accu/v.hh
- *
- * \brief Define an accumulator that computes a min and a max.
- */
+/// \file mln/accu/v.hh
+///
+/// Define an accumulator that computes a min and a max.
+
 
 # include <mln/core/concept/meta_accumulator.hh>
 # include <mln/accu/internal/base.hh>
@@ -89,11 +90,11 @@ namespace mln
       struct val : public Meta_Accumulator< val<mA> >
       {
 	template <typename V>
-	  struct with
-	  {
-	    typedef mln_accu_with(mA, mln_value(V)) A;
-	    typedef val<A> ret;
-	  };
+	struct with
+	{
+	  typedef mln_accu_with(mA, mln_value(V)) A;
+	  typedef val<A> ret;
+	};
       };
 
     }
diff --git a/milena/mln/accu/volume.hh b/milena/mln/accu/volume.hh
index 705434b..9ace873 100644
--- a/milena/mln/accu/volume.hh
+++ b/milena/mln/accu/volume.hh
@@ -28,17 +28,18 @@
 #ifndef MLN_ACCU_VOLUME_HH
 # define MLN_ACCU_VOLUME_HH
 
-/** \file mln/accu/volume.hh
-    \brief Define an accumulator that computes the volume of a
-    component through one of its pixels.
-
+/// \file mln/accu/volume.hh
+/// Define an accumulator that computes the volume of a
+/// component through one of its pixels.
+/*!
     This accumulator uses an mln::util::pix (pixel) to update the
     reference level, area and volume information of the component.
 
     The class mln/accu/volume is not a general-purpose accumulator;
     it is used to implement volume-based connected filters.
     \see mln::morpho::closing_volume
-    \see mln::morpho::opening_volume  */
+    \see mln::morpho::opening_volume
+*/
 
 # include <mln/accu/internal/base.hh>
 # include <mln/core/concept/meta_accumulator.hh>
@@ -53,7 +54,7 @@ namespace mln
   namespace accu
   {
 
-    /// \brief Volume accumulator class.
+    /// Volume accumulator class.
     ///
     /// The parameter \p I is the image type on which the accumulator
     /// of pixels is built.
@@ -61,7 +62,7 @@ namespace mln
     struct volume
       : public mln::accu::internal::base< unsigned , volume<I> >
     {
-      /// \brief The accumulated data type.
+      /// The accumulated data type.
       ///
       /// The volume of component is represented by the volume of its
       /// root pixel.  See mln::morpho::closing_volume and
diff --git a/milena/mln/algebra/quat.hh b/milena/mln/algebra/quat.hh
index 4e44e90..f786ac1 100644
--- a/milena/mln/algebra/quat.hh
+++ b/milena/mln/algebra/quat.hh
@@ -448,6 +448,7 @@ namespace mln
     quat::quat(unsigned one, float theta, const algebra::vec<3,float>& uv)
     {
       mln_precondition(one == 1);
+      (void) one;
       set_unit(theta, uv);
     }
 
diff --git a/milena/mln/geom/essential.hh b/milena/mln/geom/essential.hh
index 41d1fd9..cd9297a 100644
--- a/milena/mln/geom/essential.hh
+++ b/milena/mln/geom/essential.hh
@@ -54,4 +54,14 @@ namespace mln
 # include <mln/geom/size3d.hh>
 # include <mln/geom/nsites.hh>
 
+# include <mln/geom/max_col.hh>
+# include <mln/geom/max_ind.hh>
+# include <mln/geom/max_row.hh>
+# include <mln/geom/max_sli.hh>
+
+# include <mln/geom/min_col.hh>
+# include <mln/geom/min_ind.hh>
+# include <mln/geom/min_row.hh>
+# include <mln/geom/min_sli.hh>
+
 #endif // ! MLN_GEOM_ESSENTIAL_HH
diff --git a/milena/mln/morpho/elementary/like_ero_fun.hh b/milena/mln/morpho/elementary/like_ero_fun.hh
index 39399d8..772259f 100644
--- a/milena/mln/morpho/elementary/like_ero_fun.hh
+++ b/milena/mln/morpho/elementary/like_ero_fun.hh
@@ -61,7 +61,7 @@ namespace mln
 	struct f_accu
 	{
 	  template <typename V, typename A>
-	  V operator()(const V& input_p, const A& a) const
+	  V operator()(const V& /*input_p*/, const A& a) const
 	  {
 	    return a.to_result();
 	  }
diff --git a/milena/mln/value/essential.hh b/milena/mln/value/essential.hh
index 7ba742a..e537eff 100644
--- a/milena/mln/value/essential.hh
+++ b/milena/mln/value/essential.hh
@@ -39,8 +39,8 @@
 # include <mln/value/float01_8.hh>
 # include <mln/value/float01_16.hh>
 
-# include <mln/value/gl8.hh>
-# include <mln/value/gl16.hh>
+//# include <mln/value/gl8.hh>
+//# include <mln/value/gl16.hh>
 
 # include <mln/value/int_s8.hh>
 # include <mln/value/int_s16.hh>
diff --git a/milena/tests/accu/rank.cc b/milena/tests/accu/rank.cc
index 2f4061c..9c334a9 100644
--- a/milena/tests/accu/rank.cc
+++ b/milena/tests/accu/rank.cc
@@ -55,9 +55,7 @@ int main()
   using value::int_u8;
 
   {
-    accu::meta::rank r;
-    r.k = 4;
-    r.n = 9;
+    accu::meta::rank r(4, 9);
     accu::rank<int_u8> a = accu::unmeta(r, int_u8());
     mln_assertion(a.k() == 4 && a.n() == 9);
 //     Meta_Accumulator<accu::meta::rank>& R = r;
-- 
1.5.6.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        	* configure.ac: Add tutorial/samples Makefiles.
---
 ChangeLog    |    6 ++++++
 configure.ac |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 36248ed..fabc2f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-06  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
+	Update configure.ac for the tutorial.
+
+	* configure.ac: Add tutorial/samples Makefiles.
+
 2008-11-10  Matthieu Garrigues  <garrigues(a)lrde.epita.fr>
 
 	Put Licence to 70 cols.
diff --git a/configure.ac b/configure.ac
index 0e00ce4..0a407d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,6 +144,8 @@ AC_CONFIG_FILES([
     external/Makefile
     milena/Makefile
       milena/doc/Makefile
+      milena/doc/tutorial/Makefile
+      milena/doc/tutorial/samples/Makefile
       milena/tools/Makefile
 ])
 
-- 
1.5.6.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0
                            
                          
                          
                            
    
                          
                        
                    
                    
                        	* doc/Doxyfile.in: Add new example/include paths.
	* doc/tutorial/Makefile.am,
	* doc/Makefile.am: Add a new target for the tutorial.
	Rename target "internal" to "complete.
	* doc/tutorial/todoxygen.sh: script to convert .tex files to .html
	files. It uses Hevea.
	* doc/tutorial/samples/borderthickness.cc,
	* doc/tutorial/samples/extension-ignore2.cc,
	* doc/tutorial/samples/ima-size.cc,
	* doc/tutorial/samples/ima2d-1.cc,
	* doc/tutorial/samples/ima2d-decl-2-blobs-full.cc,
	* doc/tutorial/samples/ima2d-rot.cc,
	* doc/tutorial/samples/labeling-compute-full.cc,
	* doc/tutorial/samples/logical-not.cc,
	* doc/tutorial/samples/paste-call-1.cc,
	* doc/tutorial/samples/plop.ppm,
	* doc/tutorial/samples/win-create-3.cc: Fix sample code.
	* doc/tutorial/samples/Makefile.am: add new target for sample
	programs.
	* doc/tutorial/tutorial.tex: Include images.
	* mln/core/internal/complex_window_p_base.hh,
	* mln/core/routine/extend.hh,
	* mln/core/site_set/p_complex.hh,
	* mln/debug/graph.hh,
	* mln/debug/println_with_border.hh,
	* mln/fun/x2v/bilinear.hh,
	* mln/fun/x2v/linear.hh,
	* mln/fun/x2v/nneighbor.hh,
	* mln/geom/nsites.hh,
	* mln/topo/n_face.hh,
	* mln/util/internal/graph_nbh_iter.hh,
	* tests/core/site_set/p_complex.cc,
	* tests/morpho/complex_image_wst.cc: Fix doxygen warnings.
	* doc/doc.mk: Add shared variables for doc generation.
	* doc/tutorial/samples/borderthickness-output.tex,
	* doc/tutorial/samples/dpoint-1-output.tex,
	* doc/tutorial/samples/graph-output-1.tex,
	* doc/tutorial/samples/ima-size-output.tex,
	* doc/tutorial/samples/ima2d-1-output.tex,
	* doc/tutorial/samples/ima2d-3-output.tex,
	* doc/tutorial/samples/ima2d-decl-2-blobs-output.tex,
	* doc/tutorial/samples/ima2d-display-output-1.tex,
	* doc/tutorial/samples/ima2d-display-output-2.tex,
	* doc/tutorial/samples/labeling-compute-result-output.tex,
	* doc/tutorial/samples/logical-not-output.tex,
	* doc/tutorial/samples/paste-call-1-output.tex,
	* doc/tutorial/samples/point-1-output.tex: removed since they will be
	generated.
	* doc/tutorial/samples/accu-right-instanciation.tex,
	* doc/tutorial/samples/accu-right-instanciation.cc,
	* doc/tutorial/samples/accu-wrong-instanciation.tex,
	* doc/tutorial/samples/accu-wrong-instanciation.cc,
	* doc/tutorial/samples/borderthickness.tex,
	* doc/tutorial/samples/borderthickness.cc,
	* doc/tutorial/samples/box2d-1.tex,
	* doc/tutorial/samples/box2d-1.cc,
	* doc/tutorial/samples/box2d-2.tex,
	* doc/tutorial/samples/box2d-2.cc,
	* doc/tutorial/samples/domain-display-1.tex,
	* doc/tutorial/samples/domain-display-1.cc,
	* doc/tutorial/samples/domain-display-out-1.tex,
	* doc/tutorial/samples/domain-display-out-1.cc,
	* doc/tutorial/samples/dpoint-1.tex,
	* doc/tutorial/samples/dpoint-1.cc,
	* doc/tutorial/samples/estim-sites.tex,
	* doc/tutorial/samples/estim-sites.cc,
	* doc/tutorial/samples/extension-ignore.tex,
	* doc/tutorial/samples/extension-ignore.cc,
	* doc/tutorial/samples/extension-ignore2.tex,
	* doc/tutorial/samples/extension-ignore2.cc,
	* doc/tutorial/samples/fill-call-1.tex,
	* doc/tutorial/samples/fill-call-1.cc,
	* doc/tutorial/samples/fill-part-1.tex,
	* doc/tutorial/samples/fill-part-1.cc,
	* doc/tutorial/samples/fill-part-2.tex,
	* doc/tutorial/samples/fill-part-2.cc,
	* doc/tutorial/samples/fill-part-3.tex,
	* doc/tutorial/samples/fill-part-3.cc,
	* doc/tutorial/samples/fill.tex,
	* doc/tutorial/samples/fill.cc,
	* doc/tutorial/samples/forall-piter-1.tex,
	* doc/tutorial/samples/forall-piter-1.cc,
	* doc/tutorial/samples/fun-p2b-1.tex,
	* doc/tutorial/samples/fun-p2b-1.cc,
	* doc/tutorial/samples/fun-p2v-1.tex,
	* doc/tutorial/samples/fun-p2v-1.cc,
	* doc/tutorial/samples/graph-add-edges.tex,
	* doc/tutorial/samples/graph-add-edges.cc,
	* doc/tutorial/samples/graph-add-vertex.tex,
	* doc/tutorial/samples/graph-add-vertex.cc,
	* doc/tutorial/samples/graph-data.tex,
	* doc/tutorial/samples/graph-data.cc,
	* doc/tutorial/samples/graph-i2v-vertex.tex,
	* doc/tutorial/samples/graph-i2v-vertex.cc,
	* doc/tutorial/samples/graph-iter-edge-nbh-edge.tex,
	* doc/tutorial/samples/graph-iter-edge-nbh-edge.cc,
	* doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex,
	* doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc,
	* doc/tutorial/samples/graph-iter-vertex.tex,
	* doc/tutorial/samples/graph-iter-vertex.cc,
	* doc/tutorial/samples/graph-iter.tex,
	* doc/tutorial/samples/graph-iter.cc,
	* doc/tutorial/samples/graph-p-vertices.tex,
	* doc/tutorial/samples/graph-p-vertices.cc,
	* doc/tutorial/samples/ima-has.cc,
	* doc/tutorial/samples/ima-load.tex,
	* doc/tutorial/samples/ima-load.cc,
	* doc/tutorial/samples/ima-save.tex,
	* doc/tutorial/samples/ima-save.cc,
	* doc/tutorial/samples/ima-size.tex,
	* doc/tutorial/samples/ima-size.cc,
	* doc/tutorial/samples/ima2d-1.tex,
	* doc/tutorial/samples/ima2d-2.tex,
	* doc/tutorial/samples/ima2d-3.tex,
	* doc/tutorial/samples/ima2d-4.tex,
	* doc/tutorial/samples/ima2d-5.tex,
	* doc/tutorial/samples/ima2d-1.cc,
	* doc/tutorial/samples/ima2d-2.cc,
	* doc/tutorial/samples/ima2d-3.cc,
	* doc/tutorial/samples/ima2d-4.cc,
	* doc/tutorial/samples/ima2d-5.cc,
	* doc/tutorial/samples/ima2d-6-clone.tex,
	* doc/tutorial/samples/ima2d-6-clone.cc,
	* doc/tutorial/samples/ima2d-7.tex,
	* doc/tutorial/samples/ima2d-7.cc,
	* doc/tutorial/samples/ima2d-decl-1.tex,
	* doc/tutorial/samples/ima2d-decl-1.cc,
	* doc/tutorial/samples/ima2d-decl-2-blobs.tex,
	* doc/tutorial/samples/ima2d-decl-2-blobs.cc,
	* doc/tutorial/samples/ima2d-decl-2.tex,
	* doc/tutorial/samples/ima2d-decl-2.cc,
	* doc/tutorial/samples/ima2d-display-1.tex,
	* doc/tutorial/samples/ima2d-display-1.cc,
	* doc/tutorial/samples/ima2d-display-2.tex,
	* doc/tutorial/samples/ima2d-display-2.cc,
	* doc/tutorial/samples/ima2d-restricted-1.tex,
	* doc/tutorial/samples/ima2d-restricted-2.tex,
	* doc/tutorial/samples/ima2d-restricted-3.tex,
	* doc/tutorial/samples/ima2d-restricted-1.cc,
	* doc/tutorial/samples/ima2d-restricted-2.cc,
	* doc/tutorial/samples/ima2d-restricted-3.cc,
	* doc/tutorial/samples/ima2d-restricted-display-1.tex,
	* doc/tutorial/samples/ima2d-restricted-display-1.cc,
	* doc/tutorial/samples/ima2d-rot.cc,
	* doc/tutorial/samples/labeling-compute-call.tex,
	* doc/tutorial/samples/labeling-compute-call.cc,
	* doc/tutorial/samples/labeling-compute-result.tex,
	* doc/tutorial/samples/labeling-compute-result.cc,
	* doc/tutorial/samples/logical-not.tex,
	* doc/tutorial/samples/logical-not.cc,
	* doc/tutorial/samples/mln_var-1.tex,
	* doc/tutorial/samples/mln_var-1.cc,
	* doc/tutorial/samples/mln_var-2.tex,
	* doc/tutorial/samples/mln_var-2.cc,
	* doc/tutorial/samples/mln_var-3.tex,
	* doc/tutorial/samples/mln_var-3.cc,
	* doc/tutorial/samples/parray-append.tex,
	* doc/tutorial/samples/parray-append.cc,
	* doc/tutorial/samples/parray-display-1.tex,
	* doc/tutorial/samples/parray-display-1.cc,
	* doc/tutorial/samples/paste-call-1.tex,
	* doc/tutorial/samples/paste-call-1.cc,
	* doc/tutorial/samples/paste.tex,
	* doc/tutorial/samples/paste.cc,
	* doc/tutorial/samples/point-1.tex,
	* doc/tutorial/samples/point-1.cc,
	* doc/tutorial/samples/predicate-1.tex,
	* doc/tutorial/samples/predicate-1.cc,
	* doc/tutorial/samples/win-create-1-display.tex,
	* doc/tutorial/samples/win-create-1-display.cc,
	* doc/tutorial/samples/win-create-1.tex,
	* doc/tutorial/samples/win-create-1.cc,
	* doc/tutorial/samples/win-create-2.tex,
	* doc/tutorial/samples/win-create-2.cc: rename *.tex to *.cc.
	* doc/tutorial/tutorial.tex: update.
plop
---
 milena/ChangeLog                                   |  190 +++++++++++++++++++
 milena/doc/Doxyfile.in                             |   22 ++-
 milena/doc/Makefile.am                             |   59 ++++---
 milena/doc/doc.mk                                  |    7 +
 milena/doc/tutorial/Makefile.am                    |   18 ++
 .../graph-output-1.txt}                            |    0 
 .../ima2d-3-output.txt}                            |    0 
 .../ima2d-display-output-1.txt}                    |    0 
 .../ima2d-display-output-2.txt}                    |    0 
 milena/doc/tutorial/samples/Makefile.am            |   41 ++++
 ...stanciation.tex => accu-right-instanciation.cc} |    0 
 ...stanciation.tex => accu-wrong-instanciation.cc} |    0 
 .../tutorial/samples/borderthickness-output.tex    |   13 --
 milena/doc/tutorial/samples/borderthickness.cc     |   18 ++
 milena/doc/tutorial/samples/borderthickness.tex    |   17 --
 .../tutorial/samples/{box2d-1.tex => box2d-1.cc}   |    0 
 .../tutorial/samples/{box2d-2.tex => box2d-2.cc}   |    0 
 .../{domain-display-1.tex => domain-display-1.cc}  |    0 
 ...n-display-out-1.tex => domain-display-out-1.cc} |    0 
 milena/doc/tutorial/samples/dpoint-1-output.tex    |    1 -
 .../tutorial/samples/{dpoint-1.tex => dpoint-1.cc} |    0 
 .../samples/{estim-sites.tex => estim-sites.cc}    |    0 
 .../{extension-ignore.tex => extension-ignore.cc}  |    0 
 milena/doc/tutorial/samples/extension-ignore2.tex  |    1 -
 .../samples/{fill-call-1.tex => fill-call-1.cc}    |    0 
 .../samples/{fill-part-1.tex => fill-part-1.cc}    |    0 
 .../samples/{fill-part-2.tex => fill-part-2.cc}    |    0 
 .../samples/{fill-part-3.tex => fill-part-3.cc}    |    0 
 milena/doc/tutorial/samples/{fill.tex => fill.cc}  |    0 
 .../{forall-piter-1.tex => forall-piter-1.cc}      |    0 
 .../samples/{fun-p2b-1.tex => fun-p2b-1.cc}        |    0 
 .../samples/{fun-p2v-1.tex => fun-p2v-1.cc}        |    0 
 .../{graph-add-edges.tex => graph-add-edges.cc}    |    0 
 .../{graph-add-vertex.tex => graph-add-vertex.cc}  |    0 
 .../samples/{graph-data.tex => graph-data.cc}      |    0 
 .../{graph-i2v-vertex.tex => graph-i2v-vertex.cc}  |    0 
 ...ge-nbh-edge.tex => graph-iter-edge-nbh-edge.cc} |    0 
 ...-vertex.tex => graph-iter-vertex-nbh-vertex.cc} |    0 
 ...{graph-iter-vertex.tex => graph-iter-vertex.cc} |    0 
 .../samples/{graph-iter.tex => graph-iter.cc}      |    0 
 .../{graph-p-vertices.tex => graph-p-vertices.cc}  |    0 
 milena/doc/tutorial/samples/ima-has.cc             |   38 ++++
 .../tutorial/samples/{ima-load.tex => ima-load.cc} |    0 
 .../tutorial/samples/{ima-save.tex => ima-save.cc} |    0 
 milena/doc/tutorial/samples/ima-size-output.tex    |    1 -
 .../tutorial/samples/{ima-size.tex => ima-size.cc} |    7 +-
 milena/doc/tutorial/samples/ima2d-1-output.tex     |    2 -
 milena/doc/tutorial/samples/ima2d-1.cc             |   13 ++
 milena/doc/tutorial/samples/ima2d-1.tex            |   12 --
 .../tutorial/samples/{ima2d-2.tex => ima2d-2.cc}   |    0 
 .../tutorial/samples/{ima2d-3.tex => ima2d-3.cc}   |    0 
 .../tutorial/samples/{ima2d-4.tex => ima2d-4.cc}   |    0 
 .../tutorial/samples/{ima2d-5.tex => ima2d-5.cc}   |    0 
 .../{ima2d-6-clone.tex => ima2d-6-clone.cc}        |    0 
 .../tutorial/samples/{ima2d-7.tex => ima2d-7.cc}   |    0 
 .../samples/{ima2d-decl-1.tex => ima2d-decl-1.cc}  |    0 
 .../tutorial/samples/ima2d-decl-2-blobs-full.cc    |   21 ++
 .../tutorial/samples/ima2d-decl-2-blobs-output.tex |    7 -
 ...ma2d-decl-2-blobs.tex => ima2d-decl-2-blobs.cc} |    0 
 .../samples/{ima2d-decl-2.tex => ima2d-decl-2.cc}  |    0 
 .../{ima2d-display-1.tex => ima2d-display-1.cc}    |    0 
 .../{ima2d-display-2.tex => ima2d-display-2.cc}    |    0 
 ...ma2d-restricted-1.tex => ima2d-restricted-1.cc} |    0 
 ...ma2d-restricted-2.tex => ima2d-restricted-2.cc} |    0 
 ...ma2d-restricted-3.tex => ima2d-restricted-3.cc} |    0 
 ...display-1.tex => ima2d-restricted-display-1.cc} |    0 
 milena/doc/tutorial/samples/ima2d-rot.cc           |   42 +++++
 ...g-compute-call.tex => labeling-compute-call.cc} |    0 
 .../doc/tutorial/samples/labeling-compute-full.cc  |   27 +++
 .../samples/labeling-compute-result-output.tex     |    3 -
 ...mpute-result.tex => labeling-compute-result.cc} |    0 
 milena/doc/tutorial/samples/logical-not-output.tex |   17 --
 .../samples/{logical-not.tex => logical-not.cc}    |    6 +-
 .../samples/{mln_var-1.tex => mln_var-1.cc}        |    0 
 .../samples/{mln_var-2.tex => mln_var-2.cc}        |    0 
 .../samples/{mln_var-3.tex => mln_var-3.cc}        |    0 
 milena/doc/tutorial/samples/out.ppm                |  Bin 0 -> 145320 bytes
 .../{parray-append.tex => parray-append.cc}        |    0 
 .../{parray-display-1.tex => parray-display-1.cc}  |    0 
 .../doc/tutorial/samples/paste-call-1-output.tex   |    3 -
 .../samples/{paste-call-1.tex => paste-call-1.cc}  |    6 +-
 .../doc/tutorial/samples/{paste.tex => paste.cc}   |    0 
 milena/doc/tutorial/samples/point-1-output.tex     |    2 -
 .../tutorial/samples/{point-1.tex => point-1.cc}   |    0 
 .../samples/{predicate-1.tex => predicate-1.cc}    |    0 
 ...reate-1-display.tex => win-create-1-display.cc} |    0 
 .../samples/{win-create-1.tex => win-create-1.cc}  |    0 
 .../samples/{win-create-2.tex => win-create-2.cc}  |    0 
 milena/doc/tutorial/samples/win-create-3.cc        |    7 +
 milena/doc/tutorial/todoxygen.sh                   |   35 ++++
 milena/doc/tutorial/tutorial.tex                   |  192 ++++++++++++++++----
 milena/mln/core/internal/complex_window_p_base.hh  |    2 +-
 milena/mln/core/routine/extend.hh                  |    2 +-
 milena/mln/core/site_set/p_complex.hh              |    2 +-
 milena/mln/debug/graph.hh                          |    2 +-
 milena/mln/debug/println_with_border.hh            |    2 +-
 milena/mln/fun/x2v/bilinear.hh                     |    2 +-
 milena/mln/fun/x2v/linear.hh                       |    2 +-
 milena/mln/fun/x2v/nneighbor.hh                    |    2 +-
 milena/mln/geom/nsites.hh                          |   19 +-
 milena/mln/topo/n_face.hh                          |    2 +-
 milena/mln/util/internal/graph_nbh_iter.hh         |    2 +-
 milena/tests/core/site_set/p_complex.cc            |    2 +-
 milena/tests/morpho/complex_image_wst.cc           |    2 +-
 104 files changed, 686 insertions(+), 185 deletions(-)
 create mode 100644 milena/doc/doc.mk
 create mode 100644 milena/doc/tutorial/Makefile.am
 rename milena/doc/tutorial/{samples/graph-output-1.tex => outputs/graph-output-1.txt} (100%)
 rename milena/doc/tutorial/{samples/ima2d-3-output.tex => outputs/ima2d-3-output.txt} (100%)
 rename milena/doc/tutorial/{samples/ima2d-display-output-1.tex => outputs/ima2d-display-output-1.txt} (100%)
 rename milena/doc/tutorial/{samples/ima2d-display-output-2.tex => outputs/ima2d-display-output-2.txt} (100%)
 create mode 100644 milena/doc/tutorial/samples/Makefile.am
 rename milena/doc/tutorial/samples/{accu-right-instanciation.tex => accu-right-instanciation.cc} (100%)
 rename milena/doc/tutorial/samples/{accu-wrong-instanciation.tex => accu-wrong-instanciation.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/borderthickness-output.tex
 create mode 100644 milena/doc/tutorial/samples/borderthickness.cc
 delete mode 100644 milena/doc/tutorial/samples/borderthickness.tex
 rename milena/doc/tutorial/samples/{box2d-1.tex => box2d-1.cc} (100%)
 rename milena/doc/tutorial/samples/{box2d-2.tex => box2d-2.cc} (100%)
 rename milena/doc/tutorial/samples/{domain-display-1.tex => domain-display-1.cc} (100%)
 rename milena/doc/tutorial/samples/{domain-display-out-1.tex => domain-display-out-1.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/dpoint-1-output.tex
 rename milena/doc/tutorial/samples/{dpoint-1.tex => dpoint-1.cc} (100%)
 rename milena/doc/tutorial/samples/{estim-sites.tex => estim-sites.cc} (100%)
 rename milena/doc/tutorial/samples/{extension-ignore.tex => extension-ignore.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/extension-ignore2.tex
 rename milena/doc/tutorial/samples/{fill-call-1.tex => fill-call-1.cc} (100%)
 rename milena/doc/tutorial/samples/{fill-part-1.tex => fill-part-1.cc} (100%)
 rename milena/doc/tutorial/samples/{fill-part-2.tex => fill-part-2.cc} (100%)
 rename milena/doc/tutorial/samples/{fill-part-3.tex => fill-part-3.cc} (100%)
 rename milena/doc/tutorial/samples/{fill.tex => fill.cc} (100%)
 rename milena/doc/tutorial/samples/{forall-piter-1.tex => forall-piter-1.cc} (100%)
 rename milena/doc/tutorial/samples/{fun-p2b-1.tex => fun-p2b-1.cc} (100%)
 rename milena/doc/tutorial/samples/{fun-p2v-1.tex => fun-p2v-1.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-add-edges.tex => graph-add-edges.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-add-vertex.tex => graph-add-vertex.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-data.tex => graph-data.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-i2v-vertex.tex => graph-i2v-vertex.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-iter-edge-nbh-edge.tex => graph-iter-edge-nbh-edge.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-iter-vertex-nbh-vertex.tex => graph-iter-vertex-nbh-vertex.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-iter-vertex.tex => graph-iter-vertex.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-iter.tex => graph-iter.cc} (100%)
 rename milena/doc/tutorial/samples/{graph-p-vertices.tex => graph-p-vertices.cc} (100%)
 create mode 100644 milena/doc/tutorial/samples/ima-has.cc
 rename milena/doc/tutorial/samples/{ima-load.tex => ima-load.cc} (100%)
 rename milena/doc/tutorial/samples/{ima-save.tex => ima-save.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/ima-size-output.tex
 rename milena/doc/tutorial/samples/{ima-size.tex => ima-size.cc} (52%)
 delete mode 100644 milena/doc/tutorial/samples/ima2d-1-output.tex
 create mode 100644 milena/doc/tutorial/samples/ima2d-1.cc
 delete mode 100644 milena/doc/tutorial/samples/ima2d-1.tex
 rename milena/doc/tutorial/samples/{ima2d-2.tex => ima2d-2.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-3.tex => ima2d-3.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-4.tex => ima2d-4.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-5.tex => ima2d-5.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-6-clone.tex => ima2d-6-clone.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-7.tex => ima2d-7.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-decl-1.tex => ima2d-decl-1.cc} (100%)
 create mode 100644 milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
 delete mode 100644 milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
 rename milena/doc/tutorial/samples/{ima2d-decl-2-blobs.tex => ima2d-decl-2-blobs.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-decl-2.tex => ima2d-decl-2.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-display-1.tex => ima2d-display-1.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-display-2.tex => ima2d-display-2.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-restricted-1.tex => ima2d-restricted-1.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-restricted-2.tex => ima2d-restricted-2.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-restricted-3.tex => ima2d-restricted-3.cc} (100%)
 rename milena/doc/tutorial/samples/{ima2d-restricted-display-1.tex => ima2d-restricted-display-1.cc} (100%)
 create mode 100644 milena/doc/tutorial/samples/ima2d-rot.cc
 rename milena/doc/tutorial/samples/{labeling-compute-call.tex => labeling-compute-call.cc} (100%)
 create mode 100644 milena/doc/tutorial/samples/labeling-compute-full.cc
 delete mode 100644 milena/doc/tutorial/samples/labeling-compute-result-output.tex
 rename milena/doc/tutorial/samples/{labeling-compute-result.tex => labeling-compute-result.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/logical-not-output.tex
 rename milena/doc/tutorial/samples/{logical-not.tex => logical-not.cc} (77%)
 rename milena/doc/tutorial/samples/{mln_var-1.tex => mln_var-1.cc} (100%)
 rename milena/doc/tutorial/samples/{mln_var-2.tex => mln_var-2.cc} (100%)
 rename milena/doc/tutorial/samples/{mln_var-3.tex => mln_var-3.cc} (100%)
 create mode 100644 milena/doc/tutorial/samples/out.ppm
 rename milena/doc/tutorial/samples/{parray-append.tex => parray-append.cc} (100%)
 rename milena/doc/tutorial/samples/{parray-display-1.tex => parray-display-1.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/paste-call-1-output.tex
 rename milena/doc/tutorial/samples/{paste-call-1.tex => paste-call-1.cc} (67%)
 rename milena/doc/tutorial/samples/{paste.tex => paste.cc} (100%)
 delete mode 100644 milena/doc/tutorial/samples/point-1-output.tex
 rename milena/doc/tutorial/samples/{point-1.tex => point-1.cc} (100%)
 rename milena/doc/tutorial/samples/{predicate-1.tex => predicate-1.cc} (100%)
 rename milena/doc/tutorial/samples/{win-create-1-display.tex => win-create-1-display.cc} (100%)
 rename milena/doc/tutorial/samples/{win-create-1.tex => win-create-1.cc} (100%)
 rename milena/doc/tutorial/samples/{win-create-2.tex => win-create-2.cc} (100%)
 create mode 100644 milena/doc/tutorial/samples/win-create-3.cc
 create mode 100755 milena/doc/tutorial/todoxygen.sh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f58f2a6..7b16037 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,193 @@
+2008-11-12  Guillaume Lazzara  <z(a)lrde.epita.fr>
+
+	Update tutorial.
+
+	* doc/Doxyfile.in: Add new example/include paths.
+
+	* doc/tutorial/Makefile.am,
+	* doc/Makefile.am: Add a new target for the tutorial.
+	Rename target "internal" to "complete.
+
+	* doc/tutorial/todoxygen.sh: script to convert .tex files to .html
+    	files. It uses Hevea.
+
+	* doc/tutorial/samples/borderthickness.cc,
+	* doc/tutorial/samples/extension-ignore2.cc,
+	* doc/tutorial/samples/ima-size.cc,
+	* doc/tutorial/samples/ima2d-1.cc,
+	* doc/tutorial/samples/ima2d-decl-2-blobs-full.cc,
+	* doc/tutorial/samples/ima2d-rot.cc,
+	* doc/tutorial/samples/labeling-compute-full.cc,
+	* doc/tutorial/samples/logical-not.cc,
+	* doc/tutorial/samples/paste-call-1.cc,
+	* doc/tutorial/samples/plop.ppm,
+	* doc/tutorial/samples/win-create-3.cc: Fix sample code.
+
+	* doc/tutorial/samples/Makefile.am: add new target for sample
+	programs.
+
+	* doc/tutorial/tutorial.tex: Include images.
+
+	* mln/core/internal/complex_window_p_base.hh,
+	* mln/core/routine/extend.hh,
+	* mln/core/site_set/p_complex.hh,
+	* mln/debug/graph.hh,
+	* mln/debug/println_with_border.hh,
+	* mln/fun/x2v/bilinear.hh,
+	* mln/fun/x2v/linear.hh,
+	* mln/fun/x2v/nneighbor.hh,
+	* mln/geom/nsites.hh,
+	* mln/topo/n_face.hh,
+	* mln/util/internal/graph_nbh_iter.hh,
+	* tests/core/site_set/p_complex.cc,
+	* tests/morpho/complex_image_wst.cc: Fix doxygen warnings.
+
+	* doc/doc.mk: Add shared variables for doc generation.
+
+	* doc/tutorial/samples/borderthickness-output.tex,
+	* doc/tutorial/samples/dpoint-1-output.tex,
+	* doc/tutorial/samples/graph-output-1.tex,
+	* doc/tutorial/samples/ima-size-output.tex,
+	* doc/tutorial/samples/ima2d-1-output.tex,
+	* doc/tutorial/samples/ima2d-3-output.tex,
+	* doc/tutorial/samples/ima2d-decl-2-blobs-output.tex,
+	* doc/tutorial/samples/ima2d-display-output-1.tex,
+	* doc/tutorial/samples/ima2d-display-output-2.tex,
+	* doc/tutorial/samples/labeling-compute-result-output.tex,
+	* doc/tutorial/samples/logical-not-output.tex,
+	* doc/tutorial/samples/paste-call-1-output.tex,
+	* doc/tutorial/samples/point-1-output.tex: removed since they will be
+	generated.
+
+	* doc/tutorial/samples/accu-right-instanciation.tex,
+	* doc/tutorial/samples/accu-right-instanciation.cc,
+	* doc/tutorial/samples/accu-wrong-instanciation.tex,
+	* doc/tutorial/samples/accu-wrong-instanciation.cc,
+	* doc/tutorial/samples/borderthickness.tex,
+	* doc/tutorial/samples/borderthickness.cc,
+	* doc/tutorial/samples/box2d-1.tex,
+	* doc/tutorial/samples/box2d-1.cc,
+	* doc/tutorial/samples/box2d-2.tex,
+	* doc/tutorial/samples/box2d-2.cc,
+	* doc/tutorial/samples/domain-display-1.tex,
+	* doc/tutorial/samples/domain-display-1.cc,
+	* doc/tutorial/samples/domain-display-out-1.tex,
+	* doc/tutorial/samples/domain-display-out-1.cc,
+	* doc/tutorial/samples/dpoint-1.tex,
+	* doc/tutorial/samples/dpoint-1.cc,
+	* doc/tutorial/samples/estim-sites.tex,
+	* doc/tutorial/samples/estim-sites.cc,
+	* doc/tutorial/samples/extension-ignore.tex,
+	* doc/tutorial/samples/extension-ignore.cc,
+	* doc/tutorial/samples/extension-ignore2.tex,
+	* doc/tutorial/samples/extension-ignore2.cc,
+	* doc/tutorial/samples/fill-call-1.tex,
+	* doc/tutorial/samples/fill-call-1.cc,
+	* doc/tutorial/samples/fill-part-1.tex,
+	* doc/tutorial/samples/fill-part-1.cc,
+	* doc/tutorial/samples/fill-part-2.tex,
+	* doc/tutorial/samples/fill-part-2.cc,
+	* doc/tutorial/samples/fill-part-3.tex,
+	* doc/tutorial/samples/fill-part-3.cc,
+	* doc/tutorial/samples/fill.tex,
+	* doc/tutorial/samples/fill.cc,
+	* doc/tutorial/samples/forall-piter-1.tex,
+	* doc/tutorial/samples/forall-piter-1.cc,
+	* doc/tutorial/samples/fun-p2b-1.tex,
+	* doc/tutorial/samples/fun-p2b-1.cc,
+	* doc/tutorial/samples/fun-p2v-1.tex,
+	* doc/tutorial/samples/fun-p2v-1.cc,
+	* doc/tutorial/samples/graph-add-edges.tex,
+	* doc/tutorial/samples/graph-add-edges.cc,
+	* doc/tutorial/samples/graph-add-vertex.tex,
+	* doc/tutorial/samples/graph-add-vertex.cc,
+	* doc/tutorial/samples/graph-data.tex,
+	* doc/tutorial/samples/graph-data.cc,
+	* doc/tutorial/samples/graph-i2v-vertex.tex,
+	* doc/tutorial/samples/graph-i2v-vertex.cc,
+	* doc/tutorial/samples/graph-iter-edge-nbh-edge.tex,
+	* doc/tutorial/samples/graph-iter-edge-nbh-edge.cc,
+	* doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex,
+	* doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc,
+	* doc/tutorial/samples/graph-iter-vertex.tex,
+	* doc/tutorial/samples/graph-iter-vertex.cc,
+	* doc/tutorial/samples/graph-iter.tex,
+	* doc/tutorial/samples/graph-iter.cc,
+	* doc/tutorial/samples/graph-p-vertices.tex,
+	* doc/tutorial/samples/graph-p-vertices.cc,
+	* doc/tutorial/samples/ima-has.cc,
+	* doc/tutorial/samples/ima-load.tex,
+	* doc/tutorial/samples/ima-load.cc,
+	* doc/tutorial/samples/ima-save.tex,
+	* doc/tutorial/samples/ima-save.cc,
+	* doc/tutorial/samples/ima-size.tex,
+	* doc/tutorial/samples/ima-size.cc,
+	* doc/tutorial/samples/ima2d-1.tex,
+	* doc/tutorial/samples/ima2d-2.tex,
+	* doc/tutorial/samples/ima2d-3.tex,
+	* doc/tutorial/samples/ima2d-4.tex,
+	* doc/tutorial/samples/ima2d-5.tex,
+	* doc/tutorial/samples/ima2d-1.cc,
+	* doc/tutorial/samples/ima2d-2.cc,
+	* doc/tutorial/samples/ima2d-3.cc,
+	* doc/tutorial/samples/ima2d-4.cc,
+	* doc/tutorial/samples/ima2d-5.cc,
+	* doc/tutorial/samples/ima2d-6-clone.tex,
+	* doc/tutorial/samples/ima2d-6-clone.cc,
+	* doc/tutorial/samples/ima2d-7.tex,
+	* doc/tutorial/samples/ima2d-7.cc,
+	* doc/tutorial/samples/ima2d-decl-1.tex,
+	* doc/tutorial/samples/ima2d-decl-1.cc,
+	* doc/tutorial/samples/ima2d-decl-2-blobs.tex,
+	* doc/tutorial/samples/ima2d-decl-2-blobs.cc,
+	* doc/tutorial/samples/ima2d-decl-2.tex,
+	* doc/tutorial/samples/ima2d-decl-2.cc,
+	* doc/tutorial/samples/ima2d-display-1.tex,
+	* doc/tutorial/samples/ima2d-display-1.cc,
+	* doc/tutorial/samples/ima2d-display-2.tex,
+	* doc/tutorial/samples/ima2d-display-2.cc,
+	* doc/tutorial/samples/ima2d-restricted-1.tex,
+	* doc/tutorial/samples/ima2d-restricted-2.tex,
+	* doc/tutorial/samples/ima2d-restricted-3.tex,
+	* doc/tutorial/samples/ima2d-restricted-1.cc,
+	* doc/tutorial/samples/ima2d-restricted-2.cc,
+	* doc/tutorial/samples/ima2d-restricted-3.cc,
+	* doc/tutorial/samples/ima2d-restricted-display-1.tex,
+	* doc/tutorial/samples/ima2d-restricted-display-1.cc,
+	* doc/tutorial/samples/ima2d-rot.cc,
+	* doc/tutorial/samples/labeling-compute-call.tex,
+	* doc/tutorial/samples/labeling-compute-call.cc,
+	* doc/tutorial/samples/labeling-compute-result.tex,
+	* doc/tutorial/samples/labeling-compute-result.cc,
+	* doc/tutorial/samples/logical-not.tex,
+	* doc/tutorial/samples/logical-not.cc,
+	* doc/tutorial/samples/mln_var-1.tex,
+	* doc/tutorial/samples/mln_var-1.cc,
+	* doc/tutorial/samples/mln_var-2.tex,
+	* doc/tutorial/samples/mln_var-2.cc,
+	* doc/tutorial/samples/mln_var-3.tex,
+	* doc/tutorial/samples/mln_var-3.cc,
+	* doc/tutorial/samples/parray-append.tex,
+	* doc/tutorial/samples/parray-append.cc,
+	* doc/tutorial/samples/parray-display-1.tex,
+	* doc/tutorial/samples/parray-display-1.cc,
+	* doc/tutorial/samples/paste-call-1.tex,
+	* doc/tutorial/samples/paste-call-1.cc,
+	* doc/tutorial/samples/paste.tex,
+	* doc/tutorial/samples/paste.cc,
+	* doc/tutorial/samples/point-1.tex,
+	* doc/tutorial/samples/point-1.cc,
+	* doc/tutorial/samples/predicate-1.tex,
+	* doc/tutorial/samples/predicate-1.cc,
+	* doc/tutorial/samples/win-create-1-display.tex,
+	* doc/tutorial/samples/win-create-1-display.cc,
+	* doc/tutorial/samples/win-create-1.tex,
+	* doc/tutorial/samples/win-create-1.cc,
+	* doc/tutorial/samples/win-create-2.tex,
+	* doc/tutorial/samples/win-create-2.cc: rename *.tex to *.cc.
+
+	* doc/tutorial/tutorial.tex: update.
+
 2008-11-06  Guillaume Lazzara  <z(a)lrde.epita.fr>
 
 	Fix wrong includes and missing namespaces.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index b583d66..144d23a 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -5,7 +5,7 @@
 #---------------------------------------------------------------------------
 PROJECT_NAME           = "Milena (@PACKAGE_NAME@)"
 PROJECT_NUMBER         = "@PACKAGE_VERSION@ @ID@"
-OUTPUT_DIRECTORY       = ./internal/
+OUTPUT_DIRECTORY       = ./complete/
 CREATE_SUBDIRS         = YES
 OUTPUT_LANGUAGE        = English
 BRIEF_MEMBER_DESC      = YES
@@ -72,22 +72,26 @@ WARN_LOGFILE           =
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
-INPUT                  = @top_srcdir@/milena \
+INPUT                  = @top_srcdir@/milena	\
                          @top_builddir@/milena
-FILE_PATTERNS          = *.cc \
-                         *.hh \
-                         *.hxx \
+FILE_PATTERNS          = *.cc	\
+                         *.hh	\
+                         *.hxx	\
                          *.hcc
 RECURSIVE              = YES
-EXCLUDE                = @top_srcdir@/milena/sandbox \
-                         @top_srcdir@/milena/mln/core/concept/proxy.hxx
+EXCLUDE                = @top_srcdir@/milena/sandbox			\
+                         @top_srcdir@/milena/mln/core/concept/proxy.hxx \
+			 @top_srcdir@/milena/doc/tutorial/samples
 EXCLUDE_SYMLINKS       = YES
 EXCLUDE_PATTERNS       = *spe.hh
 EXCLUDE_SYMBOLS	       =
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           = @top_srcdir@/milena/doc/tutorial/samples   \
+			 @top_builddir@/milena/doc/tutorial/outputs \ 
+			 @top_srcdir@/milena/doc/tutorial/outputs 
 EXAMPLE_PATTERNS       = 
 EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = 
+IMAGE_PATH             = @top_srcdir@/milena/doc/tutorial/figures   \
+			 @top_builddir@/milena/doc/tutorial/figures
 INPUT_FILTER           = 
 FILTER_PATTERNS        = 
 FILTER_SOURCE_FILES    = NO
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index b49d7dc..039f5dc 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -1,23 +1,38 @@
 # FIXME: To be overhauled! (See ticket #134).
-# FIXME: Rename `internal' as `all' or `complete'.
 
-DOXYGEN = doxygen
+include $(top_srcdir)/milena/doc/doc.mk
+
+SUBDIRS = tutorial
 
-.PHONY: doc user-doc internal-doc html html_user
+DOXYGEN = doxygen
 
-doc: html
+.PHONY: doc user-doc complete-doc html_complete html_user
 
-internal-doc: html
+doc: complete-doc
 
-user-doc: html_user
+complete-doc: html_complete
 
+user-doc: html_user tutorial
 
-html-local: Doxyfile
-	$(DOXYGEN) Doxyfile_internal
+html_complete: tuto_html figures Doxyfile
+	$(DOXYGEN) Doxyfile_complete
 
-html_user: Doxyfile
+html_user: tuto_html figures Doxyfile
 	$(DOXYGEN) Doxyfile_user
 
+figures: all
+	@failcom='exit 1'; 							\
+	list='${wildcard $(FIGURES_DIR)/*.p*m}'; for img in $$list; do 		\
+	  echo "Converting $$img to png"; 					\
+	  convert $$img $(FIGURES_DIR)/`basename $$img .ppm`.png 		\
+	    || eval $$failcom; 							\
+	done; 
+
+tuto_html:
+	$(MAKE) -C tutorial tuto_html
+
+tuto: all
+	$(MAKE) -C tutorial tuto
 
 edit = sed -e "s|@ID@|$$Id|" 					\
 	   -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g' 		\
@@ -26,28 +41,28 @@ edit = sed -e "s|@ID@|$$Id|" 					\
 	   -e 's,@top_srcdir\@,$(top_srcdir),g'
 
 # FIXME: This is not good.  We should set these parameters for both
-# documentation (internal and user) using @VARIABLES@.  Don't generate
-# Doxyfile_user from Doxyfile_internal!  Both should be a product
+# documentation (complete and user) using @VARIABLES@.  Don't generate
+# Doxyfile_user from Doxyfile_complete!  Both should be a product
 # derived from a single source, Doxyfile.in.
-edit_user = sed -e 's,OUTPUT_DIRECTORY       = ./internal/,OUTPUT_DIRECTORY       = ./user/,g' 		\
+edit_user = sed -e 's,OUTPUT_DIRECTORY       = ./complete/,OUTPUT_DIRECTORY       = ./user/,g' 		\
 		-e 's,EXTRACT_ALL            = YES,EXTRACT_ALL            = NO,g'			\
 		-e 's,EXTRACT_PRIVATE        = YES,EXTRACT_PRIVATE        = NO,g'			\
 		-e 's,EXTRACT_STATIC         = YES,EXTRACT_STATIC         = NO,g'			\
 		-e 's,EXTRACT_LOCAL_CLASSES  = YES,EXTRACT_LOCAL_CLASSES  = NO,g'			\
-		-e 's,HIDE_UNDOC_MEMBERS     = NO,HIDE_UNDOC_MEMBERS     = YES,g'			\
-		-e 's,HIDE_UNDOC_CLASSES     = NO,HIDE_UNDOC_CLASSES     = YES,g'			\
-		-e 's,HIDE_FRIEND_COMPOUNDS  = NO,HIDE_FRIEND_COMPOUNDS  = YES,g'			\
-		-e 's,HIDE_IN_BODY_DOCS      = NO,HIDE_IN_BODY_DOCS      = YES,g'			\
+		-e 's,HIDE_UNDOC_MEMBERS     = NO,HIDE_UNDOC_MEMBERS      = YES,g'			\
+		-e 's,HIDE_UNDOC_CLASSES     = NO,HIDE_UNDOC_CLASSES      = YES,g'			\
+		-e 's,HIDE_FRIEND_COMPOUNDS  = NO,HIDE_FRIEND_COMPOUNDS   = YES,g'			\
+		-e 's,HIDE_IN_BODY_DOCS      = NO,HIDE_IN_BODY_DOCS       = YES,g'			\
 		-e 's,INTERNAL_DOCS          = YES,INTERNAL_DOCS          = NO,g'			\
 		-e 's,GENERATE_TODOLIST      = YES,GENERATE_TODOLIST      = NO,g'			\
-		-e 's,PROJECT_NUMBER         = \",PROJECT_NUMBER         = \"User documentation ,g'	\
-		-e 's,EXCLUDE_SYMBOLS	       =,EXCLUDE_SYMBOLS	       = *::internal*,g'
+		-e 's,PROJECT_NUMBER         = \",PROJECT_NUMBER          = \"User documentation ,g'	\
+		-e 's,EXCLUDE_SYMBOLS	     =,EXCLUDE_SYMBOLS	       	  = *::internal*,g'	
 
 
 
 EXTRA_DIST = Doxyfile.in
 
-CLEANFILES = Doxyfile_internal \
+CLEANFILES = Doxyfile_complete \
 	     Doxyfile_user
 
 # Sed is used to generate Doxyfile from Doxyfile.in instead of
@@ -56,9 +71,9 @@ CLEANFILES = Doxyfile_internal \
 # sed instead of configure saves us a lot of time.
 Doxyfile: $(top_srcdir)/milena/ChangeLog $(srcdir)/Doxyfile.in
 	   Id=`grep '^\$$Id' $(top_srcdir)/milena/ChangeLog`;	\
-	   $(edit) $(srcdir)/Doxyfile.in >Doxyfile_internal &&	\
-	   $(edit_user) Doxyfile_internal >Doxyfile_user
+	   $(edit) $(srcdir)/Doxyfile.in >Doxyfile_complete &&	\
+	   $(edit_user) Doxyfile_complete >Doxyfile_user
 
 clean-local:
-	rm -rf internal user
+	rm -rf complete user
 
diff --git a/milena/doc/doc.mk b/milena/doc/doc.mk
new file mode 100644
index 0000000..d911d86
--- /dev/null
+++ b/milena/doc/doc.mk
@@ -0,0 +1,7 @@
+## FIXME: Revamp (see Olena 0.11's test suite).		-*- Automake -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+OUTPUTS_DIR = $(top_builddir)/milena/doc/tutorial/outputs
+FIGURES_DIR = $(top_builddir)/milena/doc/tutorial/figures
+
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am
new file mode 100644
index 0000000..0b70c3e
--- /dev/null
+++ b/milena/doc/tutorial/Makefile.am
@@ -0,0 +1,18 @@
+SUBDIRS = samples
+
+.PHONY: tuto
+
+TUTO_DIR = "milena/doc/tutorial"
+TEXINPUTS = $(top_srcdir)/$(TUTO_DIR):$(top_builddir)/$(TUTO_DIR):
+
+tuto:
+	TEXINPUTS=$(TEXINPUTS) pdflatex $(top_srcdir)/$(TUTO_DIR)/tutorial.tex
+
+tuto_html:
+	chmod u+x $(top_srcdir)/$(TUTO_DIR)/todoxygen.sh
+	$(top_srcdir)/$(TUTO_DIR)/todoxygen.sh $(top_srcdir)/$(TUTO_DIR)/tutorial.tex $(top_builddir)/$(TUTO_DIR)
+
+clean-local:
+	rm -f *.aux *.toc *.log *.bbl *blg *.lot *.out *~
+	rm -f tutorial.pdf
+	rm *.haux *.hh *.html *.htoc
diff --git a/milena/doc/tutorial/samples/graph-output-1.tex b/milena/doc/tutorial/outputs/graph-output-1.txt
similarity index 100%
rename from milena/doc/tutorial/samples/graph-output-1.tex
rename to milena/doc/tutorial/outputs/graph-output-1.txt
diff --git a/milena/doc/tutorial/samples/ima2d-3-output.tex b/milena/doc/tutorial/outputs/ima2d-3-output.txt
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-3-output.tex
rename to milena/doc/tutorial/outputs/ima2d-3-output.txt
diff --git a/milena/doc/tutorial/samples/ima2d-display-output-1.tex b/milena/doc/tutorial/outputs/ima2d-display-output-1.txt
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-output-1.tex
rename to milena/doc/tutorial/outputs/ima2d-display-output-1.txt
diff --git a/milena/doc/tutorial/samples/ima2d-display-output-2.tex b/milena/doc/tutorial/outputs/ima2d-display-output-2.txt
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-output-2.tex
rename to milena/doc/tutorial/outputs/ima2d-display-output-2.txt
diff --git a/milena/doc/tutorial/samples/Makefile.am b/milena/doc/tutorial/samples/Makefile.am
new file mode 100644
index 0000000..dcbf13c
--- /dev/null
+++ b/milena/doc/tutorial/samples/Makefile.am
@@ -0,0 +1,41 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/doc/doc.mk
+
+bin_PROGRAMS =			\
+  borderthickness 		\
+  dpoint-1 			\
+  ima-has 			\
+  ima-size 			\
+  ima2d-1 			\
+  ima2d-decl-2-blobs-full 	\
+  ima2d-rot 			\
+  labeling-compute-full 	\
+  logical-not 			\
+  paste-call-1 			\
+  point-1
+
+borderthickness_SOURCES = borderthickness.cc
+dpoint_1_SOURCES = dpoint-1.cc
+ima_has_SOURCES = ima-has.cc
+ima_size_SOURCES = ima-size.cc
+ima2d_1_SOURCES = ima2d-1.cc
+ima2d_decl_2_blobs_full_SOURCES = ima2d-decl-2-blobs-full.cc
+ima2d_rot_SOURCES = ima2d-rot.cc
+labeling_compute_full_SOURCES = labeling-compute-full.cc
+logical_not_SOURCES = logical-not.cc
+paste_call_1_SOURCES = paste-call-1.cc
+point_1_SOURCES = point-1.cc
+
+all:
+	mkdir -p $(OUTPUTS_DIR) 
+	mkdir -p $(FIGURES_DIR) 
+	@failcom='exit 1'; 					\
+	list='$(bin_PROGRAMS)'; for bin in $$list; do 		\
+	  echo "Running $$bin"; 				\
+	  ./$$bin > $(OUTPUTS_DIR)/$$bin.txt || eval $$failcom; \
+	done; 
+
+clean-local:
+	rm -Rf $(OUTPUTS_DIR) $(FIGURES_DIR)
+
diff --git a/milena/doc/tutorial/samples/accu-right-instanciation.tex b/milena/doc/tutorial/samples/accu-right-instanciation.cc
similarity index 100%
rename from milena/doc/tutorial/samples/accu-right-instanciation.tex
rename to milena/doc/tutorial/samples/accu-right-instanciation.cc
diff --git a/milena/doc/tutorial/samples/accu-wrong-instanciation.tex b/milena/doc/tutorial/samples/accu-wrong-instanciation.cc
similarity index 100%
rename from milena/doc/tutorial/samples/accu-wrong-instanciation.tex
rename to milena/doc/tutorial/samples/accu-wrong-instanciation.cc
diff --git a/milena/doc/tutorial/samples/borderthickness-output.tex b/milena/doc/tutorial/samples/borderthickness-output.tex
deleted file mode 100644
index 201aedb..0000000
--- a/milena/doc/tutorial/samples/borderthickness-output.tex
+++ /dev/null
@@ -1,13 +0,0 @@
-- - - - - - - - 
-- - - - - - - - 
-- - - - - - - - 
-- - - - | - - - 
-- - - | - - - - 
-- - - - - - - - 
-- - - - - - - - 
-- - - - - - - - 
-
-===========
-
-- | 
-| - 
diff --git a/milena/doc/tutorial/samples/borderthickness.cc b/milena/doc/tutorial/samples/borderthickness.cc
new file mode 100644
index 0000000..1e59076
--- /dev/null
+++ b/milena/doc/tutorial/samples/borderthickness.cc
@@ -0,0 +1,18 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+  using namespace mln;
+
+  bool vals[3][3] = { { 0, 1, 1 },
+		      { 1, 0, 0 },
+		      { 1, 1, 0 } };
+
+  image2d<bool> ima_def = make::image(vals);
+  debug::println_with_border(ima_def);
+
+  std::cout << "===========" << std::endl << std::endl;
+
+  border::thickness = 0;
+  image2d<bool> ima_bt0 = make::image(vals);
+  debug::println_with_border(ima_bt0);
+}
diff --git a/milena/doc/tutorial/samples/borderthickness.tex b/milena/doc/tutorial/samples/borderthickness.tex
deleted file mode 100644
index a059ba3..0000000
--- a/milena/doc/tutorial/samples/borderthickness.tex
+++ /dev/null
@@ -1,17 +0,0 @@
-#include <mln/core/image/image2d.hh>
-#include <mln/debug/println_with_border.hh>
-int main()
-{
-  using namespace mln;
-
-  bool vals[2][2] = { {0, 1},
-		      {1, 0} };
-  image2d<bool> ima_def = make::image2d(vals);
-  debug::println_with_border(ima_def);
-
-  std::cout << "===========" << std::endl << std::endl;
-
-  border::thickness = 0;
-  image2d<bool> ima_bt0 = make::image2d(vals);
-  debug::println_with_border(ima_bt0);
-}
diff --git a/milena/doc/tutorial/samples/box2d-1.tex b/milena/doc/tutorial/samples/box2d-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/box2d-1.tex
rename to milena/doc/tutorial/samples/box2d-1.cc
diff --git a/milena/doc/tutorial/samples/box2d-2.tex b/milena/doc/tutorial/samples/box2d-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/box2d-2.tex
rename to milena/doc/tutorial/samples/box2d-2.cc
diff --git a/milena/doc/tutorial/samples/domain-display-1.tex b/milena/doc/tutorial/samples/domain-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/domain-display-1.tex
rename to milena/doc/tutorial/samples/domain-display-1.cc
diff --git a/milena/doc/tutorial/samples/domain-display-out-1.tex b/milena/doc/tutorial/samples/domain-display-out-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/domain-display-out-1.tex
rename to milena/doc/tutorial/samples/domain-display-out-1.cc
diff --git a/milena/doc/tutorial/samples/dpoint-1-output.tex b/milena/doc/tutorial/samples/dpoint-1-output.tex
deleted file mode 100644
index 8982f0f..0000000
--- a/milena/doc/tutorial/samples/dpoint-1-output.tex
+++ /dev/null
@@ -1 +0,0 @@
-(0, 1)
diff --git a/milena/doc/tutorial/samples/dpoint-1.tex b/milena/doc/tutorial/samples/dpoint-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/dpoint-1.tex
rename to milena/doc/tutorial/samples/dpoint-1.cc
diff --git a/milena/doc/tutorial/samples/estim-sites.tex b/milena/doc/tutorial/samples/estim-sites.cc
similarity index 100%
rename from milena/doc/tutorial/samples/estim-sites.tex
rename to milena/doc/tutorial/samples/estim-sites.cc
diff --git a/milena/doc/tutorial/samples/extension-ignore.tex b/milena/doc/tutorial/samples/extension-ignore.cc
similarity index 100%
rename from milena/doc/tutorial/samples/extension-ignore.tex
rename to milena/doc/tutorial/samples/extension-ignore.cc
diff --git a/milena/doc/tutorial/samples/extension-ignore2.tex b/milena/doc/tutorial/samples/extension-ignore2.tex
deleted file mode 100644
index 7e7ef54..0000000
--- a/milena/doc/tutorial/samples/extension-ignore2.tex
+++ /dev/null
@@ -1 +0,0 @@
-my_routine(ima.domain());
diff --git a/milena/doc/tutorial/samples/fill-call-1.tex b/milena/doc/tutorial/samples/fill-call-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-call-1.tex
rename to milena/doc/tutorial/samples/fill-call-1.cc
diff --git a/milena/doc/tutorial/samples/fill-part-1.tex b/milena/doc/tutorial/samples/fill-part-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-part-1.tex
rename to milena/doc/tutorial/samples/fill-part-1.cc
diff --git a/milena/doc/tutorial/samples/fill-part-2.tex b/milena/doc/tutorial/samples/fill-part-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-part-2.tex
rename to milena/doc/tutorial/samples/fill-part-2.cc
diff --git a/milena/doc/tutorial/samples/fill-part-3.tex b/milena/doc/tutorial/samples/fill-part-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill-part-3.tex
rename to milena/doc/tutorial/samples/fill-part-3.cc
diff --git a/milena/doc/tutorial/samples/fill.tex b/milena/doc/tutorial/samples/fill.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fill.tex
rename to milena/doc/tutorial/samples/fill.cc
diff --git a/milena/doc/tutorial/samples/forall-piter-1.tex b/milena/doc/tutorial/samples/forall-piter-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/forall-piter-1.tex
rename to milena/doc/tutorial/samples/forall-piter-1.cc
diff --git a/milena/doc/tutorial/samples/fun-p2b-1.tex b/milena/doc/tutorial/samples/fun-p2b-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fun-p2b-1.tex
rename to milena/doc/tutorial/samples/fun-p2b-1.cc
diff --git a/milena/doc/tutorial/samples/fun-p2v-1.tex b/milena/doc/tutorial/samples/fun-p2v-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/fun-p2v-1.tex
rename to milena/doc/tutorial/samples/fun-p2v-1.cc
diff --git a/milena/doc/tutorial/samples/graph-add-edges.tex b/milena/doc/tutorial/samples/graph-add-edges.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-add-edges.tex
rename to milena/doc/tutorial/samples/graph-add-edges.cc
diff --git a/milena/doc/tutorial/samples/graph-add-vertex.tex b/milena/doc/tutorial/samples/graph-add-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-add-vertex.tex
rename to milena/doc/tutorial/samples/graph-add-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-data.tex b/milena/doc/tutorial/samples/graph-data.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-data.tex
rename to milena/doc/tutorial/samples/graph-data.cc
diff --git a/milena/doc/tutorial/samples/graph-i2v-vertex.tex b/milena/doc/tutorial/samples/graph-i2v-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-i2v-vertex.tex
rename to milena/doc/tutorial/samples/graph-i2v-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.tex b/milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.tex
rename to milena/doc/tutorial/samples/graph-iter-edge-nbh-edge.cc
diff --git a/milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex b/milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.tex
rename to milena/doc/tutorial/samples/graph-iter-vertex-nbh-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-iter-vertex.tex b/milena/doc/tutorial/samples/graph-iter-vertex.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter-vertex.tex
rename to milena/doc/tutorial/samples/graph-iter-vertex.cc
diff --git a/milena/doc/tutorial/samples/graph-iter.tex b/milena/doc/tutorial/samples/graph-iter.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-iter.tex
rename to milena/doc/tutorial/samples/graph-iter.cc
diff --git a/milena/doc/tutorial/samples/graph-p-vertices.tex b/milena/doc/tutorial/samples/graph-p-vertices.cc
similarity index 100%
rename from milena/doc/tutorial/samples/graph-p-vertices.tex
rename to milena/doc/tutorial/samples/graph-p-vertices.cc
diff --git a/milena/doc/tutorial/samples/ima-has.cc b/milena/doc/tutorial/samples/ima-has.cc
new file mode 100644
index 0000000..9513541
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima-has.cc
@@ -0,0 +1,38 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+  using namespace mln;
+
+  // Default border size is set to 0.
+
+  // Image defined on a box2d from
+  // (0, 0) to (2, 2)
+  image2d<int> ima1(2, 3);
+
+  std::cout << "ima1.has(0, 0) : "
+	    << ima1.has(point2d(0, 0)) << std::endl;
+
+  std::cout << "ima1.has(-3, 0) : "
+	    << ima1.has(point2d(-3, 0)) << std::endl;
+
+  std::cout << "ima1.has(2, 5) : "
+	    << ima1.has(point2d(2, 5)) << std::endl;
+
+  std::cout << "=========" << std::endl;
+
+  // Set default border size to 0.
+  border::thickness = 0;
+
+  // Image defined on a box2d from
+  // (0, 0) to (2, 2)
+  image2d<int> ima2(2, 3);
+
+  std::cout << "ima2.has(0, 0) : "
+	    << ima2.has(point2d(0, 0)) << std::endl;
+
+  std::cout << "ima2.has(-3, 0) : "
+	    << ima2.has(point2d(-3, 0)) << std::endl;
+
+  std::cout << "ima2.has(2, 5) : "
+	    << ima2.has(point2d(2, 5)) << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/ima-load.tex b/milena/doc/tutorial/samples/ima-load.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima-load.tex
rename to milena/doc/tutorial/samples/ima-load.cc
diff --git a/milena/doc/tutorial/samples/ima-save.tex b/milena/doc/tutorial/samples/ima-save.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima-save.tex
rename to milena/doc/tutorial/samples/ima-save.cc
diff --git a/milena/doc/tutorial/samples/ima-size-output.tex b/milena/doc/tutorial/samples/ima-size-output.tex
deleted file mode 100644
index 6be445f..0000000
--- a/milena/doc/tutorial/samples/ima-size-output.tex
+++ /dev/null
@@ -1 +0,0 @@
-nrows = 10 - ncols = 12
diff --git a/milena/doc/tutorial/samples/ima-size.tex b/milena/doc/tutorial/samples/ima-size.cc
similarity index 52%
rename from milena/doc/tutorial/samples/ima-size.tex
rename to milena/doc/tutorial/samples/ima-size.cc
index 46d5a08..9fa845d 100644
--- a/milena/doc/tutorial/samples/ima-size.tex
+++ b/milena/doc/tutorial/samples/ima-size.cc
@@ -1,8 +1,9 @@
-#include <core/image/image2d.hh>
-#include <core/site_set/box2d.hh>
+#include <mln/essential/2d.hh>
 int main()
 {
-  mln::image2d<int> ima(box2d(0,0, 10,12));
+  using namespace mln;
+
+  image2d<int> ima(make::box2d(0,0, 10,12));
 
   std::cout << "nrows = " << ima.nrows()
 	    << " - "
diff --git a/milena/doc/tutorial/samples/ima2d-1-output.tex b/milena/doc/tutorial/samples/ima2d-1-output.tex
deleted file mode 100644
index e689fa5..0000000
--- a/milena/doc/tutorial/samples/ima2d-1-output.tex
+++ /dev/null
@@ -1,2 +0,0 @@
-b = [(-2,3)...(3,-5)] 
-domain = [(-2,3)...(3,-5)] 
diff --git a/milena/doc/tutorial/samples/ima2d-1.cc b/milena/doc/tutorial/samples/ima2d-1.cc
new file mode 100644
index 0000000..bc0da47
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-1.cc
@@ -0,0 +1,13 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+  using namespace mln;
+
+  // Define a box2d from (-2,-3) to (3,5).
+  box2d b = make::box2d(-2,-3, 3,5);
+  // Initialize an image with b as domain.
+  image2d<int> ima(b);
+
+  std::cout << "b = " << b << std::endl;
+  std::cout << "domain = " << ima.domain() << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/ima2d-1.tex b/milena/doc/tutorial/samples/ima2d-1.tex
deleted file mode 100644
index f792182..0000000
--- a/milena/doc/tutorial/samples/ima2d-1.tex
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <mln/core/alias/box2d.hh>
-#include <mln/core/image/image2d.hh>
-int main()
-{
-  // Define a box2d from (-2,3) to (3,-5).
-  box2d b(-2,3, 3,-5);
-  // Initialize an image with b as domain.
-  image2d<int> ima(b);
-
-  cout << "b = " << b << std::endl;
-  cout << "domain = " << ima.domain() << std::endl;
-}
diff --git a/milena/doc/tutorial/samples/ima2d-2.tex b/milena/doc/tutorial/samples/ima2d-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-2.tex
rename to milena/doc/tutorial/samples/ima2d-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-3.tex b/milena/doc/tutorial/samples/ima2d-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-3.tex
rename to milena/doc/tutorial/samples/ima2d-3.cc
diff --git a/milena/doc/tutorial/samples/ima2d-4.tex b/milena/doc/tutorial/samples/ima2d-4.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-4.tex
rename to milena/doc/tutorial/samples/ima2d-4.cc
diff --git a/milena/doc/tutorial/samples/ima2d-5.tex b/milena/doc/tutorial/samples/ima2d-5.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-5.tex
rename to milena/doc/tutorial/samples/ima2d-5.cc
diff --git a/milena/doc/tutorial/samples/ima2d-6-clone.tex b/milena/doc/tutorial/samples/ima2d-6-clone.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-6-clone.tex
rename to milena/doc/tutorial/samples/ima2d-6-clone.cc
diff --git a/milena/doc/tutorial/samples/ima2d-7.tex b/milena/doc/tutorial/samples/ima2d-7.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-7.tex
rename to milena/doc/tutorial/samples/ima2d-7.cc
diff --git a/milena/doc/tutorial/samples/ima2d-decl-1.tex b/milena/doc/tutorial/samples/ima2d-decl-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-decl-1.tex
rename to milena/doc/tutorial/samples/ima2d-decl-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc b/milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
new file mode 100644
index 0000000..9728ac7
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-decl-2-blobs-full.cc
@@ -0,0 +1,21 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+  using namespace mln;
+  using value::int_u8;
+
+  bool vals[6][5] = {
+      {0, 1, 1, 0, 0},
+      {0, 1, 1, 0, 0},
+      {0, 0, 0, 0, 0},
+      {1, 1, 0, 1, 0},
+      {1, 0, 1, 1, 1},
+      {1, 0, 0, 0, 0}
+  };
+  image2d<bool> ima = make::image(vals);
+
+  int_u8 nlabels;
+  image2d<int_u8> lbl = labeling::blobs(ima, c4(), nlabels);
+
+  debug::println(lbl);
+}
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex b/milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
deleted file mode 100644
index 0e08731..0000000
--- a/milena/doc/tutorial/samples/ima2d-decl-2-blobs-output.tex
+++ /dev/null
@@ -1,7 +0,0 @@
-0 1 1 0 0
-0 1 1 0 0
-0 0 0 0 0
-2 2 0 3 0
-2 0 3 3 3
-2 0 0 0 0
-
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2-blobs.tex b/milena/doc/tutorial/samples/ima2d-decl-2-blobs.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-decl-2-blobs.tex
rename to milena/doc/tutorial/samples/ima2d-decl-2-blobs.cc
diff --git a/milena/doc/tutorial/samples/ima2d-decl-2.tex b/milena/doc/tutorial/samples/ima2d-decl-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-decl-2.tex
rename to milena/doc/tutorial/samples/ima2d-decl-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-display-1.tex b/milena/doc/tutorial/samples/ima2d-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-1.tex
rename to milena/doc/tutorial/samples/ima2d-display-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-display-2.tex b/milena/doc/tutorial/samples/ima2d-display-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-display-2.tex
rename to milena/doc/tutorial/samples/ima2d-display-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-1.tex b/milena/doc/tutorial/samples/ima2d-restricted-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-1.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-2.tex b/milena/doc/tutorial/samples/ima2d-restricted-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-2.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-2.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-3.tex b/milena/doc/tutorial/samples/ima2d-restricted-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-3.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-3.cc
diff --git a/milena/doc/tutorial/samples/ima2d-restricted-display-1.tex b/milena/doc/tutorial/samples/ima2d-restricted-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/ima2d-restricted-display-1.tex
rename to milena/doc/tutorial/samples/ima2d-restricted-display-1.cc
diff --git a/milena/doc/tutorial/samples/ima2d-rot.cc b/milena/doc/tutorial/samples/ima2d-rot.cc
new file mode 100644
index 0000000..4832045
--- /dev/null
+++ b/milena/doc/tutorial/samples/ima2d-rot.cc
@@ -0,0 +1,42 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+  using namespace mln;
+
+  border::thickness = 30;
+
+  // Declare the image to be rotated.
+  image2d<value::rgb8> ima1_(220, 220);
+  level::fill(ima1_, literal::cyan);
+  border::fill(ima1_, literal::yellow);
+  // Set an infinite extension.
+  mln_VAR(ima1, extend(ima1_, pw::cst(literal::yellow)));
+
+  // Declare the output image.
+  image2d<value::rgb8> ima2(220, 220);
+  level::fill(ima2, literal::cyan);
+  border::fill(ima2, literal::yellow);
+
+  box2d extended_domain= ima1.domain();
+  extended_domain.enlarge(border::thickness);
+
+  // Draw the domain bounding box
+  draw::box(ima1, geom::bbox(ima1_), literal::red);
+  // Save the image, including its border.
+  io::ppm::save(ima1 | extended_domain,
+		"../figures/ima2d-rot-1.ppm");
+
+  // Define and apply a point-wise rotation
+  fun::x2x::rotation<2,float> rot1(0.5, literal::zero);
+  image2d<value::rgb8>::fwd_piter p(ima1.domain());
+  for_all(p)
+  {
+    algebra::vec<2,float> pv = p.to_site().to_vec();
+    algebra::vec<2,float> v = rot1.inv()(pv);
+    ima2(p) = ima1(v);
+  }
+
+  draw::box(ima2, ima2.bbox(), literal::red);
+  io::ppm::save(ima2 | extended_domain,
+		"../figures/ima2d-rot-2.ppm");
+}
diff --git a/milena/doc/tutorial/samples/labeling-compute-call.tex b/milena/doc/tutorial/samples/labeling-compute-call.cc
similarity index 100%
rename from milena/doc/tutorial/samples/labeling-compute-call.tex
rename to milena/doc/tutorial/samples/labeling-compute-call.cc
diff --git a/milena/doc/tutorial/samples/labeling-compute-full.cc b/milena/doc/tutorial/samples/labeling-compute-full.cc
new file mode 100644
index 0000000..fa378ca
--- /dev/null
+++ b/milena/doc/tutorial/samples/labeling-compute-full.cc
@@ -0,0 +1,27 @@
+#include <mln/essential/2d.hh>
+int main()
+{
+  using namespace mln;
+  using value::int_u8;
+
+  bool vals[6][5] = {
+      {0, 1, 1, 0, 0},
+      {0, 1, 1, 0, 0},
+      {0, 0, 0, 0, 0},
+      {1, 1, 0, 1, 0},
+      {1, 0, 1, 1, 1},
+      {1, 0, 0, 0, 0}
+  };
+  image2d<bool> ima = make::image(vals);
+
+  int_u8 nlabels;
+  image2d<int_u8> lbl = labeling::blobs(ima, c4(), nlabels);
+
+  util::array<box2d> boxes =
+      labeling::compute(accu::meta::bbox(),
+			lbl,
+			nlabels);
+
+  for (unsigned i = 1; i <= nlabels; ++i)
+    std::cout << boxes[i] << std::endl;
+}
diff --git a/milena/doc/tutorial/samples/labeling-compute-result-output.tex b/milena/doc/tutorial/samples/labeling-compute-result-output.tex
deleted file mode 100644
index d7fbc06..0000000
--- a/milena/doc/tutorial/samples/labeling-compute-result-output.tex
+++ /dev/null
@@ -1,3 +0,0 @@
-[(1,2)...(2,3)]
-[(4,1)...(6,2)]
-[(4,3)...(5,5)]
diff --git a/milena/doc/tutorial/samples/labeling-compute-result.tex b/milena/doc/tutorial/samples/labeling-compute-result.cc
similarity index 100%
rename from milena/doc/tutorial/samples/labeling-compute-result.tex
rename to milena/doc/tutorial/samples/labeling-compute-result.cc
diff --git a/milena/doc/tutorial/samples/logical-not-output.tex b/milena/doc/tutorial/samples/logical-not-output.tex
deleted file mode 100644
index 27c6ceb..0000000
--- a/milena/doc/tutorial/samples/logical-not-output.tex
+++ /dev/null
@@ -1,17 +0,0 @@
-ima:
-| -
-- |
-
-----
-ima_neg:
-- |
-| -
-
-ima:
-| -
-- |
-
-----
-not_inplace(ima)
-- |
-| -
diff --git a/milena/doc/tutorial/samples/logical-not.tex b/milena/doc/tutorial/samples/logical-not.cc
similarity index 77%
rename from milena/doc/tutorial/samples/logical-not.tex
rename to milena/doc/tutorial/samples/logical-not.cc
index ecb7748..ede62ca 100644
--- a/milena/doc/tutorial/samples/logical-not.tex
+++ b/milena/doc/tutorial/samples/logical-not.cc
@@ -1,6 +1,4 @@
-#include <mln/core/image/image2d.hh>
-#include <mln/logical/not.hh>
-#include <mln/debug/println.hh>
+#include <mln/essential/2d.hh>
 int main()
 {
   using namespace mln;
@@ -9,7 +7,7 @@ int main()
     {1, 0},
     {0, 1}
   };
-  image2d<bool> ima = make::image2d(vals);
+  image2d<bool> ima = make::image(vals);
   std::cout << "ima:" << std::endl;
   debug::println(ima);
 
diff --git a/milena/doc/tutorial/samples/mln_var-1.tex b/milena/doc/tutorial/samples/mln_var-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/mln_var-1.tex
rename to milena/doc/tutorial/samples/mln_var-1.cc
diff --git a/milena/doc/tutorial/samples/mln_var-2.tex b/milena/doc/tutorial/samples/mln_var-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/mln_var-2.tex
rename to milena/doc/tutorial/samples/mln_var-2.cc
diff --git a/milena/doc/tutorial/samples/mln_var-3.tex b/milena/doc/tutorial/samples/mln_var-3.cc
similarity index 100%
rename from milena/doc/tutorial/samples/mln_var-3.tex
rename to milena/doc/tutorial/samples/mln_var-3.cc
diff --git a/milena/doc/tutorial/samples/out.ppm b/milena/doc/tutorial/samples/out.ppm
new file mode 100644
index 0000000000000000000000000000000000000000..7a33c29f788c3048de656608515af2b838ac61da
GIT binary patch
literal 145320
zcmeI1L2DdG5Jr90uUN<>xyX*eIph|w2>}O;$sds84KX;9QAEJMUMcVFN-OPXX1b@k
zx~lsvwpovMx~so>^Lj@6?x(ZwHotB!x7Qap+mD+MUpK#h`n<io*!+0@Vzc@C=H|=K
z&!1m?J97T{`s4O|`{mQk#ra>?a@L!7zy0yc=Kc2H?Zx$<e{U`>KW<)c|J#1P`tr~A
z@@Dh);=`2;dUgGE^ZncRuiyM|_VVS6jr=`(`Rdi#?Xze6ApwU8JiEQ+4+(fk;P~qB
zP!Bbb08GMww*>Y~%D%n3tMpbL^>mm3Om^6G=S#k45>@h)=OY1_bS{k!%X`2is`Md>
z4mmtt@+gyX@c1*lCjrX@9y5t5QDyA}o?;SJTAG2mjuRMR5>?g~#c_i=d_Tb?s_c*l
z4@(|r5>=wgdI>zqBv{sKiU(O$tN|t~hR@Wa2~07GDp6&P1YmOXQsrR91ZJ2-l{G|B
zkp~Y`FJw|a=Al|@=pli5CQ&7-v`t_+lc=%>M|oJ|A|_F#ttdQzQL%<3CQ)U@PW3bO
zQYKL)s<cWVfl08mYDzy!99=0)j>f{liV37Ki7HWL`2=9Hq7ayRG=XF$QDu2ijCQJ@
zgV{{ViT$L+N-Yz}VG>oM%907JVG>nZ+M}PjGMPk`B}LH>exoa0$t0>AO_hUd63Ax~
zRier=39MogEXy=yjbs`)7bY8MVq;5K%Ot8qmD&lwWMh(PU^xm*qDpO1G{DuGB`7i}
zL#?TVb4g%GK!-_Gi7NFH&}9-;;=1(-s4<Bu^+d70t)WLyXA)J0=D|bpnoOcfRH>1G
zGLvAb(G(A|s#pU|Rt%r1M-$Lz5>=wgbqSPXQbr!V3OGmt(+Lz|5>>7f#dOP>|7lSs
zQDyV|lvrRXCQ&7-%uS#)lc=(UN!lK>Ad{#vR}^g{H@i9mCQ;>V7x=(&0%e&*m8dd3
zf#OVpWqMPNrP1MgnC!6W&X;V#B&tM}DG69IDRVi$LMhKf0!B=t$`ny}0Hb0J#!RBh
zioK39wH=eF5>+lsz@AA|8O2w%>O3%cyA0vgWy(_yPdY|f%gz+?k2RC*;4wL|#QTUz
zR2kALmbBQ+Re?!Vi7F=(c*rEGM3wauIAIbj>o>(_i*!3nT_$CAx5-dgtpvuHM3tzr
zW&+ijM3uF4<aXXCm_(H|Md6kfo5DOWi7IV+9c7lMnM9SSvQ7f^nUr<&CHUm;kfZob
ztIkO#QDq%bXf-$JI4+n(m3Z<ffjK5oC91SeU;&e0Y2B2dd#+a5-k6knw3fy=K@(WU
zB&tM}b_qCS5>*EEn^xJ2nM9R#qR?t?&~bb+i7JEQq*8VYlc*9^S|s3+Nm)1FHXi*B
zSw%j921#TRRa%H55I-eKb;=~F#FOH`gjb1+<77;>?_RM?_vFCt2|^|IG_dRvOaDwt
zg(eq3iHnLca}vm9Qfz5L3aT^;+NPb0W(mP0sx-O&7Xf2X$qFV>rI#ieaAG+{6edxn
zB^7n&TE`@+M3wpp#9&g^&BIPN4?C-wM3wrYsJnGmpFIqds1i?#{}Ns%*B0A%A6RO5
za$pxM*~E1ch{&YWY;pnUBuuHP3Ft8?woIKo>+|g3MnT)Ob7YpFOrpxH>v;qKhvTR+
zi7I0>-64m^CB<bDRUY@TrT5xQqDoY`Hi4*2%DQ>jY4l;I0F$V4tteXBh%?p_m`PNL
zC&hmWuZ-&>{S>zE7O^bj$${N;#xgcNuxt*?Hkg!Em|OrE*9@m5Cs2|}v84$qsM08C
zn|8`#cE40fxKT{{s2!82(j;pOEDJM<DlMAW42{D=T4EAawgG2(CQ&7-OiQ30CS~0`
z>@@MPW5Oh=OcO;LTX6O&nqm@F;>o063)!fG?K?h}R-PR2&DMF!iC`HV%T}3`b)|4@
zBXMR~lz=UhJnSrLO6ONo!%U*eplq8ni7HX$R04Y-zukFRzDzFP-IETgG|763vE>CE
z^tk`-!;;9|T+1t6@kt)QgFJxW(>TyQ_{18@6{ICylwj!_%f~d<WKymH6D(oUDCp#N
zj?>r!ld?vzbcW>=jg^^1mC0@~*;>k0H4o%LBi6T*_w$*=j4B<dauJR7J!z^+$;9LW
zDC?PsOGu#61(T*&Mr>&4nv-elk4aQ%MtCNTUYJCcO>Ot9XzY?nR9RG&3P1{$yJyn-
z=iqAZibi!9oCok?58wxo4pFahe^*Q%u0f69)`Z^FxtcT%!FXYkyUKW=>eJXKld@`d
z@YOqbDH`1|i7ErAvMh}rnFLGMSXuxn0XVv!9G>}2o<D|F^KIkeP5i)#VRr@`y!>mo
zaFdx_t8X>|QyQJ_-KN{O1U}o8Za+|gM!!s&V%aTn6AQ0KBTRBvd2&BlnMT)4qROE?
zrvJJCQdaElx%=)xYhrIv{n0J~)e%iWQmOoafy!X32l2}!s<dF+7mdS;Ve+t9tiHT0
z5K=7CBaH!=G*zYaNU`Idhw@8f3?@yn^bC?pZF?G>Uwp3j?%{byr5kgD3^_EdO7D8S
zyY~seB&xjYR_2>9G=|x`O_`MT%_%h#j4HzhqcIYbrdU>iM}5+eG{WSl@OC#d>V#Mh
z7?{RjOrpxsOX$JDJ&m#NKIA+2-PeoK@Bl9>*~C=kp_NuCJ-8ZFCOse+iAkwhW$kl=
zL}RiY8V4$aF$tCrF3b2diXTp1F!`X#2Zau?IR3p*n=}r1#$!_IK9E!N%`O>}nbMZg
zGL0}f&4NEw?rD_5rYm>-)03V0^gu{Y_NdDEdOU^ii6byMVHF>$?1;tz(x^;!q00C)
z%56sa3nnK#Is9lBk?}oTr!)@y24+$gU_y#5lU>sYlgp7d!E#Td%(c8Qcb`n(sZY;{
z?a6jj8DEd5Y~>ya&t!Nkq46=hFu8F18-h~(wlO}9S&!9^5j^>S3rxmSB{ZIZcys_J
z7kW}YrlCq`Jc93uw~a6<t223A-NltR(;d=Ar4|X~35s+N!(>wLa#a~$kGj}Rj@Ay7
zvdlbzC7zY2N@$$qZ|sLKnL+Y0EaTHCS8I(|Q%p*LiPFpa{2Y_exC&*MRK*e+SJ60}
z+!~WLRT&>h1)vm$XpqSYSVE%$ig!c6WZvE_XARNq12nmh%`SE3#5)>%ylIn3$<_oC
zNzZ1YQnUDg@KF^oS*qR6aec&rr~fv~q=f98idyA)!f&(|nCuAMQ3CuOY?(<(yOxW*
z&Fc@miHcydeQqb(@A5~DGbx#SQ<h~tE|Hrp3MSixcDC`3KhQpt627IHs?X&ZwuPm2
z!DJ^`E^N8`kHKUM7IlwVQh~iNDWO!~RSOl6)b9u%hRMLJMgT0M#*UbjbPAcue%Opo
z$2kQigMk_ct?WwsVp3wVcbe9W**%VSB1{ILG#XSZ>+Oz7$xBOIHsh>paKO`H(l4R`
zaZ)L{M<yjW8^vYMqSD&1gLKNITP(wZq*ypidU2*=Q-crHFO$-^?7da@#NY_2mk*Pb
p$yD!X`~kaWQrf3$yrj|M!&7JlFj)c1LcMHd*nvs@B>_(f{14b_By9iy
literal 0
HcmV?d00001
diff --git a/milena/doc/tutorial/samples/parray-append.tex b/milena/doc/tutorial/samples/parray-append.cc
similarity index 100%
rename from milena/doc/tutorial/samples/parray-append.tex
rename to milena/doc/tutorial/samples/parray-append.cc
diff --git a/milena/doc/tutorial/samples/parray-display-1.tex b/milena/doc/tutorial/samples/parray-display-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/parray-display-1.tex
rename to milena/doc/tutorial/samples/parray-display-1.cc
diff --git a/milena/doc/tutorial/samples/paste-call-1-output.tex b/milena/doc/tutorial/samples/paste-call-1-output.tex
deleted file mode 100644
index 987bf30..0000000
--- a/milena/doc/tutorial/samples/paste-call-1-output.tex
+++ /dev/null
@@ -1,3 +0,0 @@
-b b b b
-b b b b
-b b b b
diff --git a/milena/doc/tutorial/samples/paste-call-1.tex b/milena/doc/tutorial/samples/paste-call-1.cc
similarity index 67%
rename from milena/doc/tutorial/samples/paste-call-1.tex
rename to milena/doc/tutorial/samples/paste-call-1.cc
index 50e4885..e4bfec2 100644
--- a/milena/doc/tutorial/samples/paste-call-1.tex
+++ b/milena/doc/tutorial/samples/paste-call-1.cc
@@ -1,8 +1,4 @@
-#include <mln/core/image/image2d.hh>
-#include <mln/make/box2d.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
-#include <mln/debug/println.hh>
+#include <mln/essential/2d.hh>
 int main()
 {
   using namespace mln;
diff --git a/milena/doc/tutorial/samples/paste.tex b/milena/doc/tutorial/samples/paste.cc
similarity index 100%
rename from milena/doc/tutorial/samples/paste.tex
rename to milena/doc/tutorial/samples/paste.cc
diff --git a/milena/doc/tutorial/samples/point-1-output.tex b/milena/doc/tutorial/samples/point-1-output.tex
deleted file mode 100644
index 39f77d0..0000000
--- a/milena/doc/tutorial/samples/point-1-output.tex
+++ /dev/null
@@ -1,2 +0,0 @@
-has(p1)? false
-has(p2)? true
diff --git a/milena/doc/tutorial/samples/point-1.tex b/milena/doc/tutorial/samples/point-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/point-1.tex
rename to milena/doc/tutorial/samples/point-1.cc
diff --git a/milena/doc/tutorial/samples/predicate-1.tex b/milena/doc/tutorial/samples/predicate-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/predicate-1.tex
rename to milena/doc/tutorial/samples/predicate-1.cc
diff --git a/milena/doc/tutorial/samples/win-create-1-display.tex b/milena/doc/tutorial/samples/win-create-1-display.cc
similarity index 100%
rename from milena/doc/tutorial/samples/win-create-1-display.tex
rename to milena/doc/tutorial/samples/win-create-1-display.cc
diff --git a/milena/doc/tutorial/samples/win-create-1.tex b/milena/doc/tutorial/samples/win-create-1.cc
similarity index 100%
rename from milena/doc/tutorial/samples/win-create-1.tex
rename to milena/doc/tutorial/samples/win-create-1.cc
diff --git a/milena/doc/tutorial/samples/win-create-2.tex b/milena/doc/tutorial/samples/win-create-2.cc
similarity index 100%
rename from milena/doc/tutorial/samples/win-create-2.tex
rename to milena/doc/tutorial/samples/win-create-2.cc
diff --git a/milena/doc/tutorial/samples/win-create-3.cc b/milena/doc/tutorial/samples/win-create-3.cc
new file mode 100644
index 0000000..8e4bf97
--- /dev/null
+++ b/milena/doc/tutorial/samples/win-create-3.cc
@@ -0,0 +1,7 @@
+bool b[25] = { 0, 0, 1, 0, 0,
+	       0, 1, 0, 1, 0,
+	       1, 0, 1, 0, 1,
+	       1, 1, 0, 1, 1,
+	       1, 0, 1, 0, 1 };
+window2d win = convert::to<window2d>(b)
+
diff --git a/milena/doc/tutorial/todoxygen.sh b/milena/doc/tutorial/todoxygen.sh
new file mode 100755
index 0000000..5442cc4
--- /dev/null
+++ b/milena/doc/tutorial/todoxygen.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+if [ $# -ne 2 ]; then
+  echo "Usage: $0 <file.tex> <output dir>";
+  exit 1;
+fi
+
+out="$2/`basename $1 .tex`.hh"
+html="$2/`basename $1 .tex`.html"
+
+#Convert .tex to .html
+hevea -O -fix $1 -o $html
+
+bodyl=`grep -n "<BODY >" $html | cut -d ':' -f 1`
+nlines=`wc -l $html | cut -d ' ' -f 1`
+tail_line=$(($nlines - $bodyl))
+
+echo '/*! ' > $out
+echo '\htmlonly' >> $out
+tail -n $tail_line $html >> $out
+echo '\endhtmlonly */' >> $out
+
+sed -i -e 's/ /\ /g' $out
+sed -i -e 's/↦/\&map/g' $out
+sed -i -e 's/’/\&rsquo/g' $out
+sed -i -e 's/→/\&rarr/g' $out
+sed -i -e 's/“/\&ldquo/g' $out
+sed -i -e 's/”/\&rdquo/g' $out
+sed -i -e 's/≡/\&equiv/g' $out
+
+#Doxygen wants us to preserve '\n' after commands. 
+sed -i -e 's/\\endhtmlonly/\\endhtmlonly\n/g' $out
+sed -i -e 's/\\htmlonly/\n\\htmlonly\n/g' $out
+sed -i -e 's/\\endhtmlonly/\\endhtmlonly\n/g' $out
+sed -i -e 's/\\htmlonly/\n\\htmlonly\n/g' $out
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index 4c0c052..f58c8d2 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -6,6 +6,7 @@
 \usepackage{color}
 \usepackage{html}
 \usepackage{tikz}
+\usepackage{pgf}
 
 \newcommand{\img}[4]{
 \begin{figure}[ht!]
@@ -66,7 +67,19 @@ showstringspaces=false,linewidth=14cm}
 
 \newcommand{\doxycode}[1]{
 \backslash endhtmlonly%
-\backslash include #1.tex%
+\backslash include #1.cc%
+\backslash htmlonly%
+}
+
+\newcommand{\doxyoutput}[1]{
+\backslash endhtmlonly%
+\backslash include #1.txt%
+\backslash htmlonly%
+}
+
+\newcommand{\doxyfigure}[2]{
+\backslash endhtmlonly%
+\backslash image html #1.png%
 \backslash htmlonly%
 }
 
@@ -88,7 +101,12 @@ $$
 \renewcommand{\doxychapter}[2]{\chapter{#2}\label{#1}}
 \renewcommand{\doxysection}[2]{\section{#2}\label{#1}}
 \renewcommand{\doxysubsection}[2]{\subsection{#2}\label{#1}}
-\renewcommand{\doxycode}[1]{\lstinputlisting[frame=single]{samples/#1}}
+\renewcommand{\doxycode}[1]{\lstinputlisting[frame=single]{samples/#1.cc}}
+\renewcommand{\doxyoutput}[1]{\lstinputlisting[frame=single]{outputs/#1.txt}}
+\renewcommand{\doxyfigure}[2]{%
+\pgfimage[width=#2]{figures/#1}%
+\label{#1}%
+}
 \renewenvironment{doxymath}
 {
   $$
@@ -118,6 +136,14 @@ $$
 \textit{#1}%
 }
 
+\newcommand{\must}{%
+\textbf{must}
+}
+\newcommand{\should}{%
+\textbf{should}
+}
+
+
 \usetikzlibrary{er}
 
 \newcommand{\neighcfour}{%
@@ -211,9 +237,11 @@ $$
 
 \begin{document}
 
+% Doxygen use only - Generate the left menu.
 \begin{htmlonly}
 \backslash endhtmlonly
 \backslash page tutorial Tutorial
+- \backslash subpage installation
 - \backslash subpage foreword
 - \backslash subpage site
 - \backslash subpage siteset
@@ -227,6 +255,7 @@ $$
 - \backslash subpage arithmops
 - \backslash subpage mathtools
 - \backslash subpage globalvars
+- \backslash subpage macros
 \backslash htmlonly
 \end{htmlonly}
 
@@ -235,6 +264,20 @@ $$
 \end{latexonly}
 
 %====================================
+\doxychapter{installation}{Installation}
+
+%**************************
+\doxysection{requirements}{Requirements}
+
+%**************************
+\doxysection{getolena}{Getting Olena}
+
+%**************************
+\doxysection{buildingolena}{Building Olena}
+
+
+
+%====================================
 \doxychapter{foreword}{Foreword}
 
 %**************************
@@ -297,6 +340,24 @@ Olena's tarball is structured as follow:
   \item swilena: Python bindings for Olena.
 \end{itemize}
 
+\doxysection{compilehint}{Writing and compiling a program with Olena}
+
+Before writing your first program, please be ware of these hints:
+
+\begin{itemize}
+  \item By default, Olena enables a lot of internal pre and post conditions.
+  Usually, this is a useful feature and it \should be enabled. It can heavily
+  slow down a program though and these tests can be disabled by compiling
+  using \code{-DNDEBUG}.
+  \begin{verbatim}
+g++ -DNDEBUG -Ipath/to/mln my_program.cc
+  \end{verbatim}
+
+  \item If you decide to use optimization flags to compile for debugging,
+  prefer using \code{-O1}. It is much faster to compile and it gives good
+  performance results.
+
+\end{itemize}
 
 %====================================
 \clearpage
@@ -498,7 +559,7 @@ FIXME & FIXME \\
 %**************************
 \doxysection{imapossvalues}{Possible value types}
 
-Every image type must take its type of value as parameter.
+Every image type \must take its type of value as parameter.
 The value type can be one of the builtins one:
 \begin{itemize}
   \item \type{bool}
@@ -537,7 +598,7 @@ Value type & underlying data type \\
 
 All these types are available in mln/value and accessible in the
 \namespace{mln::value} namespace.
-Most of the time, the name of the header which must be included to use one of these data
+Most of the time, the name of the header which \must be included to use one of these data
 types is actually ``type\_name.hh". For instance, for \type{rgb8} the header will be
 \header{rgb8.hh}.
 
@@ -595,14 +656,14 @@ exactly equivalent.
 
 \doxycode{ima2d-1}
 Output:
-\doxycode{ima2d-1-output}
+\doxyoutput{ima2d-1}
 
 
 To know if a site belongs to an image domain or not, a method ``\code{has()}'' is
 available.
 \doxycode{point-1}
 Output:
-\doxycode{point-1-output}
+\doxyoutput{point-1}
 
 Since the notion of site is independent from the image it applies on, we can
 form expressions where a site passed to several images:
@@ -626,7 +687,7 @@ as shown in the following example.
 
 Output:
 
-\doxycode{borderthickness-output}
+\doxyoutput{borderthickness}
 
 It is important to note that to display the border in the ouput, we use a
 special debug function, \code{debug::println\_with\_border}. Indeed, the border and the
@@ -691,16 +752,39 @@ information.
   in consideration the extension/border if it exists. The default border
   thickness is set to 3 as shown by the following example.
 
-[FIXME: Add example has(p) when p is in the border and border::thickness
-modified.]
+\doxycode{ima-has}
+
+Output:
+
+\doxyoutput{ima-has}
 
-Most of the time, this is the good behavior. For instance, if a rotation of 20
-degrees is applied to an image, sites which were not previously in the domain
+Most of the time, this is the good behavior. For instance, if a rotation
+is applied to an image, sites which were not previously in the domain
 will be part of it. Thanks to the extension/border, these sites will be
-associated to the value they had when they were part of the extension/border.
+associated to the value of the extension/border.
+
+In the following example, the extension is set to a constant color \var{yellow}.
+It means that whatever the new sites computed through the rotation, it will be
+part of the image and a value will be available. Site which were previously in
+the extension/border, will be associated to \var{yellow} in the output image.
+
+\doxycode{ima2d-rot}
+
+Output:
+
+\bigskip
+
+\begin{tabular}{c c}
+\doxyfigure{ima2d-rot-1}{4cm} & \doxyfigure{ima2d-rot-2}{4cm} \\
+\multicolumn{2}{c}{\var{ima1} and its border before rotation (left) and \var{ima2}
+  and its border after rotation} \\
+\end{tabular}
+
+\bigskip
 
 [Image+bord rotation 20degres, avant, apres]
 
+
 Sometimes taking the domain in consideration  may not be the expected behavior.
 If you do not want to use the extension/border for a specific routine, simply
 restrict the image to its domain.
@@ -717,9 +801,6 @@ Note that:
 \code{border::get(ima.domain())} == \code{border::get(ima | ima.domain())} == 0
 \end{center}
 
-So it is also valid to write:
-\doxycode{extension-ignore2}
-
 
 %================================================
 \doxysection{imamorphed}{Morphed images}
@@ -817,7 +898,7 @@ Most of the time, images can be modified and these two methods can be used both
 to read a value and modify it. Both methods are equivalent. 
 \doxycode{ima2d-3}
 Output:
-\doxycode{ima2d-3-output}
+\doxyoutput{ima2d-3-output}
 
 Usually, you will want to use the functional way, ``\code{ima(Site)}'', more
 particularly while iterating over all the sites through an iterator. This use
@@ -847,7 +928,7 @@ provided in \hpath{mln/geom} in the following files:
 
 \doxycode{ima-size}
 Output:
-\doxycode{ima-size-output}
+\doxyoutput{ima-size}
 
 
 %================================================
@@ -868,13 +949,14 @@ Voir les vset => attendre que ca soit ameliore?
 
 In Olena, there are both the window and neighborhood concept. A window can be
 defined on any sites around a central site which may also be included.
-A neighborhood is more restrictive and must not include the central site.
+A neighborhood is more restrictive and \must not include the central site.
 Therefore these two concepts are really similar and are detailed together in
 this section. 
 
 By default, structural elements are centered. The central site is located at the
-origin of the grid: ``\var{literal::origin}''. With image2d, the central site is
-(0,0).
+origin of the grid: ``\var{literal::origin}''. With \type{image2d}, the central site is
+(0,0). Centered structural elements \must have an odd size.
+
 
 
 \doxysection{sedef}{Define an element}
@@ -968,11 +1050,15 @@ Another way to define the same window is to provide a bool array:
 \doxycode{win-create-2}
 
 \textbf{Note that despite the different ways of defining these windows,
-  ``'var{win}'' == ``\var{win2}''}.
-The boolean array must always have an odd size.
+  ``var{win}'' == ``\var{win2}''}.
+The boolean array \must always have an odd size.
 While creating a windows thanks to a bool array/matrix, the window's center is the
 central site of the array/matrix.
 
+\textbf{This way of defining a window is very powerful since it enables the possibility
+of having non-square windows such as:}
+
+
 
 \subsubsection{Neighborhood}
 
@@ -1094,11 +1180,11 @@ owns the method ``\code{coord row() const}'' which is defined as
 \doxysection{sitesdpoint}{Dpoint}
 Dpoints are relative sites. They are usually used in window and neighborhood
 definitions. Since the central site is not constant, windows and neighborhoods
-must be recomputed and dpoints help in doing that.
+\must be recomputed and dpoints help in doing that.
 
 \doxycode{dpoint-1}
 Output:
-\doxycode{dpoint-1-output}
+\doxyoutput{dpoint-1}
 
 
 
@@ -1175,7 +1261,7 @@ use the \code{for\_all} loop: \code{level::fill()} and \code{level::paste()}.
 
 Important note: macros for iterators exist in two versions:
 ``\code{mln\_*iter}'' and ``\code{mln\_*iter\_}''. The difference is that the
-first version must be used in templated function whereas the second one must be
+first version \must be used in templated function whereas the second one \must be
 used in non templated functions. 
 
 If you want a list of all the macros available in Olena, please refert to
@@ -1286,7 +1372,7 @@ data for the sites (5, 5) to (14, 14) (so it has 100 sites).
 
 \doxycode{paste-call-1}
 Output:
-\doxycode{paste-call-1-output}
+\doxyoutput{paste-call-1}
 
 Before pasting, the couple of images looked like:
 
@@ -1328,10 +1414,10 @@ Consider the following image:
 Then label this image thanks to \code{labeling::blobs()}:
 \doxycode{ima2d-decl-2-blobs}
 Output:
-\doxycode{ima2d-decl-2-blobs-output}
+\doxyoutput{ima2d-decl-2-blobs-full}
 
 Note that this routine returns the number of components in its third parameter.
-This parameter \textbf{must} be of the same type as the returned image value.
+This parameter \must be of the same type as the returned image value.
 
 
 %**************************
@@ -1358,7 +1444,7 @@ algorithm a version which returns a new image and another which works in place.
 Sample code:
 \doxycode{logical-not}
 Output:
-\doxycode{logical-not-output}
+\doxyoutput{logical-not}
 
 %**************************
 \doxysection{compute}{Compute}
@@ -1433,9 +1519,9 @@ It exists two versions of each accumulator.
   \type{accu::meta::bbox}.
 \end{itemize}
 
-Note that when an accumulator is passed to \code{*::compute()}, it must be instanciated.You cannot write:
+Note that when an accumulator is passed to \code{*::compute()}, it \must be instanciated.You cannot write:
 \doxycode{accu-wrong-instanciation}
-Instead, you must write:
+Instead, you \must write:
 \doxycode{accu-right-instanciation}
 
 \doxysubsection{exlblcompute}{Example with labeling::compute()}
@@ -1449,7 +1535,7 @@ Consider the following image:
 Then label this image thanks to \code{labeling::blobs()}:
 \doxycode{ima2d-decl-2-blobs}
 Output:
-\doxycode{ima2d-decl-2-blobs-output}
+\doxyoutput{ima2d-decl-2-blobs-full}
 
 Then, use \code{labeling::compute()} with the bbox accumulator:
 \doxycode{labeling-compute-call}
@@ -1462,7 +1548,7 @@ In this case, it returns an array of \type{box2d}.
 set the background to 0, we will want to iterate from 1 to nlabels included.
 \doxycode{labeling-compute-result}
 Output:
-\doxycode{labeling-compute-result-output}
+\doxyoutput{labeling-compute-full}
 
 
 \subsection{Routines based on accumulators and *::compute()}
@@ -1516,7 +1602,7 @@ You can easily get a \type{Function\_p2b} by comparing the value returned
 by a \type{Function\_p2v} to another Value.
 The following sample codes illustrate this feature.
 
-In order to use C functions as predicate, they must have one of the following
+In order to use C functions as predicate, they \must have one of the following
 prototype if you work on 2D images:
 \doxycode{predicate-1}
 Of course, you just need to change the point type if you use another image
@@ -1553,15 +1639,15 @@ When writing:
 
 \doxycode{ima2d-restricted-1}
 
-\var{sub\_D} must be included in \code{ima.domain()}.
+\var{sub\_D} \must be included in \code{ima.domain()}.
 
 Let's have an image, \var{imab}, like this:
-\doxycode{ima2d-display-output-1}
+\doxyoutput{ima2d-display-output-1}
 
 Extract a sub image from \var{imab} with sites having their value set to 1.
 \doxycode{mln_var-2}
 Then, \var{imab1} looks like:
-\doxycode{ima2d-display-output-2}
+\doxyoutput{ima2d-display-output-2}
 
 Now, if we want to extract a sub image it may fail, depending on the site set
 used:
@@ -1604,7 +1690,7 @@ Specific data can be associated to each vertex and/or edges.
 
 First, create a graph which looks like the following:
 
-\doxycode{graph-output-1}
+\doxyoutput{graph-output-1}
 
 First we need to add vertices:
 
@@ -1694,12 +1780,26 @@ trace::quiet & Enable trace printing & true/false \\
 %====================================
 \newpage
 \clearpage
-\doxychapter{macros}{Useful Macros}
+\doxychapter{macros}{Useful macros}
+\renewcommand{\arraystretch}{2}
+
+\doxysection{vardeclmacros}{Variable declaration macros}
+\begin{tabular}{l|p{4cm}|p{6cm}}
+Name & Arguments & Description \\
+\hline
+mln\_VAR(N, V)	      & N : name of the variable. & \\
+		      & V : value to assign to N. & Declare a variable N of type N\_t and
+  assign the value V. \\
+
+mln\_const\_VAR(N, V) & N : name of the variable. & \\
+		      & V : value to assign to N. & Declare a const variable N of type N\_t
+  and assign the value V. \\
+\end{tabular}
+
 
 \doxysection{macrositerators}{Iterator type macros}
 
 \doxysubsection{macrosdefit}{Default iterator types}
-\renewcommand{\arraystretch}{2}
 \begin{tabular}{l|p{4cm}|p{6cm}}
 Name & Arguments & Description \\
 \hline
@@ -1795,4 +1895,16 @@ mln\_bkd\_nixter(I, N)	& I : image type,		    & \\
   backward iterator of a neighborhood on an image of type I. \\
 \end{tabular}
 
+
+\doxysubsection{macrosbkdit}{Graph iterators}
+\begin{tabular}{l|p{4cm}|p{6cm}}
+Name & Arguments & Description \\
+\hline
+mln\_vertex\_iter(G)		  & G : graph type & Iterator on vertices. \\
+mln\_edge\_iter(G)		  & G : graph type & Iterator on edges. \\
+mln\_vertex\_nbh\_edge\_iter(G)	  & G : graph type & Iterator on the edges adjacent to a vertex. \\
+mln\_vertex\_nbh\_vertex\_iter(G) & G : graph type & Iterator on the vertices adjacent to a vertex. \\
+mln\_edge\_nbh\_edge\_iter(G)	  & G : graph type & Iterator on the edges adjacent to an edge. \\
+\end{tabular}
+
 \end{document}
diff --git a/milena/mln/core/internal/complex_window_p_base.hh b/milena/mln/core/internal/complex_window_p_base.hh
index 2362c54..c02ba4b 100644
--- a/milena/mln/core/internal/complex_window_p_base.hh
+++ b/milena/mln/core/internal/complex_window_p_base.hh
@@ -28,7 +28,7 @@
 #ifndef MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
 # define MLN_CORE_IMAGE_COMPLEX_WINDOW_P_BASE_HH
 
-/// \file mln/core/image/complex_window_p_base.hh
+/// \file mln/core/internal/complex_window_p_base.hh
 /// \brief Definition of a generic window centered on the face
 /// of a complex, based on a pair of (forward and backward) complex
 /// iterators.  The center (site) is part of the window.
diff --git a/milena/mln/core/routine/extend.hh b/milena/mln/core/routine/extend.hh
index 984d9a0..6d447c1 100644
--- a/milena/mln/core/routine/extend.hh
+++ b/milena/mln/core/routine/extend.hh
@@ -31,7 +31,7 @@
 /*!
  * \file mln/core/routine/extend.hh
  *
- * \brief Definition of a morpher that extends the domain of an image.
+ * \brief Definition of a morpher that extends the extended domain of an image.
  *
  * \todo Use the 'instant' mechanism.
  * \todo Deal with ambiguities.
diff --git a/milena/mln/core/site_set/p_complex.hh b/milena/mln/core/site_set/p_complex.hh
index 3420519..3fcb7da 100644
--- a/milena/mln/core/site_set/p_complex.hh
+++ b/milena/mln/core/site_set/p_complex.hh
@@ -103,7 +103,7 @@ namespace mln
 
   /* FIXME: Aggregate site data (location).  */
 
-  /** \brief A complex psite set based on a the \N-faces of a complex
+  /** \brief A complex psite set based on the N-faces of a complex
       of dimension \tparam D (a \p D-complex).
 
       \arg \p D The dimension of the complex.
diff --git a/milena/mln/debug/graph.hh b/milena/mln/debug/graph.hh
index a23d386..e92b802 100644
--- a/milena/mln/debug/graph.hh
+++ b/milena/mln/debug/graph.hh
@@ -29,7 +29,7 @@
 #ifndef MLN_DEBUG_DRAW_GRAPH_HH
 # define MLN_DEBUG_DRAW_GRAPH_HH
 
-/// \file mln/debug/draw_graph.hh
+/// \file mln/debug/graph.hh
 /// \brief Draw an (classical) image from a mln::graph_image.
 
 # include <mln/pw/image.hh>
diff --git a/milena/mln/debug/println_with_border.hh b/milena/mln/debug/println_with_border.hh
index 05971a0..52ff01b 100644
--- a/milena/mln/debug/println_with_border.hh
+++ b/milena/mln/debug/println_with_border.hh
@@ -81,7 +81,7 @@ namespace mln
     {
       mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check();
 
-      impl::println_with_border(exact(input).bbox(), exact(input));
+      impl::println_with_border(geom::bbox(exact(input)), exact(input));
     }
 
 # endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/fun/x2v/bilinear.hh b/milena/mln/fun/x2v/bilinear.hh
index 8aa242f..e1e577b 100644
--- a/milena/mln/fun/x2v/bilinear.hh
+++ b/milena/mln/fun/x2v/bilinear.hh
@@ -34,7 +34,7 @@
 # include <mln/convert/to.hh>
 # include <mln/algebra/vec.hh>
 
-/*! \file mln/fun/x2x/bilinear.hh
+/*! \file mln/fun/x2v/bilinear.hh
  *
  * \brief Define a bilinear interpolation of values from an underlying image
  */
diff --git a/milena/mln/fun/x2v/linear.hh b/milena/mln/fun/x2v/linear.hh
index 7a2e329..8f62185 100644
--- a/milena/mln/fun/x2v/linear.hh
+++ b/milena/mln/fun/x2v/linear.hh
@@ -28,7 +28,7 @@
 #ifndef MLN_FUN_X2X_LINEAR_HH
 # define MLN_FUN_X2X_LINEAR_HH
 
-/*! \file mln/fun/x2x/linear.hh
+/*! \file mln/fun/x2v/linear.hh
  *
  * \brief Define a linear interpolation of values from an underlying image
  */
diff --git a/milena/mln/fun/x2v/nneighbor.hh b/milena/mln/fun/x2v/nneighbor.hh
index ae805a9..a2f9595 100644
--- a/milena/mln/fun/x2v/nneighbor.hh
+++ b/milena/mln/fun/x2v/nneighbor.hh
@@ -33,7 +33,7 @@
 # include <mln/algebra/vec.hh>
 # include <mln/convert/to.hh>
 
-/*! \file mln/fun/x2x/nneighbor.hh
+/*! \file mln/fun/x2v/nneighbor.hh
  *
  * \brief Define a nneighbor interpolation of values from an underlying image
  */
diff --git a/milena/mln/geom/nsites.hh b/milena/mln/geom/nsites.hh
index b8b790e..cf6ffa1 100644
--- a/milena/mln/geom/nsites.hh
+++ b/milena/mln/geom/nsites.hh
@@ -28,10 +28,8 @@
 #ifndef MLN_GEOM_NSITES_HH
 # define MLN_GEOM_NSITES_HH
 
-/*! \file mln/geom/nsites.hh
- *
- * \brief Compute the number of sites of an image or a site set.
- */
+/// \file mln/geom/nsites.hh
+/// Compute the number of sites of an image or a site set.
 
 # include <mln/core/concept/site_set.hh>
 # include <mln/core/concept/image.hh>
@@ -52,7 +50,6 @@ namespace mln
     unsigned nsites(const Image<I>& input);
 
 
-
 # ifndef MLN_INCLUDE_ONLY
 
 
@@ -72,7 +69,7 @@ namespace mln
 	  trace::entering("geom::impl::generic::nsites");
 	  const S& s = exact(s_);
 	  mln_precondition(s.is_valid());
-	  
+
 	  unsigned n = 0;
 	  mln_piter(S) p(s);
 	  for_all(p)
@@ -80,7 +77,7 @@ namespace mln
 
 	  trace::exiting("geom::impl::generic::nsites");
 	  return n;
-	}      
+	}
 
       } // end of namespace mln::geom::impl::generic
 
@@ -112,7 +109,7 @@ namespace mln
 			       const Site_Set<S>& s)
       {
 	return impl::generic::nsites(s);
-      }      
+      }
 
       template <typename S>
       inline
@@ -120,7 +117,7 @@ namespace mln
 			       const Site_Set<S>& s)
       {
 	return impl::nsites_method(s);
-      }      
+      }
 
       // Dispatch facade.
 
@@ -130,12 +127,12 @@ namespace mln
       {
 	return nsites_dispatch(mln_trait_site_set_nsites(S)(),
 			       s);
-      }      
+      }
 
     } // end of namespace mln::geom::internal
 
 
-    
+
     // Facades.
 
     template <typename S>
diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh
index 2f8a7e0..ef1aad8 100644
--- a/milena/mln/topo/n_face.hh
+++ b/milena/mln/topo/n_face.hh
@@ -99,7 +99,7 @@ namespace mln
 
       /* FIXME: We should not provide lower_dim_adj_faces() when N ==
 	 0 nor higher_dim_adj_faces() when N == D.  */
-      /// \Return an array of face handles pointing to adjacent (n-1)-faces.
+      /// Return an array of face handles pointing to adjacent (n-1)-faces.
       std::vector< algebraic_n_face<N - 1, D> > lower_dim_adj_faces() const;
       /// Return an array of face handles pointing to adjacent (n+1)-faces.
       std::vector< algebraic_n_face<N + 1, D> > higher_dim_adj_faces() const;
diff --git a/milena/mln/util/internal/graph_nbh_iter.hh b/milena/mln/util/internal/graph_nbh_iter.hh
index 9b7aa3a..e43c5ea 100644
--- a/milena/mln/util/internal/graph_nbh_iter.hh
+++ b/milena/mln/util/internal/graph_nbh_iter.hh
@@ -31,7 +31,7 @@
 # include <mln/core/concept/proxy.hh>
 # include <mln/util/internal/graph_nbh_iter_base.hh>
 
-/// \file   mln/util/internal/graph_vertex_nbh_vertex_iter.hh
+/// \file   mln/util/internal/graph_nbh_iter.hh
 /// \brief  Implementation for graph vertex iterators centered to a vertex.
 
 namespace mln
diff --git a/milena/tests/core/site_set/p_complex.cc b/milena/tests/core/site_set/p_complex.cc
index 490d387..0f84118 100644
--- a/milena/tests/core/site_set/p_complex.cc
+++ b/milena/tests/core/site_set/p_complex.cc
@@ -25,7 +25,7 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/// \file tests/core/image/p_complex.cc
+/// \file tests/core/site_set/p_complex.cc
 /// \brief Test of mln::p_complex and mln::geom::complex_geometry.
 
 #include <algorithm>
diff --git a/milena/tests/morpho/complex_image_wst.cc b/milena/tests/morpho/complex_image_wst.cc
index 8060cee..f6aab30 100644
--- a/milena/tests/morpho/complex_image_wst.cc
+++ b/milena/tests/morpho/complex_image_wst.cc
@@ -25,7 +25,7 @@
 // reasons why the executable file might be covered by the GNU General
 // Public License.
 
-/// \file tests/core/image/complex_image_swt.cc
+/// \file tests/morpho/complex_image_swt.cc
 /// \brief Testing Meyer's Watershed Transform on mln::complex_image.
 
 #include <iostream>
-- 
1.5.6.5
                    
                  
                  
                          
                            
                            1
                            
                          
                          
                            
                            0