* headers.mk: update dist headers.
* mln/canvas/morpho/all.hh: remove non existing included headers.
* mln/morpho/tree/compute_attribute_image.hh,
* mln/canvas/morpho/attribute_filter.hh: add missing include.
* tests/core/image/plain.cc
* mln/level/compare.hh,
* mln/core/pixter2d.hh: add more preconditions.
* mln/io/dicom/load.hh: update doc.
* mln/morpho/essential.hh,
* mln/morpho/all.hh,
* mln/morpho/closing/algebraic.hh: revamp.
* mln/morpho/closing/all.hh,
* mln/morpho/closing/essential.hh,
* mln/morpho/opening/all.hh,
* mln/morpho/opening/essential.hh: new files.
* tests/unit_test/unit-tests.mk: update test list.
---
milena/ChangeLog | 28 ++++++++
milena/headers.mk | 37 ++++++----
milena/mln/canvas/morpho/all.hh | 4 +-
milena/mln/canvas/morpho/attribute_filter.hh | 2 +
milena/mln/core/pixter2d.hh | 3 +
milena/mln/io/dicom/load.hh | 24 +++----
milena/mln/level/compare.hh | 2 +
milena/mln/morpho/all.hh | 4 +-
milena/mln/morpho/closing/algebraic.hh | 57 +++++++++-------
.../mln/{canvas/morpho => morpho/closing}/all.hh | 37 ++++------
.../morpho/all.hh => morpho/closing/essential.hh} | 36 +++------
milena/mln/morpho/essential.hh | 4 +-
.../mln/{canvas/morpho => morpho/opening}/all.hh | 37 ++++------
.../morpho/all.hh => morpho/opening/essential.hh} | 36 +++------
milena/mln/morpho/tree/compute_attribute_image.hh | 8 ++-
milena/tests/core/image/plain.cc | 2 +
milena/tests/unit_test/unit-tests.mk | 74 ++++++++++++--------
17 files changed, 208 insertions(+), 187 deletions(-)
copy milena/mln/{canvas/morpho => morpho/closing}/all.hh (67%)
copy milena/mln/{canvas/morpho/all.hh => morpho/closing/essential.hh} (67%)
copy milena/mln/{canvas/morpho => morpho/opening}/all.hh (67%)
copy milena/mln/{canvas/morpho/all.hh => morpho/opening/essential.hh} (67%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 39e6faa..e894701 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,31 @@
+2009-03-02 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Small fixes.
+
+ * headers.mk: update dist headers.
+
+ * mln/canvas/morpho/all.hh: remove non existing included headers.
+
+ * mln/morpho/tree/compute_attribute_image.hh,
+ * mln/canvas/morpho/attribute_filter.hh: add missing include.
+
+ * tests/core/image/plain.cc
+ * mln/level/compare.hh,
+ * mln/core/pixter2d.hh: add more preconditions.
+
+ * mln/io/dicom/load.hh: update doc.
+
+ * mln/morpho/essential.hh,
+ * mln/morpho/all.hh,
+ * mln/morpho/closing/algebraic.hh: revamp.
+
+ * mln/morpho/closing/all.hh,
+ * mln/morpho/closing/essential.hh,
+ * mln/morpho/opening/all.hh,
+ * mln/morpho/opening/essential.hh: new files.
+
+ * tests/unit_test/unit-tests.mk: update test list.
+
2009-03-01 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Make area_on_vertices work with new algebraic code [POST-RUSH].
diff --git a/milena/headers.mk b/milena/headers.mk
index 6460d8f..e37427e 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -359,6 +359,7 @@ mln/value/int_s.hh \
mln/value/rgb8.hh \
mln/value/int_s32.hh \
mln/value/float01_.hh \
+mln/value/int_u12.hh \
mln/value/rgb16.hh \
mln/value/int_u32.hh \
mln/value/gl8.hh \
@@ -534,9 +535,7 @@ mln/canvas/all.hh \
mln/canvas/distance_front.hh \
mln/canvas/morpho/internal/find_root.hh \
mln/canvas/morpho/all.hh \
-mln/canvas/morpho/connected_filter.hh \
-mln/canvas/morpho/algebraic_filter.hh \
-mln/canvas/morpho/algebraic_union_find.hh \
+mln/canvas/morpho/attribute_filter.hh \
mln/canvas/morpho/essential.hh \
mln/canvas/essential.hh \
mln/metal/is_const.hh \
@@ -623,29 +622,39 @@ mln/morpho/skeleton_constrained.hh \
mln/morpho/complementation.hh \
mln/morpho/line_gradient.hh \
mln/morpho/hit_or_miss.hh \
-mln/morpho/closing_height.hh \
mln/morpho/plus.hh \
mln/morpho/general.hh \
mln/morpho/internal/elementary.hh \
mln/morpho/contrast.hh \
-mln/morpho/opening_area.hh \
-mln/morpho/opening_height.hh \
mln/morpho/thickening.hh \
mln/morpho/dilation.hh \
+mln/morpho/closing/all.hh \
+mln/morpho/closing/algebraic.hh \
+mln/morpho/closing/leveling.hh \
+mln/morpho/closing/area_on_vertices.hh \
+mln/morpho/closing/area.hh \
+mln/morpho/closing/volume.hh \
+mln/morpho/closing/height.hh \
+mln/morpho/closing/essential.hh \
mln/morpho/laplacian.hh \
mln/morpho/all.hh \
-mln/morpho/opening_algebraic.hh \
-mln/morpho/opening_attribute.hh \
-mln/morpho/opening_volume.hh \
-mln/morpho/closing_algebraic.hh \
mln/morpho/watershed/flooding.hh \
mln/morpho/watershed/all.hh \
-mln/morpho/closing_area_on_vertices.hh \
-mln/morpho/closing_volume.hh \
+mln/morpho/opening/all.hh \
+mln/morpho/opening/algebraic.hh \
+mln/morpho/opening/leveling.hh \
+mln/morpho/opening/area_on_vertices.hh \
+mln/morpho/opening/area.hh \
+mln/morpho/opening/volume.hh \
+mln/morpho/opening/height.hh \
+mln/morpho/opening/essential.hh \
mln/morpho/attribute/all.hh \
mln/morpho/attribute/volume.hh \
mln/morpho/attribute/sum.hh \
+mln/morpho/attribute/height.hh \
+mln/morpho/attribute/sharpness.hh \
mln/morpho/attribute/card.hh \
+mln/morpho/attribute/count_adjacent_vertices.hh \
mln/morpho/minus.hh \
mln/morpho/gradient.hh \
mln/morpho/tree/max.hh \
@@ -654,16 +663,16 @@ mln/morpho/tree/all.hh \
mln/morpho/tree/utils.hh \
mln/morpho/tree/data.hh \
mln/morpho/tree/compute_attribute_image.hh \
-mln/morpho/opening_area_on_vertices.hh \
mln/morpho/general.spe.hh \
mln/morpho/min.hh \
mln/morpho/closing.hh \
mln/morpho/top_hat.hh \
mln/morpho/erosion.hh \
+mln/morpho/leveling_filter.hh \
mln/morpho/closing_sum.hh \
mln/morpho/Rd.hh \
-mln/morpho/closing_area.hh \
mln/morpho/thick_miss.hh \
+mln/morpho/algebraic_filter.hh \
mln/morpho/closing_attribute.hh \
mln/morpho/rank_filter.hh \
mln/morpho/essential.hh \
diff --git a/milena/mln/canvas/morpho/all.hh b/milena/mln/canvas/morpho/all.hh
index 5720829..2cd3dd0 100644
--- a/milena/mln/canvas/morpho/all.hh
+++ b/milena/mln/canvas/morpho/all.hh
@@ -47,9 +47,7 @@ namespace mln
# include <mln/canvas/morpho/internal/find_root.hh>
-# include <mln/canvas/morpho/algebraic_filter.hh>
-# include <mln/canvas/morpho/algebraic_union_find.hh>
-//# include <mln/canvas/morpho/connected_filter.hh>
+# include <mln/canvas/morpho/attribute_filter.hh>
#endif // ! MLN_CANVAS_MORPHO_ALL_HH
diff --git a/milena/mln/canvas/morpho/attribute_filter.hh
b/milena/mln/canvas/morpho/attribute_filter.hh
index 8365271..e605f18 100644
--- a/milena/mln/canvas/morpho/attribute_filter.hh
+++ b/milena/mln/canvas/morpho/attribute_filter.hh
@@ -38,6 +38,8 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/concept/accumulator.hh>
+# include <mln/level/sort_offsets.hh>
+
# include <mln/trait/accumulators.hh>
# include <mln/util/pix.hh>
diff --git a/milena/mln/core/pixter2d.hh b/milena/mln/core/pixter2d.hh
index 93e43d8..32ea19e 100644
--- a/milena/mln/core/pixter2d.hh
+++ b/milena/mln/core/pixter2d.hh
@@ -136,6 +136,8 @@ namespace mln
row_offset_(image.bbox().ncols() + border_x2_)
{
mln_precondition(image.is_valid());
+ mln_precondition(image_.is_valid());
+ mln_precondition(image_.buffer() == image.buffer());
}
template <typename I>
@@ -156,6 +158,7 @@ namespace mln
void
fwd_pixter2d<I>::start_()
{
+ mln_precondition(image_.is_valid());
eor_ = & opt::at(image_, geom::min_row(image_), geom::max_col(image_)) + 1;
}
diff --git a/milena/mln/io/dicom/load.hh b/milena/mln/io/dicom/load.hh
index 491e207..b41eddb 100644
--- a/milena/mln/io/dicom/load.hh
+++ b/milena/mln/io/dicom/load.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory
+// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,13 +28,10 @@
#ifndef MLN_IO_DICOM_LOAD_HH
# define MLN_IO_DICOM_LOAD_HH
-/*!
- * \file mln/io/magick/load.hh
- *
- * \brief Define a function which loads an image of kind magick with
- * given path.
- *
- */
+/// \file mln/io/magick/load.hh
+///
+/// \brief Define a function which loads an image of kind magick with
+/// given path.
# include <mln/core/image/image2d.hh>
# include <mln/core/image/image3d.hh>
@@ -57,12 +54,11 @@ namespace mln
namespace dicom
{
- /*! Load a dicom image in a Milena image.
- *
- * \param[out] ima A reference to the image which will receive
- * data.
- * \param[in] filename The source.
- */
+ /// Load a dicom image in a Milena image.
+ ///
+ /// \param[out] ima A reference to the image which will receive
+ /// data.
+ /// \param[in] filename The source.
template <typename I>
void load(Image<I>& ima,
const std::string& filename);
diff --git a/milena/mln/level/compare.hh b/milena/mln/level/compare.hh
index 44f4202..f9390ab 100644
--- a/milena/mln/level/compare.hh
+++ b/milena/mln/level/compare.hh
@@ -90,6 +90,8 @@ namespace mln
const L& lhs = exact(lhs_);
const R& rhs = exact(rhs_);
+ mln_precondition(lhs.is_valid());
+ mln_precondition(rhs.is_valid());
mln_precondition(lhs.domain() == rhs.domain());
return test::predicate(lhs_, rhs_, F());
diff --git a/milena/mln/morpho/all.hh b/milena/mln/morpho/all.hh
index 5db9619..11ec6b3 100644
--- a/milena/mln/morpho/all.hh
+++ b/milena/mln/morpho/all.hh
@@ -57,7 +57,6 @@ namespace mln
# include <mln/morpho/closing.hh>
-# include <mln/morpho/closing/all.hh>
# include <mln/morpho/complementation.hh>
# include <mln/morpho/contrast.hh>
# include <mln/morpho/dilation.hh>
@@ -71,7 +70,6 @@ namespace mln
# include <mln/morpho/min.hh>
# include <mln/morpho/minus.hh>
# include <mln/morpho/opening.hh>
-# include <mln/morpho/opening/all.hh>
# include <mln/morpho/plus.hh>
# include <mln/morpho/Rd.hh>
# include <mln/morpho/rank_filter.hh>
@@ -85,7 +83,9 @@ namespace mln
// Sub-directories.
# include <mln/morpho/attribute/all.hh>
+# include <mln/morpho/closing/all.hh>
# include <mln/morpho/elementary/all.hh>
+# include <mln/morpho/opening/all.hh>
# include <mln/morpho/tree/all.hh>
# include <mln/morpho/watershed/all.hh>
diff --git a/milena/mln/morpho/closing/algebraic.hh
b/milena/mln/morpho/closing/algebraic.hh
index 2b6258b..eb7e9d2 100644
--- a/milena/mln/morpho/closing/algebraic.hh
+++ b/milena/mln/morpho/closing/algebraic.hh
@@ -37,15 +37,20 @@
# include <mln/morpho/algebraic_filter.hh>
-namespace mln {
- namespace morpho {
- namespace closing {
+namespace mln
+{
- /// Morphological algebraic closing.
- template <typename I, typename N, typename A>
- mln_concrete(I)
- algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
- const Accumulator<A>& accu, const mln_result(A)& lambda);
+ namespace morpho
+ {
+
+ namespace closing
+ {
+
+ /// Morphological algebraic closing.
+ template <typename I, typename N, typename A>
+ mln_concrete(I)
+ algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
+ const Accumulator<A>& accu, const mln_result(A)& lambda);
@@ -53,33 +58,35 @@ namespace mln {
# ifndef MLN_INCLUDE_ONLY
- template <typename I, typename N, typename A>
- inline
- mln_concrete(I)
- algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
- const Accumulator<A>& accu, const mln_result(A)& lambda)
- {
- trace::entering("morpho::closing::algebraic");
+ template <typename I, typename N, typename A>
+ inline
+ mln_concrete(I)
+ algebraic(const Image<I>& input, const Neighborhood<N>& nbh,
+ const Accumulator<A>& accu, const mln_result(A)& lambda)
+ {
+ trace::entering("morpho::closing::algebraic");
- mln_precondition(exact(input).is_valid());
- mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A),
- trait::accumulator::when_pix::not_ok)::value);
+ mln_precondition(exact(input).is_valid());
+ mln_precondition(mlc_not_equal(mln_trait_accumulator_when_pix(A),
+ trait::accumulator::when_pix::not_ok)::value);
- mln_concrete(I) output;
- output = algebraic_filter(input, nbh, accu, lambda,
- /* increasing = */ true);
+ mln_concrete(I) output;
+ output = algebraic_filter(input, nbh, accu, lambda,
+ /* increasing = */ true);
- mln_postcondition(output >= input);
+ mln_postcondition(output >= input);
- trace::exiting("morpho::closing::algebraic");
- return output;
- }
+ trace::exiting("morpho::closing::algebraic");
+ return output;
+ }
# endif // ! MLN_INCLUDE_ONLY
} // end of namespace mln::morpho::closing
+
} // end of namespace mln::morpho
+
} // end of namespace mln
diff --git a/milena/mln/canvas/morpho/all.hh b/milena/mln/morpho/closing/all.hh
similarity index 67%
copy from milena/mln/canvas/morpho/all.hh
copy to milena/mln/morpho/closing/all.hh
index 5720829..8378d17 100644
--- a/milena/mln/canvas/morpho/all.hh
+++ b/milena/mln/morpho/closing/all.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,30 +26,19 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_CANVAS_MORPHO_ALL_HH
-# define MLN_CANVAS_MORPHO_ALL_HH
+#ifndef MLN_MORPHO_CLOSING_ALL_HH
+# define MLN_MORPHO_CLOSING_ALL_HH
-/// \file mln/canvas/morpho/all.hh
+/// \file mln/morpho/closing/all.hh
///
-/// File that includes morphological canvas-related routines.
+/// File that includes all closing attributes.
+#include <mln/morpho/closing/algebraic.hh>
+#include <mln/morpho/closing/leveling.hh>
+#include <mln/morpho/closing/area_on_vertices.hh>
+#include <mln/morpho/closing/area.hh>
+#include <mln/morpho/closing/volume.hh>
+#include <mln/morpho/closing/height.hh>
-namespace mln
-{
- namespace canvas
- {
+#endif // ! MLN_MORPHO_CLOSING_ALL_HH
- /// Namespace of morphological canvas.
- namespace morpho {}
-
- }
-}
-
-
-# include <mln/canvas/morpho/internal/find_root.hh>
-# include <mln/canvas/morpho/algebraic_filter.hh>
-# include <mln/canvas/morpho/algebraic_union_find.hh>
-//# include <mln/canvas/morpho/connected_filter.hh>
-
-
-#endif // ! MLN_CANVAS_MORPHO_ALL_HH
diff --git a/milena/mln/canvas/morpho/all.hh b/milena/mln/morpho/closing/essential.hh
similarity index 67%
copy from milena/mln/canvas/morpho/all.hh
copy to milena/mln/morpho/closing/essential.hh
index 5720829..a478a2c 100644
--- a/milena/mln/canvas/morpho/all.hh
+++ b/milena/mln/morpho/closing/essential.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,30 +26,18 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_CANVAS_MORPHO_ALL_HH
-# define MLN_CANVAS_MORPHO_ALL_HH
+#ifndef MLN_MORPHO_CLOSING_ESSENTIAL_HH
+# define MLN_MORPHO_CLOSING_ESSENTIAL_HH
-/// \file mln/canvas/morpho/all.hh
+/// \file mln/morpho/closing/all.hh
///
-/// File that includes morphological canvas-related routines.
+/// File that includes essential closing attributes.
+#include <mln/morpho/closing/algebraic.hh>
+#include <mln/morpho/closing/leveling.hh>
+#include <mln/morpho/closing/area.hh>
+#include <mln/morpho/closing/volume.hh>
+#include <mln/morpho/closing/height.hh>
-namespace mln
-{
- namespace canvas
- {
+#endif // ! MLN_MORPHO_CLOSING_ESSENTIAL_HH
- /// Namespace of morphological canvas.
- namespace morpho {}
-
- }
-}
-
-
-# include <mln/canvas/morpho/internal/find_root.hh>
-# include <mln/canvas/morpho/algebraic_filter.hh>
-# include <mln/canvas/morpho/algebraic_union_find.hh>
-//# include <mln/canvas/morpho/connected_filter.hh>
-
-
-#endif // ! MLN_CANVAS_MORPHO_ALL_HH
diff --git a/milena/mln/morpho/essential.hh b/milena/mln/morpho/essential.hh
index 6c45cc0..d16fcce 100644
--- a/milena/mln/morpho/essential.hh
+++ b/milena/mln/morpho/essential.hh
@@ -41,12 +41,12 @@
# include <mln/morpho/includes.hh>
# include <mln/morpho/laplacian.hh>
# include <mln/morpho/meyer_wst.hh>
-# include <mln/morpho/opening/area.hh>
-# include <mln/morpho/opening/attribute.hh>
# include <mln/morpho/opening.hh>
# include <mln/morpho/rank_filter.hh>
# include <mln/morpho/top_hat.hh>
+# include <mln/morpho/opening/essential.hh>
+# include <mln/morpho/closing/essential.hh>
# include <mln/morpho/elementary/essential.hh>
diff --git a/milena/mln/canvas/morpho/all.hh b/milena/mln/morpho/opening/all.hh
similarity index 67%
copy from milena/mln/canvas/morpho/all.hh
copy to milena/mln/morpho/opening/all.hh
index 5720829..ee35281 100644
--- a/milena/mln/canvas/morpho/all.hh
+++ b/milena/mln/morpho/opening/all.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,30 +26,19 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_CANVAS_MORPHO_ALL_HH
-# define MLN_CANVAS_MORPHO_ALL_HH
+#ifndef MLN_MORPHO_OPENING_ALL_HH
+# define MLN_MORPHO_OPENING_ALL_HH
-/// \file mln/canvas/morpho/all.hh
+/// \file mln/morpho/opening/all.hh
///
-/// File that includes morphological canvas-related routines.
+/// File that includes all opening attributes.
+#include <mln/morpho/opening/algebraic.hh>
+#include <mln/morpho/opening/leveling.hh>
+#include <mln/morpho/opening/area_on_vertices.hh>
+#include <mln/morpho/opening/area.hh>
+#include <mln/morpho/opening/volume.hh>
+#include <mln/morpho/opening/height.hh>
-namespace mln
-{
- namespace canvas
- {
+#endif // ! MLN_MORPHO_OPENING_ALL_HH
- /// Namespace of morphological canvas.
- namespace morpho {}
-
- }
-}
-
-
-# include <mln/canvas/morpho/internal/find_root.hh>
-# include <mln/canvas/morpho/algebraic_filter.hh>
-# include <mln/canvas/morpho/algebraic_union_find.hh>
-//# include <mln/canvas/morpho/connected_filter.hh>
-
-
-#endif // ! MLN_CANVAS_MORPHO_ALL_HH
diff --git a/milena/mln/canvas/morpho/all.hh b/milena/mln/morpho/opening/essential.hh
similarity index 67%
copy from milena/mln/canvas/morpho/all.hh
copy to milena/mln/morpho/opening/essential.hh
index 5720829..45fbdae 100644
--- a/milena/mln/canvas/morpho/all.hh
+++ b/milena/mln/morpho/opening/essential.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -26,30 +26,18 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_CANVAS_MORPHO_ALL_HH
-# define MLN_CANVAS_MORPHO_ALL_HH
+#ifndef MLN_MORPHO_OPENING_ESSENTIAL_HH
+# define MLN_MORPHO_OPENING_ESSENTIAL_HH
-/// \file mln/canvas/morpho/all.hh
+/// \file mln/morpho/opening/all.hh
///
-/// File that includes morphological canvas-related routines.
+/// File that includes essential opening attributes.
+#include <mln/morpho/opening/algebraic.hh>
+#include <mln/morpho/opening/leveling.hh>
+#include <mln/morpho/opening/area.hh>
+#include <mln/morpho/opening/volume.hh>
+#include <mln/morpho/opening/height.hh>
-namespace mln
-{
- namespace canvas
- {
+#endif // ! MLN_MORPHO_OPENING_ESSENTIAL_HH
- /// Namespace of morphological canvas.
- namespace morpho {}
-
- }
-}
-
-
-# include <mln/canvas/morpho/internal/find_root.hh>
-# include <mln/canvas/morpho/algebraic_filter.hh>
-# include <mln/canvas/morpho/algebraic_union_find.hh>
-//# include <mln/canvas/morpho/connected_filter.hh>
-
-
-#endif // ! MLN_CANVAS_MORPHO_ALL_HH
diff --git a/milena/mln/morpho/tree/compute_attribute_image.hh
b/milena/mln/morpho/tree/compute_attribute_image.hh
index a877cb8..0514fef 100644
--- a/milena/mln/morpho/tree/compute_attribute_image.hh
+++ b/milena/mln/morpho/tree/compute_attribute_image.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -35,6 +36,7 @@
/// \todo Specialize for low quant (and try fastest).
# include <mln/core/concept/image.hh>
+# include <mln/trait/accumulators.hh>
# include <mln/util/pix.hh>
# include <mln/data/fill.hh>
@@ -67,7 +69,7 @@ namespace mln
template <typename A, typename T>
mln_ch_value(typename T::function, mln_result(A))
- compute_attribute_image(const Accumulator<A>& a, const T& t);
+ compute_attribute_image(const Accumulator<A>& a, const T& t);
@@ -118,7 +120,7 @@ namespace mln
template <typename A, typename T>
inline
mln_ch_value(typename T::function, mln_result(A))
- compute_attribute_image(const Accumulator<A>& a_, const T& t)
+ compute_attribute_image(const Accumulator<A>& a_, const T& t)
{
trace::entering("morpho::tree::compute_attribute_image");
diff --git a/milena/tests/core/image/plain.cc b/milena/tests/core/image/plain.cc
index 087362f..b963b1b 100644
--- a/milena/tests/core/image/plain.cc
+++ b/milena/tests/core/image/plain.cc
@@ -62,6 +62,8 @@ int main()
ima(point2d(0,0)) = 124;
+ mln_assertion(exact(ima).is_valid());
+ mln_assertion(exact(lena).is_valid());
mln_assertion(ima != lena);
ima2 = lena;
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 055ede1..53cd03f 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -354,6 +354,7 @@ mln_value_int_s \
mln_value_rgb8 \
mln_value_int_s32 \
mln_value_float01_ \
+mln_value_int_u12 \
mln_value_rgb16 \
mln_value_int_u32 \
mln_value_gl8 \
@@ -527,9 +528,7 @@ mln_canvas_all \
mln_canvas_distance_front \
mln_canvas_morpho_internal_find_root \
mln_canvas_morpho_all \
-mln_canvas_morpho_connected_filter \
-mln_canvas_morpho_algebraic_filter \
-mln_canvas_morpho_algebraic_union_find \
+mln_canvas_morpho_attribute_filter \
mln_canvas_morpho_essential \
mln_canvas_essential \
mln_metal_is_const \
@@ -616,29 +615,39 @@ mln_morpho_skeleton_constrained \
mln_morpho_complementation \
mln_morpho_line_gradient \
mln_morpho_hit_or_miss \
-mln_morpho_closing_height \
mln_morpho_plus \
mln_morpho_general \
mln_morpho_internal_elementary \
mln_morpho_contrast \
-mln_morpho_opening_area \
-mln_morpho_opening_height \
mln_morpho_thickening \
mln_morpho_dilation \
+mln_morpho_closing_all \
+mln_morpho_closing_algebraic \
+mln_morpho_closing_leveling \
+mln_morpho_closing_area_on_vertices \
+mln_morpho_closing_area \
+mln_morpho_closing_volume \
+mln_morpho_closing_height \
+mln_morpho_closing_essential \
mln_morpho_laplacian \
mln_morpho_all \
-mln_morpho_opening_algebraic \
-mln_morpho_opening_attribute \
-mln_morpho_opening_volume \
-mln_morpho_closing_algebraic \
mln_morpho_watershed_flooding \
mln_morpho_watershed_all \
-mln_morpho_closing_area_on_vertices \
-mln_morpho_closing_volume \
+mln_morpho_opening_all \
+mln_morpho_opening_algebraic \
+mln_morpho_opening_leveling \
+mln_morpho_opening_area_on_vertices \
+mln_morpho_opening_area \
+mln_morpho_opening_volume \
+mln_morpho_opening_height \
+mln_morpho_opening_essential \
mln_morpho_attribute_all \
mln_morpho_attribute_volume \
mln_morpho_attribute_sum \
+mln_morpho_attribute_height \
+mln_morpho_attribute_sharpness \
mln_morpho_attribute_card \
+mln_morpho_attribute_count_adjacent_vertices \
mln_morpho_minus \
mln_morpho_gradient \
mln_morpho_tree_max \
@@ -647,15 +656,15 @@ mln_morpho_tree_all \
mln_morpho_tree_utils \
mln_morpho_tree_data \
mln_morpho_tree_compute_attribute_image \
-mln_morpho_opening_area_on_vertices \
mln_morpho_min \
mln_morpho_closing \
mln_morpho_top_hat \
mln_morpho_erosion \
+mln_morpho_leveling_filter \
mln_morpho_closing_sum \
mln_morpho_Rd \
-mln_morpho_closing_area \
mln_morpho_thick_miss \
+mln_morpho_algebraic_filter \
mln_morpho_closing_attribute \
mln_morpho_rank_filter \
mln_morpho_essential \
@@ -1429,6 +1438,7 @@ mln_value_int_s_SOURCES = mln_value_int_s.cc
mln_value_rgb8_SOURCES = mln_value_rgb8.cc
mln_value_int_s32_SOURCES = mln_value_int_s32.cc
mln_value_float01__SOURCES = mln_value_float01_.cc
+mln_value_int_u12_SOURCES = mln_value_int_u12.cc
mln_value_rgb16_SOURCES = mln_value_rgb16.cc
mln_value_int_u32_SOURCES = mln_value_int_u32.cc
mln_value_gl8_SOURCES = mln_value_gl8.cc
@@ -1602,9 +1612,7 @@ mln_canvas_all_SOURCES = mln_canvas_all.cc
mln_canvas_distance_front_SOURCES = mln_canvas_distance_front.cc
mln_canvas_morpho_internal_find_root_SOURCES = mln_canvas_morpho_internal_find_root.cc
mln_canvas_morpho_all_SOURCES = mln_canvas_morpho_all.cc
-mln_canvas_morpho_connected_filter_SOURCES = mln_canvas_morpho_connected_filter.cc
-mln_canvas_morpho_algebraic_filter_SOURCES = mln_canvas_morpho_algebraic_filter.cc
-mln_canvas_morpho_algebraic_union_find_SOURCES =
mln_canvas_morpho_algebraic_union_find.cc
+mln_canvas_morpho_attribute_filter_SOURCES = mln_canvas_morpho_attribute_filter.cc
mln_canvas_morpho_essential_SOURCES = mln_canvas_morpho_essential.cc
mln_canvas_essential_SOURCES = mln_canvas_essential.cc
mln_metal_is_const_SOURCES = mln_metal_is_const.cc
@@ -1691,29 +1699,39 @@ mln_morpho_skeleton_constrained_SOURCES =
mln_morpho_skeleton_constrained.cc
mln_morpho_complementation_SOURCES = mln_morpho_complementation.cc
mln_morpho_line_gradient_SOURCES = mln_morpho_line_gradient.cc
mln_morpho_hit_or_miss_SOURCES = mln_morpho_hit_or_miss.cc
-mln_morpho_closing_height_SOURCES = mln_morpho_closing_height.cc
mln_morpho_plus_SOURCES = mln_morpho_plus.cc
mln_morpho_general_SOURCES = mln_morpho_general.cc
mln_morpho_internal_elementary_SOURCES = mln_morpho_internal_elementary.cc
mln_morpho_contrast_SOURCES = mln_morpho_contrast.cc
-mln_morpho_opening_area_SOURCES = mln_morpho_opening_area.cc
-mln_morpho_opening_height_SOURCES = mln_morpho_opening_height.cc
mln_morpho_thickening_SOURCES = mln_morpho_thickening.cc
mln_morpho_dilation_SOURCES = mln_morpho_dilation.cc
+mln_morpho_closing_all_SOURCES = mln_morpho_closing_all.cc
+mln_morpho_closing_algebraic_SOURCES = mln_morpho_closing_algebraic.cc
+mln_morpho_closing_leveling_SOURCES = mln_morpho_closing_leveling.cc
+mln_morpho_closing_area_on_vertices_SOURCES = mln_morpho_closing_area_on_vertices.cc
+mln_morpho_closing_area_SOURCES = mln_morpho_closing_area.cc
+mln_morpho_closing_volume_SOURCES = mln_morpho_closing_volume.cc
+mln_morpho_closing_height_SOURCES = mln_morpho_closing_height.cc
+mln_morpho_closing_essential_SOURCES = mln_morpho_closing_essential.cc
mln_morpho_laplacian_SOURCES = mln_morpho_laplacian.cc
mln_morpho_all_SOURCES = mln_morpho_all.cc
-mln_morpho_opening_algebraic_SOURCES = mln_morpho_opening_algebraic.cc
-mln_morpho_opening_attribute_SOURCES = mln_morpho_opening_attribute.cc
-mln_morpho_opening_volume_SOURCES = mln_morpho_opening_volume.cc
-mln_morpho_closing_algebraic_SOURCES = mln_morpho_closing_algebraic.cc
mln_morpho_watershed_flooding_SOURCES = mln_morpho_watershed_flooding.cc
mln_morpho_watershed_all_SOURCES = mln_morpho_watershed_all.cc
-mln_morpho_closing_area_on_vertices_SOURCES = mln_morpho_closing_area_on_vertices.cc
-mln_morpho_closing_volume_SOURCES = mln_morpho_closing_volume.cc
+mln_morpho_opening_all_SOURCES = mln_morpho_opening_all.cc
+mln_morpho_opening_algebraic_SOURCES = mln_morpho_opening_algebraic.cc
+mln_morpho_opening_leveling_SOURCES = mln_morpho_opening_leveling.cc
+mln_morpho_opening_area_on_vertices_SOURCES = mln_morpho_opening_area_on_vertices.cc
+mln_morpho_opening_area_SOURCES = mln_morpho_opening_area.cc
+mln_morpho_opening_volume_SOURCES = mln_morpho_opening_volume.cc
+mln_morpho_opening_height_SOURCES = mln_morpho_opening_height.cc
+mln_morpho_opening_essential_SOURCES = mln_morpho_opening_essential.cc
mln_morpho_attribute_all_SOURCES = mln_morpho_attribute_all.cc
mln_morpho_attribute_volume_SOURCES = mln_morpho_attribute_volume.cc
mln_morpho_attribute_sum_SOURCES = mln_morpho_attribute_sum.cc
+mln_morpho_attribute_height_SOURCES = mln_morpho_attribute_height.cc
+mln_morpho_attribute_sharpness_SOURCES = mln_morpho_attribute_sharpness.cc
mln_morpho_attribute_card_SOURCES = mln_morpho_attribute_card.cc
+mln_morpho_attribute_count_adjacent_vertices_SOURCES =
mln_morpho_attribute_count_adjacent_vertices.cc
mln_morpho_minus_SOURCES = mln_morpho_minus.cc
mln_morpho_gradient_SOURCES = mln_morpho_gradient.cc
mln_morpho_tree_max_SOURCES = mln_morpho_tree_max.cc
@@ -1722,15 +1740,15 @@ mln_morpho_tree_all_SOURCES = mln_morpho_tree_all.cc
mln_morpho_tree_utils_SOURCES = mln_morpho_tree_utils.cc
mln_morpho_tree_data_SOURCES = mln_morpho_tree_data.cc
mln_morpho_tree_compute_attribute_image_SOURCES =
mln_morpho_tree_compute_attribute_image.cc
-mln_morpho_opening_area_on_vertices_SOURCES = mln_morpho_opening_area_on_vertices.cc
mln_morpho_min_SOURCES = mln_morpho_min.cc
mln_morpho_closing_SOURCES = mln_morpho_closing.cc
mln_morpho_top_hat_SOURCES = mln_morpho_top_hat.cc
mln_morpho_erosion_SOURCES = mln_morpho_erosion.cc
+mln_morpho_leveling_filter_SOURCES = mln_morpho_leveling_filter.cc
mln_morpho_closing_sum_SOURCES = mln_morpho_closing_sum.cc
mln_morpho_Rd_SOURCES = mln_morpho_Rd.cc
-mln_morpho_closing_area_SOURCES = mln_morpho_closing_area.cc
mln_morpho_thick_miss_SOURCES = mln_morpho_thick_miss.cc
+mln_morpho_algebraic_filter_SOURCES = mln_morpho_algebraic_filter.cc
mln_morpho_closing_attribute_SOURCES = mln_morpho_closing_attribute.cc
mln_morpho_rank_filter_SOURCES = mln_morpho_rank_filter.cc
mln_morpho_essential_SOURCES = mln_morpho_essential.cc
--
1.5.6.5