https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Have doc examples tuto_bis work again.
* doc/examples/tuto_bis.cc (domain): New variable.
* mln/morpho/gradient.hh: Upgrade doc style.
Augment doc.
* mln/morpho/general.spe.hh
(general_dispatch_wrt_win): Fix missing argument.
doc/examples/tuto_bis.cc | 8 ++++----
mln/morpho/general.spe.hh | 4 ++--
mln/morpho/gradient.hh | 42 +++++++++++++++++++++++-------------------
3 files changed, 29 insertions(+), 25 deletions(-)
Index: doc/examples/tuto_bis.cc
--- doc/examples/tuto_bis.cc (revision 2974)
+++ doc/examples/tuto_bis.cc (working copy)
@@ -139,9 +139,9 @@
mln_VAR( e2e, make::double_neighb2d(is_row_odd, e2e_h, e2e_v) );
-
- image2d<unsigned> ima_(3, 5);
- mln_VAR(ima, ima_ | ima_.domain());
+ box2d domain(3, 5);
+ image2d<unsigned> ima_(domain);
+ mln_VAR(ima, ima_ | domain);
mln_VAR(cell, ima | is_cell);
level::fill(cell, fun::p2v::iota());
@@ -160,7 +160,7 @@
// 3 3 3
// 1 1
- image2d<unsigned> label(ima.bbox(), 0);
+ image2d<unsigned> label(domain, 0);
level::fill(label, 9);
debug::println(label);
// 9 9 9 9 9
Index: mln/morpho/gradient.hh
--- mln/morpho/gradient.hh (revision 2974)
+++ mln/morpho/gradient.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,12 +29,16 @@
#ifndef MLN_MORPHO_GRADIENT_HH
# define MLN_MORPHO_GRADIENT_HH
-/*! \file mln/morpho/gradient.hh
- *
- * \brief Morphological gradient.
- *
- * \todo Save memory.
- */
+/// \file mln/morpho/gradient.hh
+///
+/// Morphological gradient.
+///
+/// It is based on dilation and erosion so that handling side effects
+/// (with extension domains) is easy. It does *not* rely on
+/// morpho::general (what the extension initialization would be in
+/// that case?!)
+///
+/// \todo Save memory.
# include <mln/morpho/includes.hh>
@@ -44,32 +49,31 @@
namespace morpho
{
- /*! Morphological gradient.
- *
- * This operator is d_B - e_B.
- */
+ /// Morphological gradient.
+ ///
+ /// This operator is d_B - e_B.
template <typename I, typename W>
mln_concrete(I) gradient(const Image<I>& input, const Window<W>&
win);
- /*! Morphological internal gradient.
- *
- * This operator is Id - e_B.
- */
+ /// Morphological internal gradient.
+ ///
+ /// This operator is Id - e_B.
template <typename I, typename W>
mln_concrete(I) gradient_internal(const Image<I>& input, const
Window<W>& win);
- /*! Morphological external gradient.
- *
- * This operator is d_B - Id.
- */
+ /// Morphological external gradient.
+ ///
+ /// This operator is d_B - Id.
template <typename I, typename W>
mln_concrete(I) gradient_external(const Image<I>& input, const
Window<W>& win);
+
# ifndef MLN_INCLUDE_ONLY
+
template <typename I, typename W>
inline
mln_concrete(I) gradient(const Image<I>& input, const Window<W>&
win)
Index: mln/morpho/general.spe.hh
--- mln/morpho/general.spe.hh (revision 2974)
+++ mln/morpho/general.spe.hh (working copy)
@@ -338,7 +338,7 @@
template <typename Op, typename I, typename W>
mln_concrete(I)
- general_dispatch_wrt_win(const I& input, const W& win)
+ general_dispatch_wrt_win(const Op& op, const I& input, const W& win)
{
// FIXME:
// The test "win.size() >= 10" (size is not too small) has been
@@ -353,7 +353,7 @@
mlc_not_equal(mln_trait_image_value_storage(I),
trait::image::value_storage::disrupted)::value };
return general_dispatch_wrt_arbitrary_win(metal::bool_<test>(),
- input, win);
+ op, input, win);
}