https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
More uses of literal::zero in mln::labeling and mln::morpho.
* mln/canvas/labeling.hh (mln::canvas::labeling<F>::init)
* mln/morpho/meyer_wst.hh (mln::morpho::meyer_wst):
Use mln::literal::zero instead of plain 0.
* mln/labeling/regional_maxima.hh,
* mln/labeling/regional_minima.hh:
Add a FIXME (see
https://trac.lrde.org/olena/ticket/146).
canvas/labeling.hh | 11 +++++------
labeling/regional_maxima.hh | 11 ++++++-----
labeling/regional_minima.hh | 11 ++++++-----
morpho/meyer_wst.hh | 5 ++---
4 files changed, 19 insertions(+), 19 deletions(-)
Index: mln/canvas/labeling.hh
--- mln/canvas/labeling.hh (revision 2080)
+++ mln/canvas/labeling.hh (working copy)
@@ -28,14 +28,13 @@
#ifndef MLN_CANVAS_LABELING_HH
# define MLN_CANVAS_LABELING_HH
-/*! \file mln/canvas/labeling.hh
- *
- * \brief Connected component labeling of the object part in a binary
- * image.
- */
+/// \file mln/canvas/labeling.hh
+/// \brief Connected component labeling of the object part in a binary
+/// image.
# include <mln/core/concept/image.hh>
# include <mln/level/fill.hh>
+# include <mln/literal/zero.hh>
# include <mln/convert/to_upper_window.hh>
@@ -160,7 +159,7 @@
mln::level::fill(deja_vu, false);
initialize(parent, f.input);
initialize(output, f.input);
- mln::level::fill(output, 0); // FIXME: Use literal::zero.
+ mln::level::fill(output, literal::zero);
nlabels = 0;
}
Index: mln/morpho/meyer_wst.hh
--- mln/morpho/meyer_wst.hh (revision 2080)
+++ mln/morpho/meyer_wst.hh (working copy)
@@ -46,10 +46,10 @@
// FIXME: See below.
# include <mln/util/greater_psite.hh>
# include <mln/morpho/includes.hh>
+# include <mln/literal/zero.hh>
# include <mln/labeling/regional_minima.hh>
-
namespace mln
{
@@ -110,8 +110,7 @@
/* FIXME: Ensure the input image has scalar values. */
typedef L marker;
- // FIXME: Use literal::zero.
- const marker unmarked = 0;
+ const marker unmarked = literal::zero;
// Initialize the output with the markers (minima components).
mln_ch_value(I, marker) output =
Index: mln/labeling/regional_maxima.hh
--- mln/labeling/regional_maxima.hh (revision 2080)
+++ mln/labeling/regional_maxima.hh (working copy)
@@ -28,11 +28,9 @@
#ifndef MLN_LABELING_REGIONAL_MAXIMA_HH
# define MLN_LABELING_REGIONAL_MAXIMA_HH
-/*! \file mln/labeling/regional_maxima.hh
- *
- * \brief Connected component labeling of the regional maxima of an
- * image.
- */
+/// \file mln/labeling/regional_maxima.hh
+/// \brief Connected component labeling of the regional maxima of an
+/// image.
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
@@ -124,6 +122,9 @@
{
trace::entering("labeling::impl::generic::regional_maxima_");
+ // FIXME: abort if L is not wide enough to encode the set of
+ // maxima.
+
typedef impl::regional_maxima_functor<I,N,L> F;
F f(input, nbh);
canvas::labeling<F> run(f);
Index: mln/labeling/regional_minima.hh
--- mln/labeling/regional_minima.hh (revision 2080)
+++ mln/labeling/regional_minima.hh (working copy)
@@ -28,11 +28,9 @@
#ifndef MLN_LABELING_REGIONAL_MINIMA_HH
# define MLN_LABELING_REGIONAL_MINIMA_HH
-/*! \file mln/labeling/regional_minima.hh
- *
- * \brief Connected component labeling of the regional minima of an
- * image.
- */
+/// \file mln/labeling/regional_minima.hh
+/// \brief Connected component labeling of the regional minima of an
+/// image.
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
@@ -122,6 +120,9 @@
{
trace::entering("labeling::impl::generic::regional_minima_");
+ // FIXME: abort if L is not wide enough to encode the set of
+ // minima.
+
typedef impl::regional_minima_functor<I,N,L> F;
F f(input, nbh);
canvas::labeling<F> run(f);