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
- 9625 discussions
[PATCH 21/31] configure.ac: configure new directories in milena/tests/.
by Roland Levillain 11 May '09
by Roland Levillain 11 May '09
11 May '09
---
ChangeLog | 4 ++++
configure.ac | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index faa0325..50179ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ * configure.ac: configure new directories in milena/tests/.
+
2009-05-06 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
* AUTHORS: First draft.
diff --git a/configure.ac b/configure.ac
index ada07fa..d08aec7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,6 +186,7 @@ AC_CONFIG_FILES([
milena/tests/accu/Makefile
milena/tests/accu/image/Makefile
milena/tests/accu/site_set/Makefile
+ milena/tests/accu/stat/Makefile
milena/tests/algebra/Makefile
milena/tests/arith/Makefile
milena/tests/binarization/Makefile
@@ -213,6 +214,7 @@ AC_CONFIG_FILES([
milena/tests/fun/p2b/Makefile
milena/tests/fun/p2p/Makefile
milena/tests/fun/p2v/Makefile
+ milena/tests/fun/stat/Makefile
milena/tests/fun/v2v/Makefile
milena/tests/fun/vv2v/Makefile
milena/tests/fun/x2x/Makefile
@@ -221,8 +223,10 @@ AC_CONFIG_FILES([
milena/tests/graph/attribute/Makefile
milena/tests/histo/Makefile
milena/tests/io/Makefile
+ milena/tests/io/dicom/Makefile
milena/tests/io/dump/Makefile
milena/tests/io/fits/Makefile
+ milena/tests/io/magick/Makefile
milena/tests/io/off/Makefile
milena/tests/io/pbm/Makefile
milena/tests/io/pfm/Makefile
--
1.6.1.2
1
0
* milena/headers.mk: update distributed files list.
* milena/mln/core/image/edge_image.hh,
* milena/mln/core/image/vertex_image.hh: fix a wrong image type.
* milena/mln/fun/math/sup.hh: fix wrong template parameters.
* milena/mln/value/rgb.hh,
* milena/mln/util/essential.hh,
* milena/mln/util/all.hh,
* milena/mln/labeling/all.hh,
* milena/mln/debug/all.hh,
* milena/mln/fun/v2v/all.hh: fix includes.
* milena/mln/fun/v2v/rgb_to_hsi.hh: fix duplicate declarations.
* milena/mln/make/influence_zone_adjacency_graph.hh: add missing const
references.
* milena/mln/morpho/opening/area_on_vertices.hh: update according new
graph image types.
* milena/mln/registration/icp.hh: fix use of random_color.
* milena/mln/util/adjacency_matrix.hh: fix wrong ifndef.
* milena/mln/util/object_id.hh,
* milena/mln/util/vertex.hh,
* milena/mln/util/edge.hh: fix operator< and operator==.
* milena/mln/util/graph.hh: add preconditions.
* milena/mln/world/binary_2d/all.hh: new.
* milena/tests/morpho/closing/Makefile.am,
* milena/tests/morpho/closing/area_on_vertices.cc,
* milena/tests/morpho/opening/Makefile.am,
* milena/tests/morpho/opening/area_on_vertices.cc: new tests.
* milena/tests/unit_test/unit-tests.mk: update unit test list.
* milena/tests/util/Makefile.am,
* milena/tests/util/tree_fast_to_image.cc,
* milena/tests/util/tree_to_image.cc: remove tests.
---
milena/ChangeLog | 49 +++++++++++++
milena/headers.mk | 27 +++++---
milena/mln/core/image/edge_image.hh | 3 +-
milena/mln/core/image/vertex_image.hh | 3 +-
milena/mln/debug/all.hh | 3 +-
milena/mln/fun/math/sup.hh | 4 +-
milena/mln/fun/v2v/all.hh | 3 +
milena/mln/fun/v2v/rgb_to_hsi.hh | 53 --------------
milena/mln/labeling/all.hh | 1 +
milena/mln/make/influence_zone_adjacency_graph.hh | 13 ++--
milena/mln/morpho/opening/area_on_vertices.hh | 37 ++++++-----
milena/mln/registration/icp.hh | 3 +-
milena/mln/util/adjacency_matrix.hh | 4 +-
milena/mln/util/all.hh | 2 -
milena/mln/util/edge.hh | 8 ++-
milena/mln/util/essential.hh | 2 +-
milena/mln/util/graph.hh | 5 +-
milena/mln/util/object_id.hh | 7 ++
milena/mln/util/vertex.hh | 4 +-
milena/mln/value/rgb.hh | 1 +
.../{util/essential.hh => world/binary_2d/all.hh} | 26 +++----
milena/tests/morpho/closing/Makefile.am | 2 +
.../morpho/closing/area_on_vertices.cc} | 65 +++++++++---------
milena/tests/morpho/opening/Makefile.am | 2 +
.../morpho/opening/area_on_vertices.cc} | 65 +++++++++---------
milena/tests/unit_test/unit-tests.mk | 72 ++++++++++++++------
milena/tests/util/Makefile.am | 6 +--
27 files changed, 259 insertions(+), 211 deletions(-)
copy milena/mln/{util/essential.hh => world/binary_2d/all.hh} (70%)
copy milena/{mln/fun/math/sup.hh => tests/morpho/closing/area_on_vertices.cc} (58%)
copy milena/{mln/fun/math/sup.hh => tests/morpho/opening/area_on_vertices.cc} (58%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 2fda128..e0e1cee 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,54 @@
2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Small fixes.
+
+ * milena/headers.mk: update distributed files list.
+
+ * milena/mln/core/image/edge_image.hh,
+ * milena/mln/core/image/vertex_image.hh: fix a wrong image type.
+
+ * milena/mln/fun/math/sup.hh: fix wrong template parameters.
+
+ * milena/mln/value/rgb.hh,
+ * milena/mln/util/essential.hh,
+ * milena/mln/util/all.hh,
+ * milena/mln/labeling/all.hh,
+ * milena/mln/debug/all.hh,
+ * milena/mln/fun/v2v/all.hh: fix includes.
+
+ * milena/mln/fun/v2v/rgb_to_hsi.hh: fix duplicate declarations.
+
+ * milena/mln/make/influence_zone_adjacency_graph.hh: add missing const
+ references.
+
+ * milena/mln/morpho/opening/area_on_vertices.hh: update according new
+ graph image types.
+
+ * milena/mln/registration/icp.hh: fix use of random_color.
+
+ * milena/mln/util/adjacency_matrix.hh: fix wrong ifndef.
+
+ * milena/mln/util/object_id.hh,
+ * milena/mln/util/vertex.hh,
+ * milena/mln/util/edge.hh: fix operator< and operator==.
+
+ * milena/mln/util/graph.hh: add preconditions.
+
+ * milena/mln/world/binary_2d/all.hh: new.
+
+ * milena/tests/morpho/closing/Makefile.am,
+ * milena/tests/morpho/closing/area_on_vertices.cc,
+ * milena/tests/morpho/opening/Makefile.am,
+ * milena/tests/morpho/opening/area_on_vertices.cc: new tests.
+
+ * milena/tests/unit_test/unit-tests.mk: update unit test list.
+
+ * milena/tests/util/Makefile.am,
+ * milena/tests/util/tree_fast_to_image.cc,
+ * milena/tests/util/tree_to_image.cc: remove tests.
+
+2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Fix documentation.
* doc/Doxyfile.in: add macro definitions.
diff --git a/milena/headers.mk b/milena/headers.mk
index 34e4823..d241629 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -57,11 +57,18 @@ mln/literal/one.hh \
mln/literal/min.hh \
mln/literal/white.hh \
mln/literal/essential.hh \
+mln/world/all.hh \
mln/world/binary_2d/subsample.hh \
+mln/world/binary_2d/all.hh \
mln/world/binary_2d/projected_histo.hh \
+mln/world/inter_pixel/is_pixel.hh \
+mln/world/inter_pixel/all.hh \
mln/world/inter_pixel/neighb2d.hh \
-mln/world/inter_pixel/image2full.hh \
+mln/world/inter_pixel/is_separator.hh \
+mln/world/inter_pixel/immerse.hh \
+mln/world/inter_pixel/separator_to_pixels.hh \
mln/world/inter_pixel/display_edge.hh \
+mln/world/inter_pixel/compute.hh \
mln/world/inter_pixel/dim2/is_pixel.hh \
mln/world/inter_pixel/dim2/all.hh \
mln/world/inter_pixel/dim2/is_edge.hh \
@@ -82,7 +89,6 @@ mln/util/max.hh \
mln/util/lazy_set.hh \
mln/util/soft_heap.hh \
mln/util/set.hh \
-mln/util/tree_to_image.hh \
mln/util/lemmings.hh \
mln/util/greater_point.hh \
mln/util/internal/graph_iter_base.hh \
@@ -109,18 +115,13 @@ mln/util/yes.hh \
mln/util/line_graph.hh \
mln/util/ord.hh \
mln/util/adjacency_matrix.hh \
-mln/util/tree_fast_to_image.hh \
-mln/util/tree.hh \
mln/util/couple.hh \
mln/util/index.hh \
mln/util/multi_site.hh \
-mln/util/branch_iter.hh \
-mln/util/branch_iter_ind.hh \
-mln/util/tree_to_fast.hh \
mln/util/array.hh \
mln/util/vertex.hh \
mln/util/pix.hh \
-mln/util/tree_fast.hh \
+mln/util/object_id.hh \
mln/util/site_pair.hh \
mln/util/nil.hh \
mln/util/graph_ids.hh \
@@ -128,6 +129,7 @@ mln/util/eat.hh \
mln/util/essential.hh \
mln/data/memset_.hh \
mln/data/paste.spe.hh \
+mln/data/paste_without_localization.hh \
mln/data/memcpy_.hh \
mln/data/all.hh \
mln/data/paste.hh \
@@ -218,6 +220,8 @@ mln/fun/p2p/all.hh \
mln/fun/p2p/translation.hh \
mln/fun/p2p/mirror.hh \
mln/fun/accu_result.hh \
+mln/fun/stat/mahalanobis.hh \
+mln/fun/stat/all.hh \
mln/fun/binary_param.hh \
mln/fun/x2p/closest_point.hh \
mln/fun/x2p/all.hh \
@@ -295,6 +299,8 @@ mln/fun/vv2b/lt.hh \
mln/fun/vv2b/eq.hh \
mln/fun/cast.hh \
mln/fun/composition.hh \
+mln/fun/access/all.hh \
+mln/fun/access/mean.hh \
mln/fun/i2v/all.hh \
mln/fun/i2v/array.hh \
mln/fun/i2v/all_to.hh \
@@ -435,6 +441,7 @@ mln/accu/site_set/all.hh \
mln/accu/site_set/essential.hh \
mln/accu/stat/variance.hh \
mln/accu/stat/deviation.hh \
+mln/accu/stat/all.hh \
mln/accu/stat/var.hh \
mln/accu/max.hh \
mln/accu/lor.hh \
@@ -1026,7 +1033,6 @@ mln/core/concept/window.hh \
mln/core/concept/value.hh \
mln/core/concept/accumulator.hh \
mln/core/concept/site_set.hh \
-mln/core/concept/object_id.hh \
mln/core/concept/object.hh \
mln/core/concept/meta_fun.hh \
mln/core/concept/delta_point_site.hh \
@@ -1109,6 +1115,7 @@ mln/labeling/all.hh \
mln/labeling/level.hh \
mln/labeling/flat_zones.hh \
mln/labeling/foreground.hh \
+mln/labeling/colorize.hh \
mln/labeling/regional_maxima.hh \
mln/labeling/wrap.hh \
mln/labeling/compute.hh \
@@ -1207,7 +1214,6 @@ mln/debug/iota.hh \
mln/debug/all.hh \
mln/debug/println_with_border.hh \
mln/debug/println.spe.hh \
-mln/debug/colorize.hh \
mln/debug/slices_2d.hh \
mln/debug/draw_graph.hh \
mln/debug/filename.hh \
@@ -1233,6 +1239,7 @@ mln/graph/attribute/card.hh \
mln/graph/compute.hh \
mln/graph/essential.hh \
mln/set/uni.hh \
+mln/set/compute_with_weights.hh \
mln/set/unique.hh \
mln/set/inter.hh \
mln/set/all.hh \
diff --git a/milena/mln/core/image/edge_image.hh b/milena/mln/core/image/edge_image.hh
index 76d7fe0..3c71bb8 100644
--- a/milena/mln/core/image/edge_image.hh
+++ b/milena/mln/core/image/edge_image.hh
@@ -146,6 +146,7 @@ namespace mln
/// Function mapping graph elements to sites.
typedef typename internal::efsite_selector<P,G>::site_function_t
site_function_t;
+ typedef mln_result(site_function_t) function_result_t;
/// Window type
typedef graph_elt_window<G,p_edges<G,site_function_t> > win_t;
@@ -193,7 +194,7 @@ namespace mln
{
fun::i2v::array<V> f;
init_(tag::function, f, exact(model));
- p_edges<G,fun::i2v::array<P> > s;
+ p_edges<G, typename edge_image<P,V,G>::site_function_t> s;
init_(tag::domain, s, exact(model));
target.init_(f, s);
}
diff --git a/milena/mln/core/image/vertex_image.hh b/milena/mln/core/image/vertex_image.hh
index 3498ec7..0d62991 100644
--- a/milena/mln/core/image/vertex_image.hh
+++ b/milena/mln/core/image/vertex_image.hh
@@ -144,6 +144,7 @@ namespace mln
/// Function mapping graph elements to sites.
typedef typename internal::vfsite_selector<P,G>::site_function_t
site_function_t;
+ typedef mln_result(site_function_t) function_result_t;
/// Skeleton type.
@@ -187,7 +188,7 @@ namespace mln
{
fun::i2v::array<V> f;
init_(tag::function, f, exact(model));
- p_vertices<G,fun::i2v::array<P> > s;
+ p_vertices<G,typename edge_image<P,V,G>::site_function_t> s;
init_(tag::domain, s, exact(model));
target.init_(f, s);
}
diff --git a/milena/mln/debug/all.hh b/milena/mln/debug/all.hh
index 814c95b..e65e907 100644
--- a/milena/mln/debug/all.hh
+++ b/milena/mln/debug/all.hh
@@ -48,8 +48,8 @@ namespace mln
}
-# include <mln/debug/format.hh>
# include <mln/debug/draw_graph.hh>
+# include <mln/debug/format.hh>
# include <mln/debug/histo.hh>
# include <mln/debug/iota.hh>
# include <mln/debug/println.hh>
@@ -58,5 +58,4 @@ namespace mln
# include <mln/debug/quiet.hh>
# include <mln/debug/slices_2d.hh>
-
#endif // ! MLN_DEBUG_ALL_HH
diff --git a/milena/mln/fun/math/sup.hh b/milena/mln/fun/math/sup.hh
index 20e19bf..d76b4b2 100644
--- a/milena/mln/fun/math/sup.hh
+++ b/milena/mln/fun/math/sup.hh
@@ -46,7 +46,7 @@ namespace mln
namespace next
{
- template <typename T>
+ template <typename T1, typename T2>
struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
{
typedef set_binary_ ret;
@@ -66,5 +66,5 @@ namespace mln
} // end of namespace mln
-#endif /* ! MLN_FUN_MATH_SUP_HH */
+#endif // ! MLN_FUN_MATH_SUP_HH
diff --git a/milena/mln/fun/v2v/all.hh b/milena/mln/fun/v2v/all.hh
index 2d14054..65de5ca 100644
--- a/milena/mln/fun/v2v/all.hh
+++ b/milena/mln/fun/v2v/all.hh
@@ -54,11 +54,14 @@ namespace mln
# include <mln/fun/v2v/convert.hh>
# include <mln/fun/v2v/dec.hh>
# include <mln/fun/v2v/enc.hh>
+# include <mln/fun/v2v/hsi_to_rgb.hh>
+# include <mln/fun/v2v/hsl_to_rgb.hh>
# include <mln/fun/v2v/id.hh>
# include <mln/fun/v2v/linear.hh>
# include <mln/fun/v2v/norm.hh>
# include <mln/fun/v2v/projection.hh>
# include <mln/fun/v2v/rgb_to_hsi.hh>
+# include <mln/fun/v2v/rgb_to_hsl.hh>
# include <mln/fun/v2v/saturate.hh>
# include <mln/fun/v2v/wrap.hh>
diff --git a/milena/mln/fun/v2v/rgb_to_hsi.hh b/milena/mln/fun/v2v/rgb_to_hsi.hh
index bf9bd5d..c344343 100644
--- a/milena/mln/fun/v2v/rgb_to_hsi.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsi.hh
@@ -61,28 +61,11 @@ namespace mln
extern f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
- template <typename T_rgb>
- struct f_hsi_to_rgb_ : public Function_v2v< f_hsi_to_rgb_<T_rgb> >
- {
- typedef T_rgb result;
-
- template <typename T_hsi>
- T_rgb operator()(const T_hsi& hsi) const;
-
- };
-
- typedef f_hsi_to_rgb_<value::rgb8> f_hsi_to_rgb_3x8_t;
-
- extern f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
-
-
# ifndef MLN_INCLUDE_ONLY
/// Global variables.
/// \{
f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
-
- f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
/// \}
@@ -120,42 +103,6 @@ namespace mln
}
- 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/labeling/all.hh b/milena/mln/labeling/all.hh
index 2931427..e90633b 100644
--- a/milena/mln/labeling/all.hh
+++ b/milena/mln/labeling/all.hh
@@ -55,6 +55,7 @@ namespace mln
# include <mln/labeling/background.hh>
# include <mln/labeling/blobs.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/labeling/compute.hh>
# include <mln/labeling/fill_holes.hh>
# include <mln/labeling/flat_zones.hh>
diff --git a/milena/mln/make/influence_zone_adjacency_graph.hh b/milena/mln/make/influence_zone_adjacency_graph.hh
index 6cbaa4c..a5c3462 100644
--- a/milena/mln/make/influence_zone_adjacency_graph.hh
+++ b/milena/mln/make/influence_zone_adjacency_graph.hh
@@ -56,14 +56,16 @@ namespace mln
/// Create a graph from an influence zone image.
///
/// \param[in] iz influence zone image.
+ /// \param[in] nbh A neighborhood.
/// \param[in] nlabels number of influence zone in \p iz.
///
/// \return util::graph Graph based on the adjacency of the influence zones.
+ //
template <typename I, typename N>
util::graph
influence_zone_adjacency_graph(const Image<I>& iz_,
const Neighborhood<N>& nbh,
- mln_value(I) nlabels);
+ const mln_value(I)& nlabels);
@@ -77,7 +79,7 @@ namespace mln
void
influence_zone_adjacency_graph_tests(const Image<I>& iz,
const Neighborhood<N>& nbh,
- mln_value(I))
+ const mln_value(I)&)
{
mln_precondition(exact(iz).is_valid());
mln_precondition(exact(nbh).is_valid());
@@ -94,11 +96,12 @@ namespace mln
namespace generic
{
+ /// Generic implementation of make::influence_zone_adjacency_graph.
template <typename I, typename N>
util::graph
influence_zone_adjacency_graph(const Image<I>& iz_,
const Neighborhood<N>& nbh_,
- mln_value(I) nlabels)
+ const mln_value(I)& nlabels)
{
trace::entering("make::impl::generic::influence_zone_adjacency_graph");
@@ -151,7 +154,7 @@ namespace mln
util::graph
influence_zone_adjacency_graph_dispatch(const Image<I>& iz,
const Neighborhood<N>& nbh,
- mln_value(I) nlabels)
+ const mln_value(I)& nlabels)
{
return make::impl::generic::influence_zone_adjacency_graph(iz, nbh, nlabels);
}
@@ -167,7 +170,7 @@ namespace mln
util::graph
influence_zone_adjacency_graph(const Image<I>& iz,
const Neighborhood<N>& nbh,
- mln_value(I) nlabels)
+ const mln_value(I)& nlabels)
{
trace::entering("make::influence_zone_adjacency_graph");
diff --git a/milena/mln/morpho/opening/area_on_vertices.hh b/milena/mln/morpho/opening/area_on_vertices.hh
index cb69d7f..f0ccd34 100644
--- a/milena/mln/morpho/opening/area_on_vertices.hh
+++ b/milena/mln/morpho/opening/area_on_vertices.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -34,8 +34,7 @@
/// Morphological area opening on a line graph image computing
/// the area in terms of adjacent vertices.
-# include <mln/pw/image.hh>
-# include <mln/core/site_set/p_edges.hh>
+# include <mln/core/image/edge_image.hh>
# include <mln/morpho/opening/algebraic.hh>
# include <mln/morpho/attribute/count_adjacent_vertices.hh>
@@ -49,32 +48,38 @@ namespace mln
namespace opening
{
- /// Morphological area opening on a mln::line_graph_image computing
- /// the area in terms of adjacent vertices.
- template <typename P2V, typename G, typename V2P, typename N>
- pw::image<P2V, p_edges<G, V2P> >
- area_on_vertices(const pw::image<P2V, p_edges<G, V2P> >& input,
+ /// Morphological area opening on a mln::line_graph_image computing
+ /// the area in terms of adjacent vertices.
+ ///
+ /// \param[in] input An edge image.
+ /// \param[in] nbh A graph neighborhood.
+ /// \param[in] lambda Closing parameter.
+ ///
+ /// \return An edge image.
+ //
+ template <typename P, typename V, typename G, typename N>
+ edge_image<P,V,G>
+ area_on_vertices(const edge_image<P,V,G>& input,
const Neighborhood<N>& nbh,
unsigned lambda);
# ifndef MLN_INCLUDE_ONLY
- template <typename P2V, typename G, typename V2P, typename N>
+ template <typename P, typename V, typename G, typename N>
inline
- pw::image<P2V, p_edges<G, V2P> >
- area_on_vertices(const pw::image<P2V, p_edges<G, V2P> >& input,
+ edge_image<P,V,G>
+ area_on_vertices(const edge_image<P,V,G>& input,
const Neighborhood<N>& nbh,
unsigned lambda)
{
trace::entering("morpho::opening::area_on_vertices");
mln_precondition(exact(input).is_valid());
- typedef p_edges<G, V2P> pe_t;
- typedef attribute::count_adjacent_vertices< pw::image<P2V, pe_t> > attribute_t;
+ typedef attribute::count_adjacent_vertices< edge_image<P,V,G> > attribute_t;
- pw::image<P2V, p_edges<G, V2P> > output;
- output = opening::algebraic(input, nbh, attribute_t(), lambda);
+ edge_image<P,V,G>
+ output = opening::algebraic(input, nbh, attribute_t(), lambda);
trace::exiting("morpho::opening::area_on_vertices");
return output;
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index a2bee09..25edf96 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -62,6 +62,7 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/debug/histo.hh>
# include <mln/accu/histo.hh>
@@ -200,7 +201,7 @@ namespace mln
mln_piter(p_array<P>) p(X);
for_all(p)
{
- debug(p) = debug::internal::random_color(value::rgb8());
+ debug(p) = labeling::internal::random_color(value::rgb8());
debug2(p) = true;
}
io::pbm::save(slice(debug2,0), "debug2-a.ppm");
diff --git a/milena/mln/util/adjacency_matrix.hh b/milena/mln/util/adjacency_matrix.hh
index dfda26f..9a60c94 100644
--- a/milena/mln/util/adjacency_matrix.hh
+++ b/milena/mln/util/adjacency_matrix.hh
@@ -250,9 +250,9 @@ namespace mln
::adjacency_matrix_impl_selector(const V& nelements)
{
(void) nelements;
-# ifndef DNDEBUG
+# ifndef NDEBUG
nelements_ = nelements;
-# endif // ! DNDEBUG
+# endif // ! NDEBUG
}
template <typename V>
diff --git a/milena/mln/util/all.hh b/milena/mln/util/all.hh
index 180b8a1..c6d9864 100644
--- a/milena/mln/util/all.hh
+++ b/milena/mln/util/all.hh
@@ -72,9 +72,7 @@ namespace mln
# include <mln/util/tracked_ptr.hh>
# include <mln/util/tree.hh>
# include <mln/util/tree_fast.hh>
-# include <mln/util/tree_fast_to_image.hh>
# include <mln/util/tree_to_fast.hh>
-//# include <mln/util/tree_to_image.hh>
# include <mln/util/vertex.hh>
# include <mln/util/yes.hh>
diff --git a/milena/mln/util/edge.hh b/milena/mln/util/edge.hh
index 0c759db..1de3648 100644
--- a/milena/mln/util/edge.hh
+++ b/milena/mln/util/edge.hh
@@ -359,15 +359,17 @@ namespace mln
bool
operator==(const edge<G>& lhs, const edge<G>& rhs)
{
- return lhs.pair_vertex_ == rhs.pair_vertex_;
+ return lhs.id() == rhs.id()
+ && (lhs.graph().is_subgraph_of(rhs.graph())
+ || rhs.graph().is_subgraph_of(lhs.graph()));
}
template <typename G>
inline
bool
- operator< (const edge<G>& lhs, const edge<G>& rhs)
+ operator<(const edge<G>& lhs, const edge<G>& rhs)
{
- return lhs.pair_vertex_ < rhs.pair_vertex_;
+ return lhs.id() < rhs.id();
}
} // end of namespace mln::util
diff --git a/milena/mln/util/essential.hh b/milena/mln/util/essential.hh
index 3c9b74f..d5eab8a 100644
--- a/milena/mln/util/essential.hh
+++ b/milena/mln/util/essential.hh
@@ -1,4 +1,5 @@
// 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
@@ -40,6 +41,5 @@
# include <mln/util/ord_pair.hh>
# include <mln/util/set.hh>
# include <mln/util/site_pair.hh>
-# include <mln/util/tree.hh>
#endif // ! MLN_UTIL_ESSENTIAL_HH
diff --git a/milena/mln/util/graph.hh b/milena/mln/util/graph.hh
index 83c0e8c..3ebd62d 100644
--- a/milena/mln/util/graph.hh
+++ b/milena/mln/util/graph.hh
@@ -385,7 +385,10 @@ namespace mln
edge_id_t
graph::add_edge(const vertex_id_t& id_v1, const vertex_id_t& id_v2)
{
- //FIXME: to be removed! We should not check that, except in without NDEBUG.
+ mln_precondition(id_v1 != id_v2);
+ mln_precondition(has_v(id_v1));
+ mln_precondition(has_v(id_v2));
+
// Does this edge already exist in the graph?
edge_data_t edge(id_v1, id_v2);
# ifndef NDEBUG
diff --git a/milena/mln/util/object_id.hh b/milena/mln/util/object_id.hh
index b3ea879..b50f2a5 100644
--- a/milena/mln/util/object_id.hh
+++ b/milena/mln/util/object_id.hh
@@ -185,6 +185,13 @@ namespace mln
+ template <typename Tag, typename V, typename V2>
+ inline
+ bool
+ operator==(const object_id<Tag,V>& lhs, const Value<V2>& rhs)
+ {
+ return lhs.value() == exact(rhs).to_equiv();
+ }
template <typename Tag, typename V>
inline
diff --git a/milena/mln/util/vertex.hh b/milena/mln/util/vertex.hh
index 4f0c5ad..6d5af65 100644
--- a/milena/mln/util/vertex.hh
+++ b/milena/mln/util/vertex.hh
@@ -378,7 +378,9 @@ namespace mln
bool
operator==(const vertex<G>& v1, const vertex<G>& v2)
{
- return v1.id() == v2.id();
+ return v1.id() == v2.id()
+ && (v1.graph().is_subgraph_of(v2.graph())
+ || v2.graph().is_subgraph_of(v1.graph()));
}
template<typename G>
diff --git a/milena/mln/value/rgb.hh b/milena/mln/value/rgb.hh
index ebeeb5e..54e6b76 100644
--- a/milena/mln/value/rgb.hh
+++ b/milena/mln/value/rgb.hh
@@ -42,6 +42,7 @@
# include <mln/value/ops.hh>
+# include <mln/fun/v2v/hsl_to_rgb.hh>
# include <mln/value/concept/vectorial.hh>
# include <mln/value/int_u.hh>
# include <mln/algebra/vec.hh>
diff --git a/milena/mln/util/essential.hh b/milena/mln/world/binary_2d/all.hh
similarity index 70%
copy from milena/mln/util/essential.hh
copy to milena/mln/world/binary_2d/all.hh
index 3c9b74f..cf94381 100644
--- a/milena/mln/util/essential.hh
+++ b/milena/mln/world/binary_2d/all.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008, 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
@@ -25,21 +25,17 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_UTIL_ESSENTIAL_HH
-# define MLN_UTIL_ESSENTIAL_HH
+#ifndef MLN_WORLD_BINARY_2D_ALL_HH
+# define MLN_WORLD_BINARY_2D_ALL_HH
-/// \file mln/util/essential.hh
+/// \file mln/world/all.hh
///
-/// File that includes essential util-related routines.
+/// File that includes all the world routines.
-# include <mln/util/array.hh>
-# include <mln/util/couple.hh>
-# include <mln/util/lazy_set.hh>
-# include <mln/util/lemmings.hh>
-# include <mln/util/ord.hh>
-# include <mln/util/ord_pair.hh>
-# include <mln/util/set.hh>
-# include <mln/util/site_pair.hh>
-# include <mln/util/tree.hh>
-#endif // ! MLN_UTIL_ESSENTIAL_HH
+// Sub-directories.
+# include <mln/world/binary_2d/projected_histo.hh>
+# include <mln/world/binary_2d/subsample.hh>
+
+
+#endif // ! MLN_WORLD_BINARY_2D_ALL_HH
diff --git a/milena/tests/morpho/closing/Makefile.am b/milena/tests/morpho/closing/Makefile.am
index 6d5ee0a..696cd14 100644
--- a/milena/tests/morpho/closing/Makefile.am
+++ b/milena/tests/morpho/closing/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = \
approx
check_PROGRAMS = \
+ area_on_vertices \
leveling \
algebraic \
height \
@@ -14,6 +15,7 @@ check_PROGRAMS = \
structural \
sum
+area_on_vertices_SOURCES = area_on_vertices.cc
leveling_SOURCES = leveling.cc
algebraic_SOURCES = algebraic.cc
height_SOURCES = height.cc
diff --git a/milena/mln/fun/math/sup.hh b/milena/tests/morpho/closing/area_on_vertices.cc
similarity index 58%
copy from milena/mln/fun/math/sup.hh
copy to milena/tests/morpho/closing/area_on_vertices.cc
index 20e19bf..4d8db2d 100644
--- a/milena/mln/fun/math/sup.hh
+++ b/milena/tests/morpho/closing/area_on_vertices.cc
@@ -7,7 +7,7 @@
//
// 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 F PARTICULAR PURPOSE. See the GNU
+// 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
@@ -25,46 +25,43 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_FUN_MATH_SUP_HH
-# define MLN_FUN_MATH_SUP_HH
+/// \file tests/morpho/closing/area_on_vertices.cc
+///
+/// Test on mln::morpho::closing::area_on_vertices.
-# include <mln/fun/binary.hh>
-# include <mln/math/max.hh>
+#include <mln/core/image/edge_image.hh>
+#include <mln/morpho/closing/area_on_vertices.hh>
+#include <mln/util/graph.hh>
+#include <mln/fun/i2v/array.hh>
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct sup : binary<sup> {};
- }
+#include "tests/data.hh"
- namespace trait
- {
- namespace next
- {
+const unsigned result[] = { 101, 101, 102 };
- template <typename T>
- struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
- {
- typedef set_binary_ ret;
- typedef mln_trait_promote(T1, T2) result;
- typedef T1 argument1;
- typedef T2 argument2;
-
- static result read(const argument1& a, const argument1& b)
- {
- return math::max(a, b);
- }
- };
+int main()
+{
+ using namespace mln;
- } // end of namespace mln::trait::next
+ util::graph gr;
+ gr.add_vertices(5);
+ gr.add_edge(1, 3);
+ gr.add_edge(1, 2);
+ gr.add_edge(2 ,4);
- } // end of namespace mln::trait
+ fun::i2v::array<unsigned> f(5);
+ for (unsigned i = 0; i < 5; ++i)
+ f(i) = 100 + i;
+ typedef edge_image<void,unsigned> e_ima_t;
+ e_ima_t e_ima(gr, f);
+ typedef e_ima_t::nbh_t nbh_t;
+ nbh_t nbh;
-} // end of namespace mln
+ e_ima_t clo = morpho::closing::area_on_vertices(e_ima, nbh, 3);
-#endif /* ! MLN_FUN_MATH_SUP_HH */
+ unsigned i = 0;
+ mln_piter_(e_ima_t) p(clo.domain());
+ for_all(p)
+ mln_assertion(result[i++] == clo(p));
+}
diff --git a/milena/tests/morpho/opening/Makefile.am b/milena/tests/morpho/opening/Makefile.am
index f0abae0..5f7e44a 100644
--- a/milena/tests/morpho/opening/Makefile.am
+++ b/milena/tests/morpho/opening/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = \
approx
check_PROGRAMS = \
+ area_on_vertices \
leveling \
algebraic \
height \
@@ -14,6 +15,7 @@ check_PROGRAMS = \
structural \
sum
+area_on_vertices_SOURCES = area_on_vertices.cc
leveling_SOURCES = leveling.cc
algebraic_SOURCES = algebraic.cc
height_SOURCES = height.cc
diff --git a/milena/mln/fun/math/sup.hh b/milena/tests/morpho/opening/area_on_vertices.cc
similarity index 58%
copy from milena/mln/fun/math/sup.hh
copy to milena/tests/morpho/opening/area_on_vertices.cc
index 20e19bf..f259770 100644
--- a/milena/mln/fun/math/sup.hh
+++ b/milena/tests/morpho/opening/area_on_vertices.cc
@@ -7,7 +7,7 @@
//
// 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 F PARTICULAR PURPOSE. See the GNU
+// 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
@@ -25,46 +25,43 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_FUN_MATH_SUP_HH
-# define MLN_FUN_MATH_SUP_HH
+/// \file tests/morpho/opening/area_on_vertices.cc
+///
+/// Test on mln::morpho::opening::area_on_vertices.
-# include <mln/fun/binary.hh>
-# include <mln/math/max.hh>
+#include <mln/core/image/edge_image.hh>
+#include <mln/morpho/opening/area_on_vertices.hh>
+#include <mln/util/graph.hh>
+#include <mln/fun/i2v/array.hh>
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct sup : binary<sup> {};
- }
+#include "tests/data.hh"
- namespace trait
- {
- namespace next
- {
+const unsigned result[] = { 100, 101, 101 };
- template <typename T>
- struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
- {
- typedef set_binary_ ret;
- typedef mln_trait_promote(T1, T2) result;
- typedef T1 argument1;
- typedef T2 argument2;
-
- static result read(const argument1& a, const argument1& b)
- {
- return math::max(a, b);
- }
- };
+int main()
+{
+ using namespace mln;
- } // end of namespace mln::trait::next
+ util::graph gr;
+ gr.add_vertices(5);
+ gr.add_edge(1, 3);
+ gr.add_edge(1, 2);
+ gr.add_edge(2 ,4);
- } // end of namespace mln::trait
+ fun::i2v::array<unsigned> f(5);
+ for (unsigned i = 0; i < 5; ++i)
+ f(i) = 100 + i;
+ typedef edge_image<void,unsigned> e_ima_t;
+ e_ima_t e_ima(gr, f);
+ typedef e_ima_t::nbh_t nbh_t;
+ nbh_t nbh;
-} // end of namespace mln
+ e_ima_t clo = morpho::opening::area_on_vertices(e_ima, nbh, 3);
-#endif /* ! MLN_FUN_MATH_SUP_HH */
+ unsigned i = 0;
+ mln_piter_(e_ima_t) p(clo.domain());
+ for_all(p)
+ mln_assertion(result[i++] == clo(p));
+}
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 6869395..37f1d72 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -55,16 +55,25 @@ mln_literal_one \
mln_literal_min \
mln_literal_white \
mln_literal_essential \
+mln_world_all \
mln_world_binary_2d_subsample \
+mln_world_binary_2d_all \
mln_world_binary_2d_projected_histo \
+mln_world_inter_pixel_is_pixel \
+mln_world_inter_pixel_all \
mln_world_inter_pixel_neighb2d \
-mln_world_inter_pixel_full \
+mln_world_inter_pixel_is_separator \
+mln_world_inter_pixel_immerse \
+mln_world_inter_pixel_separator_to_pixels \
mln_world_inter_pixel_display_edge \
+mln_world_inter_pixel_compute \
mln_world_inter_pixel_dim2_is_pixel \
mln_world_inter_pixel_dim2_all \
mln_world_inter_pixel_dim2_is_edge \
+mln_world_inter_pixel_dim2_make_edge_image \
mln_world_inter_pixel_dim2_is_dot \
mln_world_inter_pixel_dim2_is_row_odd \
+mln_world_inter_pixel_full2image \
mln_registration_get_rtransf \
mln_registration_internal_rms \
mln_registration_get_rot \
@@ -78,7 +87,6 @@ mln_util_max \
mln_util_lazy_set \
mln_util_soft_heap \
mln_util_set \
-mln_util_tree_to_image \
mln_util_lemmings \
mln_util_greater_point \
mln_util_internal_graph_iter_base \
@@ -104,24 +112,21 @@ mln_util_timer \
mln_util_yes \
mln_util_line_graph \
mln_util_ord \
-mln_util_tree_fast_to_image \
-mln_util_tree \
+mln_util_adjacency_matrix \
mln_util_couple \
mln_util_index \
mln_util_multi_site \
-mln_util_branch_iter \
-mln_util_branch_iter_ind \
-mln_util_tree_to_fast \
mln_util_array \
mln_util_vertex \
mln_util_pix \
-mln_util_tree_fast \
+mln_util_object_id \
mln_util_site_pair \
mln_util_nil \
mln_util_graph_ids \
mln_util_eat \
mln_util_essential \
mln_data_memset_ \
+mln_data_paste_without_localization \
mln_data_memcpy_ \
mln_data_all \
mln_data_paste \
@@ -210,6 +215,8 @@ mln_fun_p2p_all \
mln_fun_p2p_translation \
mln_fun_p2p_mirror \
mln_fun_accu_result \
+mln_fun_stat_mahalanobis \
+mln_fun_stat_all \
mln_fun_binary_param \
mln_fun_x2p_closest_point \
mln_fun_x2p_all \
@@ -287,6 +294,8 @@ mln_fun_vv2b_lt \
mln_fun_vv2b_eq \
mln_fun_cast \
mln_fun_composition \
+mln_fun_access_all \
+mln_fun_access_mean \
mln_fun_i2v_all \
mln_fun_i2v_array \
mln_fun_i2v_all_to \
@@ -297,10 +306,13 @@ mln_fun_x2x_translation \
mln_fun_x2x_rotation \
mln_fun_x2x_essential \
mln_fun_component_red \
+mln_fun_component_comp_count \
+mln_fun_component_scomp \
mln_fun_component_green \
mln_fun_component_comp \
mln_fun_component_blue \
mln_fun_component_rgb \
+mln_fun_component_ithcomp \
mln_fun_compose \
mln_fun_meta_red \
mln_fun_meta_hue \
@@ -424,6 +436,7 @@ mln_accu_site_set_all \
mln_accu_site_set_essential \
mln_accu_stat_variance \
mln_accu_stat_deviation \
+mln_accu_stat_all \
mln_accu_stat_var \
mln_accu_max \
mln_accu_lor \
@@ -471,6 +484,7 @@ mln_accu_image_init \
mln_accu_image_to_result \
mln_accu_image_all \
mln_accu_image_set_value \
+mln_accu_image_untake \
mln_accu_image_take \
mln_accu_image_take_as_init \
mln_accu_image_take_n_times \
@@ -559,7 +573,6 @@ mln_trait_ch_function_value \
mln_trait_ch_value \
mln_trait_solve \
mln_trait_solve_unary \
-mln_trait_fun \
mln_trait_op_postdec \
mln_trait_op_mod \
mln_trait_op_lor \
@@ -587,6 +600,7 @@ mln_trait_op_uplus \
mln_trait_op_essential \
mln_trait_op_eq \
mln_trait_concrete \
+mln_trait_functions \
mln_trait_windows \
mln_trait_site_sets \
mln_trait_image_from_grid \
@@ -994,7 +1008,6 @@ mln_core_concept_window \
mln_core_concept_value \
mln_core_concept_accumulator \
mln_core_concept_site_set \
-mln_core_concept_object_id \
mln_core_concept_object \
mln_core_concept_meta_fun \
mln_core_concept_delta_point_site \
@@ -1076,6 +1089,7 @@ mln_labeling_all \
mln_labeling_level \
mln_labeling_flat_zones \
mln_labeling_foreground \
+mln_labeling_colorize \
mln_labeling_regional_maxima \
mln_labeling_wrap \
mln_labeling_compute \
@@ -1168,7 +1182,6 @@ mln_norm_essential \
mln_debug_iota \
mln_debug_all \
mln_debug_println_with_border \
-mln_debug_colorize \
mln_debug_slices_2d \
mln_debug_draw_graph \
mln_debug_filename \
@@ -1192,6 +1205,7 @@ mln_graph_attribute_card \
mln_graph_compute \
mln_graph_essential \
mln_set_uni \
+mln_set_compute_with_weights \
mln_set_unique \
mln_set_inter \
mln_set_all \
@@ -1273,16 +1287,25 @@ mln_literal_one_SOURCES = mln_literal_one.cc
mln_literal_min_SOURCES = mln_literal_min.cc
mln_literal_white_SOURCES = mln_literal_white.cc
mln_literal_essential_SOURCES = mln_literal_essential.cc
+mln_world_all_SOURCES = mln_world_all.cc
mln_world_binary_2d_subsample_SOURCES = mln_world_binary_2d_subsample.cc
+mln_world_binary_2d_all_SOURCES = mln_world_binary_2d_all.cc
mln_world_binary_2d_projected_histo_SOURCES = mln_world_binary_2d_projected_histo.cc
+mln_world_inter_pixel_is_pixel_SOURCES = mln_world_inter_pixel_is_pixel.cc
+mln_world_inter_pixel_all_SOURCES = mln_world_inter_pixel_all.cc
mln_world_inter_pixel_neighb2d_SOURCES = mln_world_inter_pixel_neighb2d.cc
-mln_world_inter_pixel_full_SOURCES = mln_world_inter_pixel_full.cc
+mln_world_inter_pixel_is_separator_SOURCES = mln_world_inter_pixel_is_separator.cc
+mln_world_inter_pixel_immerse_SOURCES = mln_world_inter_pixel_immerse.cc
+mln_world_inter_pixel_separator_to_pixels_SOURCES = mln_world_inter_pixel_separator_to_pixels.cc
mln_world_inter_pixel_display_edge_SOURCES = mln_world_inter_pixel_display_edge.cc
+mln_world_inter_pixel_compute_SOURCES = mln_world_inter_pixel_compute.cc
mln_world_inter_pixel_dim2_is_pixel_SOURCES = mln_world_inter_pixel_dim2_is_pixel.cc
mln_world_inter_pixel_dim2_all_SOURCES = mln_world_inter_pixel_dim2_all.cc
mln_world_inter_pixel_dim2_is_edge_SOURCES = mln_world_inter_pixel_dim2_is_edge.cc
+mln_world_inter_pixel_dim2_make_edge_image_SOURCES = mln_world_inter_pixel_dim2_make_edge_image.cc
mln_world_inter_pixel_dim2_is_dot_SOURCES = mln_world_inter_pixel_dim2_is_dot.cc
mln_world_inter_pixel_dim2_is_row_odd_SOURCES = mln_world_inter_pixel_dim2_is_row_odd.cc
+mln_world_inter_pixel_full2image_SOURCES = mln_world_inter_pixel_full2image.cc
mln_registration_get_rtransf_SOURCES = mln_registration_get_rtransf.cc
mln_registration_internal_rms_SOURCES = mln_registration_internal_rms.cc
mln_registration_get_rot_SOURCES = mln_registration_get_rot.cc
@@ -1296,7 +1319,6 @@ mln_util_max_SOURCES = mln_util_max.cc
mln_util_lazy_set_SOURCES = mln_util_lazy_set.cc
mln_util_soft_heap_SOURCES = mln_util_soft_heap.cc
mln_util_set_SOURCES = mln_util_set.cc
-mln_util_tree_to_image_SOURCES = mln_util_tree_to_image.cc
mln_util_lemmings_SOURCES = mln_util_lemmings.cc
mln_util_greater_point_SOURCES = mln_util_greater_point.cc
mln_util_internal_graph_iter_base_SOURCES = mln_util_internal_graph_iter_base.cc
@@ -1322,24 +1344,21 @@ mln_util_timer_SOURCES = mln_util_timer.cc
mln_util_yes_SOURCES = mln_util_yes.cc
mln_util_line_graph_SOURCES = mln_util_line_graph.cc
mln_util_ord_SOURCES = mln_util_ord.cc
-mln_util_tree_fast_to_image_SOURCES = mln_util_tree_fast_to_image.cc
-mln_util_tree_SOURCES = mln_util_tree.cc
+mln_util_adjacency_matrix_SOURCES = mln_util_adjacency_matrix.cc
mln_util_couple_SOURCES = mln_util_couple.cc
mln_util_index_SOURCES = mln_util_index.cc
mln_util_multi_site_SOURCES = mln_util_multi_site.cc
-mln_util_branch_iter_SOURCES = mln_util_branch_iter.cc
-mln_util_branch_iter_ind_SOURCES = mln_util_branch_iter_ind.cc
-mln_util_tree_to_fast_SOURCES = mln_util_tree_to_fast.cc
mln_util_array_SOURCES = mln_util_array.cc
mln_util_vertex_SOURCES = mln_util_vertex.cc
mln_util_pix_SOURCES = mln_util_pix.cc
-mln_util_tree_fast_SOURCES = mln_util_tree_fast.cc
+mln_util_object_id_SOURCES = mln_util_object_id.cc
mln_util_site_pair_SOURCES = mln_util_site_pair.cc
mln_util_nil_SOURCES = mln_util_nil.cc
mln_util_graph_ids_SOURCES = mln_util_graph_ids.cc
mln_util_eat_SOURCES = mln_util_eat.cc
mln_util_essential_SOURCES = mln_util_essential.cc
mln_data_memset__SOURCES = mln_data_memset_.cc
+mln_data_paste_without_localization_SOURCES = mln_data_paste_without_localization.cc
mln_data_memcpy__SOURCES = mln_data_memcpy_.cc
mln_data_all_SOURCES = mln_data_all.cc
mln_data_paste_SOURCES = mln_data_paste.cc
@@ -1428,6 +1447,8 @@ mln_fun_p2p_all_SOURCES = mln_fun_p2p_all.cc
mln_fun_p2p_translation_SOURCES = mln_fun_p2p_translation.cc
mln_fun_p2p_mirror_SOURCES = mln_fun_p2p_mirror.cc
mln_fun_accu_result_SOURCES = mln_fun_accu_result.cc
+mln_fun_stat_mahalanobis_SOURCES = mln_fun_stat_mahalanobis.cc
+mln_fun_stat_all_SOURCES = mln_fun_stat_all.cc
mln_fun_binary_param_SOURCES = mln_fun_binary_param.cc
mln_fun_x2p_closest_point_SOURCES = mln_fun_x2p_closest_point.cc
mln_fun_x2p_all_SOURCES = mln_fun_x2p_all.cc
@@ -1505,6 +1526,8 @@ mln_fun_vv2b_lt_SOURCES = mln_fun_vv2b_lt.cc
mln_fun_vv2b_eq_SOURCES = mln_fun_vv2b_eq.cc
mln_fun_cast_SOURCES = mln_fun_cast.cc
mln_fun_composition_SOURCES = mln_fun_composition.cc
+mln_fun_access_all_SOURCES = mln_fun_access_all.cc
+mln_fun_access_mean_SOURCES = mln_fun_access_mean.cc
mln_fun_i2v_all_SOURCES = mln_fun_i2v_all.cc
mln_fun_i2v_array_SOURCES = mln_fun_i2v_array.cc
mln_fun_i2v_all_to_SOURCES = mln_fun_i2v_all_to.cc
@@ -1515,10 +1538,13 @@ mln_fun_x2x_translation_SOURCES = mln_fun_x2x_translation.cc
mln_fun_x2x_rotation_SOURCES = mln_fun_x2x_rotation.cc
mln_fun_x2x_essential_SOURCES = mln_fun_x2x_essential.cc
mln_fun_component_red_SOURCES = mln_fun_component_red.cc
+mln_fun_component_comp_count_SOURCES = mln_fun_component_comp_count.cc
+mln_fun_component_scomp_SOURCES = mln_fun_component_scomp.cc
mln_fun_component_green_SOURCES = mln_fun_component_green.cc
mln_fun_component_comp_SOURCES = mln_fun_component_comp.cc
mln_fun_component_blue_SOURCES = mln_fun_component_blue.cc
mln_fun_component_rgb_SOURCES = mln_fun_component_rgb.cc
+mln_fun_component_ithcomp_SOURCES = mln_fun_component_ithcomp.cc
mln_fun_compose_SOURCES = mln_fun_compose.cc
mln_fun_meta_red_SOURCES = mln_fun_meta_red.cc
mln_fun_meta_hue_SOURCES = mln_fun_meta_hue.cc
@@ -1642,6 +1668,7 @@ mln_accu_site_set_all_SOURCES = mln_accu_site_set_all.cc
mln_accu_site_set_essential_SOURCES = mln_accu_site_set_essential.cc
mln_accu_stat_variance_SOURCES = mln_accu_stat_variance.cc
mln_accu_stat_deviation_SOURCES = mln_accu_stat_deviation.cc
+mln_accu_stat_all_SOURCES = mln_accu_stat_all.cc
mln_accu_stat_var_SOURCES = mln_accu_stat_var.cc
mln_accu_max_SOURCES = mln_accu_max.cc
mln_accu_lor_SOURCES = mln_accu_lor.cc
@@ -1689,6 +1716,7 @@ mln_accu_image_init_SOURCES = mln_accu_image_init.cc
mln_accu_image_to_result_SOURCES = mln_accu_image_to_result.cc
mln_accu_image_all_SOURCES = mln_accu_image_all.cc
mln_accu_image_set_value_SOURCES = mln_accu_image_set_value.cc
+mln_accu_image_untake_SOURCES = mln_accu_image_untake.cc
mln_accu_image_take_SOURCES = mln_accu_image_take.cc
mln_accu_image_take_as_init_SOURCES = mln_accu_image_take_as_init.cc
mln_accu_image_take_n_times_SOURCES = mln_accu_image_take_n_times.cc
@@ -1777,7 +1805,6 @@ mln_trait_ch_function_value_SOURCES = mln_trait_ch_function_value.cc
mln_trait_ch_value_SOURCES = mln_trait_ch_value.cc
mln_trait_solve_SOURCES = mln_trait_solve.cc
mln_trait_solve_unary_SOURCES = mln_trait_solve_unary.cc
-mln_trait_fun_SOURCES = mln_trait_fun.cc
mln_trait_op_postdec_SOURCES = mln_trait_op_postdec.cc
mln_trait_op_mod_SOURCES = mln_trait_op_mod.cc
mln_trait_op_lor_SOURCES = mln_trait_op_lor.cc
@@ -1805,6 +1832,7 @@ mln_trait_op_uplus_SOURCES = mln_trait_op_uplus.cc
mln_trait_op_essential_SOURCES = mln_trait_op_essential.cc
mln_trait_op_eq_SOURCES = mln_trait_op_eq.cc
mln_trait_concrete_SOURCES = mln_trait_concrete.cc
+mln_trait_functions_SOURCES = mln_trait_functions.cc
mln_trait_windows_SOURCES = mln_trait_windows.cc
mln_trait_site_sets_SOURCES = mln_trait_site_sets.cc
mln_trait_image_from_grid_SOURCES = mln_trait_image_from_grid.cc
@@ -2212,7 +2240,6 @@ mln_core_concept_window_SOURCES = mln_core_concept_window.cc
mln_core_concept_value_SOURCES = mln_core_concept_value.cc
mln_core_concept_accumulator_SOURCES = mln_core_concept_accumulator.cc
mln_core_concept_site_set_SOURCES = mln_core_concept_site_set.cc
-mln_core_concept_object_id_SOURCES = mln_core_concept_object_id.cc
mln_core_concept_object_SOURCES = mln_core_concept_object.cc
mln_core_concept_meta_fun_SOURCES = mln_core_concept_meta_fun.cc
mln_core_concept_delta_point_site_SOURCES = mln_core_concept_delta_point_site.cc
@@ -2294,6 +2321,7 @@ mln_labeling_all_SOURCES = mln_labeling_all.cc
mln_labeling_level_SOURCES = mln_labeling_level.cc
mln_labeling_flat_zones_SOURCES = mln_labeling_flat_zones.cc
mln_labeling_foreground_SOURCES = mln_labeling_foreground.cc
+mln_labeling_colorize_SOURCES = mln_labeling_colorize.cc
mln_labeling_regional_maxima_SOURCES = mln_labeling_regional_maxima.cc
mln_labeling_wrap_SOURCES = mln_labeling_wrap.cc
mln_labeling_compute_SOURCES = mln_labeling_compute.cc
@@ -2386,7 +2414,6 @@ mln_norm_essential_SOURCES = mln_norm_essential.cc
mln_debug_iota_SOURCES = mln_debug_iota.cc
mln_debug_all_SOURCES = mln_debug_all.cc
mln_debug_println_with_border_SOURCES = mln_debug_println_with_border.cc
-mln_debug_colorize_SOURCES = mln_debug_colorize.cc
mln_debug_slices_2d_SOURCES = mln_debug_slices_2d.cc
mln_debug_draw_graph_SOURCES = mln_debug_draw_graph.cc
mln_debug_filename_SOURCES = mln_debug_filename.cc
@@ -2410,6 +2437,7 @@ mln_graph_attribute_card_SOURCES = mln_graph_attribute_card.cc
mln_graph_compute_SOURCES = mln_graph_compute.cc
mln_graph_essential_SOURCES = mln_graph_essential.cc
mln_set_uni_SOURCES = mln_set_uni.cc
+mln_set_compute_with_weights_SOURCES = mln_set_compute_with_weights.cc
mln_set_unique_SOURCES = mln_set_unique.cc
mln_set_inter_SOURCES = mln_set_inter.cc
mln_set_all_SOURCES = mln_set_all.cc
diff --git a/milena/tests/util/Makefile.am b/milena/tests/util/Makefile.am
index 07b6018..a808683 100644
--- a/milena/tests/util/Makefile.am
+++ b/milena/tests/util/Makefile.am
@@ -19,9 +19,7 @@ check_PROGRAMS = \
tree \
tree_fast \
tree_fast_to_image \
- tree_to_fast \
- tree_to_image
-
+ tree_to_fast
adjacency_matrix_SOURCES = adjacency_matrix.cc
branch_iter_SOURCES = branch_iter.cc
@@ -37,9 +35,7 @@ set_SOURCES = set.cc
soft_heap_SOURCES = soft_heap.cc
tree_SOURCES = tree.cc
tree_fast_SOURCES = tree_fast.cc
-tree_fast_to_image_SOURCES = tree_to_image.cc
tree_to_fast_SOURCES = tree_to_fast.cc
-tree_to_image_SOURCES = tree_to_image.cc
TESTS = $(check_PROGRAMS)
--
1.5.6.5
1
0
* milena/headers.mk: update distributed files list.
* milena/mln/core/image/edge_image.hh,
* milena/mln/core/image/vertex_image.hh: fix a wrong image type.
* milena/mln/fun/math/sup.hh: fix wrong template parameters.
* milena/mln/value/rgb.hh,
* milena/mln/util/essential.hh,
* milena/mln/util/all.hh,
* milena/mln/labeling/all.hh,
* milena/mln/debug/all.hh,
* milena/mln/fun/v2v/all.hh: fix includes.
* milena/mln/fun/v2v/rgb_to_hsi.hh: fix duplicate declarations.
* milena/mln/make/influence_zone_adjacency_graph.hh: add missing const
references.
* milena/mln/morpho/opening/area_on_vertices.hh: update according new
graph image types.
* milena/mln/registration/icp.hh: fix use of random_color.
* milena/mln/util/adjacency_matrix.hh: fix wrong ifndef.
* milena/mln/util/object_id.hh,
* milena/mln/util/vertex.hh,
* milena/mln/util/edge.hh: fix operator< and operator==.
* milena/mln/util/graph.hh: add preconditions.
* milena/mln/world/binary_2d/all.hh: new.
* milena/tests/morpho/closing/Makefile.am,
* milena/tests/morpho/closing/area_on_vertices.cc,
* milena/tests/morpho/opening/Makefile.am,
* milena/tests/morpho/opening/area_on_vertices.cc: new tests.
* milena/tests/unit_test/unit-tests.mk: update unit test list.
* milena/tests/util/Makefile.am,
* milena/tests/util/tree_fast_to_image.cc,
* milena/tests/util/tree_to_image.cc: remove tests.
---
milena/ChangeLog | 49 +++++++++++++
milena/headers.mk | 27 +++++---
milena/mln/core/image/edge_image.hh | 3 +-
milena/mln/core/image/vertex_image.hh | 3 +-
milena/mln/debug/all.hh | 3 +-
milena/mln/fun/math/sup.hh | 4 +-
milena/mln/fun/v2v/all.hh | 3 +
milena/mln/fun/v2v/rgb_to_hsi.hh | 53 --------------
milena/mln/labeling/all.hh | 1 +
milena/mln/make/influence_zone_adjacency_graph.hh | 13 ++--
milena/mln/morpho/opening/area_on_vertices.hh | 37 ++++++-----
milena/mln/registration/icp.hh | 3 +-
milena/mln/util/adjacency_matrix.hh | 4 +-
milena/mln/util/all.hh | 2 -
milena/mln/util/edge.hh | 8 ++-
milena/mln/util/essential.hh | 2 +-
milena/mln/util/graph.hh | 5 +-
milena/mln/util/object_id.hh | 7 ++
milena/mln/util/vertex.hh | 4 +-
milena/mln/value/rgb.hh | 1 +
.../{util/essential.hh => world/binary_2d/all.hh} | 26 +++----
milena/tests/morpho/closing/Makefile.am | 2 +
.../morpho/closing/area_on_vertices.cc} | 65 +++++++++---------
milena/tests/morpho/opening/Makefile.am | 2 +
.../morpho/opening/area_on_vertices.cc} | 65 +++++++++---------
milena/tests/unit_test/unit-tests.mk | 72 ++++++++++++++------
milena/tests/util/Makefile.am | 6 +--
27 files changed, 259 insertions(+), 211 deletions(-)
copy milena/mln/{util/essential.hh => world/binary_2d/all.hh} (70%)
copy milena/{mln/fun/math/sup.hh => tests/morpho/closing/area_on_vertices.cc} (58%)
copy milena/{mln/fun/math/sup.hh => tests/morpho/opening/area_on_vertices.cc} (58%)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 2fda128..e0e1cee 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,54 @@
2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+ Small fixes.
+
+ * milena/headers.mk: update distributed files list.
+
+ * milena/mln/core/image/edge_image.hh,
+ * milena/mln/core/image/vertex_image.hh: fix a wrong image type.
+
+ * milena/mln/fun/math/sup.hh: fix wrong template parameters.
+
+ * milena/mln/value/rgb.hh,
+ * milena/mln/util/essential.hh,
+ * milena/mln/util/all.hh,
+ * milena/mln/labeling/all.hh,
+ * milena/mln/debug/all.hh,
+ * milena/mln/fun/v2v/all.hh: fix includes.
+
+ * milena/mln/fun/v2v/rgb_to_hsi.hh: fix duplicate declarations.
+
+ * milena/mln/make/influence_zone_adjacency_graph.hh: add missing const
+ references.
+
+ * milena/mln/morpho/opening/area_on_vertices.hh: update according new
+ graph image types.
+
+ * milena/mln/registration/icp.hh: fix use of random_color.
+
+ * milena/mln/util/adjacency_matrix.hh: fix wrong ifndef.
+
+ * milena/mln/util/object_id.hh,
+ * milena/mln/util/vertex.hh,
+ * milena/mln/util/edge.hh: fix operator< and operator==.
+
+ * milena/mln/util/graph.hh: add preconditions.
+
+ * milena/mln/world/binary_2d/all.hh: new.
+
+ * milena/tests/morpho/closing/Makefile.am,
+ * milena/tests/morpho/closing/area_on_vertices.cc,
+ * milena/tests/morpho/opening/Makefile.am,
+ * milena/tests/morpho/opening/area_on_vertices.cc: new tests.
+
+ * milena/tests/unit_test/unit-tests.mk: update unit test list.
+
+ * milena/tests/util/Makefile.am,
+ * milena/tests/util/tree_fast_to_image.cc,
+ * milena/tests/util/tree_to_image.cc: remove tests.
+
+2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
Fix documentation.
* doc/Doxyfile.in: add macro definitions.
diff --git a/milena/headers.mk b/milena/headers.mk
index 34e4823..d241629 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -57,11 +57,18 @@ mln/literal/one.hh \
mln/literal/min.hh \
mln/literal/white.hh \
mln/literal/essential.hh \
+mln/world/all.hh \
mln/world/binary_2d/subsample.hh \
+mln/world/binary_2d/all.hh \
mln/world/binary_2d/projected_histo.hh \
+mln/world/inter_pixel/is_pixel.hh \
+mln/world/inter_pixel/all.hh \
mln/world/inter_pixel/neighb2d.hh \
-mln/world/inter_pixel/image2full.hh \
+mln/world/inter_pixel/is_separator.hh \
+mln/world/inter_pixel/immerse.hh \
+mln/world/inter_pixel/separator_to_pixels.hh \
mln/world/inter_pixel/display_edge.hh \
+mln/world/inter_pixel/compute.hh \
mln/world/inter_pixel/dim2/is_pixel.hh \
mln/world/inter_pixel/dim2/all.hh \
mln/world/inter_pixel/dim2/is_edge.hh \
@@ -82,7 +89,6 @@ mln/util/max.hh \
mln/util/lazy_set.hh \
mln/util/soft_heap.hh \
mln/util/set.hh \
-mln/util/tree_to_image.hh \
mln/util/lemmings.hh \
mln/util/greater_point.hh \
mln/util/internal/graph_iter_base.hh \
@@ -109,18 +115,13 @@ mln/util/yes.hh \
mln/util/line_graph.hh \
mln/util/ord.hh \
mln/util/adjacency_matrix.hh \
-mln/util/tree_fast_to_image.hh \
-mln/util/tree.hh \
mln/util/couple.hh \
mln/util/index.hh \
mln/util/multi_site.hh \
-mln/util/branch_iter.hh \
-mln/util/branch_iter_ind.hh \
-mln/util/tree_to_fast.hh \
mln/util/array.hh \
mln/util/vertex.hh \
mln/util/pix.hh \
-mln/util/tree_fast.hh \
+mln/util/object_id.hh \
mln/util/site_pair.hh \
mln/util/nil.hh \
mln/util/graph_ids.hh \
@@ -128,6 +129,7 @@ mln/util/eat.hh \
mln/util/essential.hh \
mln/data/memset_.hh \
mln/data/paste.spe.hh \
+mln/data/paste_without_localization.hh \
mln/data/memcpy_.hh \
mln/data/all.hh \
mln/data/paste.hh \
@@ -218,6 +220,8 @@ mln/fun/p2p/all.hh \
mln/fun/p2p/translation.hh \
mln/fun/p2p/mirror.hh \
mln/fun/accu_result.hh \
+mln/fun/stat/mahalanobis.hh \
+mln/fun/stat/all.hh \
mln/fun/binary_param.hh \
mln/fun/x2p/closest_point.hh \
mln/fun/x2p/all.hh \
@@ -295,6 +299,8 @@ mln/fun/vv2b/lt.hh \
mln/fun/vv2b/eq.hh \
mln/fun/cast.hh \
mln/fun/composition.hh \
+mln/fun/access/all.hh \
+mln/fun/access/mean.hh \
mln/fun/i2v/all.hh \
mln/fun/i2v/array.hh \
mln/fun/i2v/all_to.hh \
@@ -435,6 +441,7 @@ mln/accu/site_set/all.hh \
mln/accu/site_set/essential.hh \
mln/accu/stat/variance.hh \
mln/accu/stat/deviation.hh \
+mln/accu/stat/all.hh \
mln/accu/stat/var.hh \
mln/accu/max.hh \
mln/accu/lor.hh \
@@ -1026,7 +1033,6 @@ mln/core/concept/window.hh \
mln/core/concept/value.hh \
mln/core/concept/accumulator.hh \
mln/core/concept/site_set.hh \
-mln/core/concept/object_id.hh \
mln/core/concept/object.hh \
mln/core/concept/meta_fun.hh \
mln/core/concept/delta_point_site.hh \
@@ -1109,6 +1115,7 @@ mln/labeling/all.hh \
mln/labeling/level.hh \
mln/labeling/flat_zones.hh \
mln/labeling/foreground.hh \
+mln/labeling/colorize.hh \
mln/labeling/regional_maxima.hh \
mln/labeling/wrap.hh \
mln/labeling/compute.hh \
@@ -1207,7 +1214,6 @@ mln/debug/iota.hh \
mln/debug/all.hh \
mln/debug/println_with_border.hh \
mln/debug/println.spe.hh \
-mln/debug/colorize.hh \
mln/debug/slices_2d.hh \
mln/debug/draw_graph.hh \
mln/debug/filename.hh \
@@ -1233,6 +1239,7 @@ mln/graph/attribute/card.hh \
mln/graph/compute.hh \
mln/graph/essential.hh \
mln/set/uni.hh \
+mln/set/compute_with_weights.hh \
mln/set/unique.hh \
mln/set/inter.hh \
mln/set/all.hh \
diff --git a/milena/mln/core/image/edge_image.hh b/milena/mln/core/image/edge_image.hh
index 76d7fe0..3c71bb8 100644
--- a/milena/mln/core/image/edge_image.hh
+++ b/milena/mln/core/image/edge_image.hh
@@ -146,6 +146,7 @@ namespace mln
/// Function mapping graph elements to sites.
typedef typename internal::efsite_selector<P,G>::site_function_t
site_function_t;
+ typedef mln_result(site_function_t) function_result_t;
/// Window type
typedef graph_elt_window<G,p_edges<G,site_function_t> > win_t;
@@ -193,7 +194,7 @@ namespace mln
{
fun::i2v::array<V> f;
init_(tag::function, f, exact(model));
- p_edges<G,fun::i2v::array<P> > s;
+ p_edges<G, typename edge_image<P,V,G>::site_function_t> s;
init_(tag::domain, s, exact(model));
target.init_(f, s);
}
diff --git a/milena/mln/core/image/vertex_image.hh b/milena/mln/core/image/vertex_image.hh
index 3498ec7..0d62991 100644
--- a/milena/mln/core/image/vertex_image.hh
+++ b/milena/mln/core/image/vertex_image.hh
@@ -144,6 +144,7 @@ namespace mln
/// Function mapping graph elements to sites.
typedef typename internal::vfsite_selector<P,G>::site_function_t
site_function_t;
+ typedef mln_result(site_function_t) function_result_t;
/// Skeleton type.
@@ -187,7 +188,7 @@ namespace mln
{
fun::i2v::array<V> f;
init_(tag::function, f, exact(model));
- p_vertices<G,fun::i2v::array<P> > s;
+ p_vertices<G,typename edge_image<P,V,G>::site_function_t> s;
init_(tag::domain, s, exact(model));
target.init_(f, s);
}
diff --git a/milena/mln/debug/all.hh b/milena/mln/debug/all.hh
index 814c95b..e65e907 100644
--- a/milena/mln/debug/all.hh
+++ b/milena/mln/debug/all.hh
@@ -48,8 +48,8 @@ namespace mln
}
-# include <mln/debug/format.hh>
# include <mln/debug/draw_graph.hh>
+# include <mln/debug/format.hh>
# include <mln/debug/histo.hh>
# include <mln/debug/iota.hh>
# include <mln/debug/println.hh>
@@ -58,5 +58,4 @@ namespace mln
# include <mln/debug/quiet.hh>
# include <mln/debug/slices_2d.hh>
-
#endif // ! MLN_DEBUG_ALL_HH
diff --git a/milena/mln/fun/math/sup.hh b/milena/mln/fun/math/sup.hh
index 20e19bf..d76b4b2 100644
--- a/milena/mln/fun/math/sup.hh
+++ b/milena/mln/fun/math/sup.hh
@@ -46,7 +46,7 @@ namespace mln
namespace next
{
- template <typename T>
+ template <typename T1, typename T2>
struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
{
typedef set_binary_ ret;
@@ -66,5 +66,5 @@ namespace mln
} // end of namespace mln
-#endif /* ! MLN_FUN_MATH_SUP_HH */
+#endif // ! MLN_FUN_MATH_SUP_HH
diff --git a/milena/mln/fun/v2v/all.hh b/milena/mln/fun/v2v/all.hh
index 2d14054..65de5ca 100644
--- a/milena/mln/fun/v2v/all.hh
+++ b/milena/mln/fun/v2v/all.hh
@@ -54,11 +54,14 @@ namespace mln
# include <mln/fun/v2v/convert.hh>
# include <mln/fun/v2v/dec.hh>
# include <mln/fun/v2v/enc.hh>
+# include <mln/fun/v2v/hsi_to_rgb.hh>
+# include <mln/fun/v2v/hsl_to_rgb.hh>
# include <mln/fun/v2v/id.hh>
# include <mln/fun/v2v/linear.hh>
# include <mln/fun/v2v/norm.hh>
# include <mln/fun/v2v/projection.hh>
# include <mln/fun/v2v/rgb_to_hsi.hh>
+# include <mln/fun/v2v/rgb_to_hsl.hh>
# include <mln/fun/v2v/saturate.hh>
# include <mln/fun/v2v/wrap.hh>
diff --git a/milena/mln/fun/v2v/rgb_to_hsi.hh b/milena/mln/fun/v2v/rgb_to_hsi.hh
index bf9bd5d..c344343 100644
--- a/milena/mln/fun/v2v/rgb_to_hsi.hh
+++ b/milena/mln/fun/v2v/rgb_to_hsi.hh
@@ -61,28 +61,11 @@ namespace mln
extern f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
- template <typename T_rgb>
- struct f_hsi_to_rgb_ : public Function_v2v< f_hsi_to_rgb_<T_rgb> >
- {
- typedef T_rgb result;
-
- template <typename T_hsi>
- T_rgb operator()(const T_hsi& hsi) const;
-
- };
-
- typedef f_hsi_to_rgb_<value::rgb8> f_hsi_to_rgb_3x8_t;
-
- extern f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
-
-
# ifndef MLN_INCLUDE_ONLY
/// Global variables.
/// \{
f_rgb_to_hsi_f_t f_rgb_to_hsi_f;
-
- f_hsi_to_rgb_3x8_t f_hsi_to_rgb_3x8;
/// \}
@@ -120,42 +103,6 @@ namespace mln
}
- 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/labeling/all.hh b/milena/mln/labeling/all.hh
index 2931427..e90633b 100644
--- a/milena/mln/labeling/all.hh
+++ b/milena/mln/labeling/all.hh
@@ -55,6 +55,7 @@ namespace mln
# include <mln/labeling/background.hh>
# include <mln/labeling/blobs.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/labeling/compute.hh>
# include <mln/labeling/fill_holes.hh>
# include <mln/labeling/flat_zones.hh>
diff --git a/milena/mln/make/influence_zone_adjacency_graph.hh b/milena/mln/make/influence_zone_adjacency_graph.hh
index 6cbaa4c..a5c3462 100644
--- a/milena/mln/make/influence_zone_adjacency_graph.hh
+++ b/milena/mln/make/influence_zone_adjacency_graph.hh
@@ -56,14 +56,16 @@ namespace mln
/// Create a graph from an influence zone image.
///
/// \param[in] iz influence zone image.
+ /// \param[in] nbh A neighborhood.
/// \param[in] nlabels number of influence zone in \p iz.
///
/// \return util::graph Graph based on the adjacency of the influence zones.
+ //
template <typename I, typename N>
util::graph
influence_zone_adjacency_graph(const Image<I>& iz_,
const Neighborhood<N>& nbh,
- mln_value(I) nlabels);
+ const mln_value(I)& nlabels);
@@ -77,7 +79,7 @@ namespace mln
void
influence_zone_adjacency_graph_tests(const Image<I>& iz,
const Neighborhood<N>& nbh,
- mln_value(I))
+ const mln_value(I)&)
{
mln_precondition(exact(iz).is_valid());
mln_precondition(exact(nbh).is_valid());
@@ -94,11 +96,12 @@ namespace mln
namespace generic
{
+ /// Generic implementation of make::influence_zone_adjacency_graph.
template <typename I, typename N>
util::graph
influence_zone_adjacency_graph(const Image<I>& iz_,
const Neighborhood<N>& nbh_,
- mln_value(I) nlabels)
+ const mln_value(I)& nlabels)
{
trace::entering("make::impl::generic::influence_zone_adjacency_graph");
@@ -151,7 +154,7 @@ namespace mln
util::graph
influence_zone_adjacency_graph_dispatch(const Image<I>& iz,
const Neighborhood<N>& nbh,
- mln_value(I) nlabels)
+ const mln_value(I)& nlabels)
{
return make::impl::generic::influence_zone_adjacency_graph(iz, nbh, nlabels);
}
@@ -167,7 +170,7 @@ namespace mln
util::graph
influence_zone_adjacency_graph(const Image<I>& iz,
const Neighborhood<N>& nbh,
- mln_value(I) nlabels)
+ const mln_value(I)& nlabels)
{
trace::entering("make::influence_zone_adjacency_graph");
diff --git a/milena/mln/morpho/opening/area_on_vertices.hh b/milena/mln/morpho/opening/area_on_vertices.hh
index cb69d7f..f0ccd34 100644
--- a/milena/mln/morpho/opening/area_on_vertices.hh
+++ b/milena/mln/morpho/opening/area_on_vertices.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -34,8 +34,7 @@
/// Morphological area opening on a line graph image computing
/// the area in terms of adjacent vertices.
-# include <mln/pw/image.hh>
-# include <mln/core/site_set/p_edges.hh>
+# include <mln/core/image/edge_image.hh>
# include <mln/morpho/opening/algebraic.hh>
# include <mln/morpho/attribute/count_adjacent_vertices.hh>
@@ -49,32 +48,38 @@ namespace mln
namespace opening
{
- /// Morphological area opening on a mln::line_graph_image computing
- /// the area in terms of adjacent vertices.
- template <typename P2V, typename G, typename V2P, typename N>
- pw::image<P2V, p_edges<G, V2P> >
- area_on_vertices(const pw::image<P2V, p_edges<G, V2P> >& input,
+ /// Morphological area opening on a mln::line_graph_image computing
+ /// the area in terms of adjacent vertices.
+ ///
+ /// \param[in] input An edge image.
+ /// \param[in] nbh A graph neighborhood.
+ /// \param[in] lambda Closing parameter.
+ ///
+ /// \return An edge image.
+ //
+ template <typename P, typename V, typename G, typename N>
+ edge_image<P,V,G>
+ area_on_vertices(const edge_image<P,V,G>& input,
const Neighborhood<N>& nbh,
unsigned lambda);
# ifndef MLN_INCLUDE_ONLY
- template <typename P2V, typename G, typename V2P, typename N>
+ template <typename P, typename V, typename G, typename N>
inline
- pw::image<P2V, p_edges<G, V2P> >
- area_on_vertices(const pw::image<P2V, p_edges<G, V2P> >& input,
+ edge_image<P,V,G>
+ area_on_vertices(const edge_image<P,V,G>& input,
const Neighborhood<N>& nbh,
unsigned lambda)
{
trace::entering("morpho::opening::area_on_vertices");
mln_precondition(exact(input).is_valid());
- typedef p_edges<G, V2P> pe_t;
- typedef attribute::count_adjacent_vertices< pw::image<P2V, pe_t> > attribute_t;
+ typedef attribute::count_adjacent_vertices< edge_image<P,V,G> > attribute_t;
- pw::image<P2V, p_edges<G, V2P> > output;
- output = opening::algebraic(input, nbh, attribute_t(), lambda);
+ edge_image<P,V,G>
+ output = opening::algebraic(input, nbh, attribute_t(), lambda);
trace::exiting("morpho::opening::area_on_vertices");
return output;
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index a2bee09..25edf96 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -62,6 +62,7 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/debug/histo.hh>
# include <mln/accu/histo.hh>
@@ -200,7 +201,7 @@ namespace mln
mln_piter(p_array<P>) p(X);
for_all(p)
{
- debug(p) = debug::internal::random_color(value::rgb8());
+ debug(p) = labeling::internal::random_color(value::rgb8());
debug2(p) = true;
}
io::pbm::save(slice(debug2,0), "debug2-a.ppm");
diff --git a/milena/mln/util/adjacency_matrix.hh b/milena/mln/util/adjacency_matrix.hh
index dfda26f..9a60c94 100644
--- a/milena/mln/util/adjacency_matrix.hh
+++ b/milena/mln/util/adjacency_matrix.hh
@@ -250,9 +250,9 @@ namespace mln
::adjacency_matrix_impl_selector(const V& nelements)
{
(void) nelements;
-# ifndef DNDEBUG
+# ifndef NDEBUG
nelements_ = nelements;
-# endif // ! DNDEBUG
+# endif // ! NDEBUG
}
template <typename V>
diff --git a/milena/mln/util/all.hh b/milena/mln/util/all.hh
index 180b8a1..c6d9864 100644
--- a/milena/mln/util/all.hh
+++ b/milena/mln/util/all.hh
@@ -72,9 +72,7 @@ namespace mln
# include <mln/util/tracked_ptr.hh>
# include <mln/util/tree.hh>
# include <mln/util/tree_fast.hh>
-# include <mln/util/tree_fast_to_image.hh>
# include <mln/util/tree_to_fast.hh>
-//# include <mln/util/tree_to_image.hh>
# include <mln/util/vertex.hh>
# include <mln/util/yes.hh>
diff --git a/milena/mln/util/edge.hh b/milena/mln/util/edge.hh
index 0c759db..1de3648 100644
--- a/milena/mln/util/edge.hh
+++ b/milena/mln/util/edge.hh
@@ -359,15 +359,17 @@ namespace mln
bool
operator==(const edge<G>& lhs, const edge<G>& rhs)
{
- return lhs.pair_vertex_ == rhs.pair_vertex_;
+ return lhs.id() == rhs.id()
+ && (lhs.graph().is_subgraph_of(rhs.graph())
+ || rhs.graph().is_subgraph_of(lhs.graph()));
}
template <typename G>
inline
bool
- operator< (const edge<G>& lhs, const edge<G>& rhs)
+ operator<(const edge<G>& lhs, const edge<G>& rhs)
{
- return lhs.pair_vertex_ < rhs.pair_vertex_;
+ return lhs.id() < rhs.id();
}
} // end of namespace mln::util
diff --git a/milena/mln/util/essential.hh b/milena/mln/util/essential.hh
index 3c9b74f..d5eab8a 100644
--- a/milena/mln/util/essential.hh
+++ b/milena/mln/util/essential.hh
@@ -1,4 +1,5 @@
// 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
@@ -40,6 +41,5 @@
# include <mln/util/ord_pair.hh>
# include <mln/util/set.hh>
# include <mln/util/site_pair.hh>
-# include <mln/util/tree.hh>
#endif // ! MLN_UTIL_ESSENTIAL_HH
diff --git a/milena/mln/util/graph.hh b/milena/mln/util/graph.hh
index 83c0e8c..3ebd62d 100644
--- a/milena/mln/util/graph.hh
+++ b/milena/mln/util/graph.hh
@@ -385,7 +385,10 @@ namespace mln
edge_id_t
graph::add_edge(const vertex_id_t& id_v1, const vertex_id_t& id_v2)
{
- //FIXME: to be removed! We should not check that, except in without NDEBUG.
+ mln_precondition(id_v1 != id_v2);
+ mln_precondition(has_v(id_v1));
+ mln_precondition(has_v(id_v2));
+
// Does this edge already exist in the graph?
edge_data_t edge(id_v1, id_v2);
# ifndef NDEBUG
diff --git a/milena/mln/util/object_id.hh b/milena/mln/util/object_id.hh
index b3ea879..b50f2a5 100644
--- a/milena/mln/util/object_id.hh
+++ b/milena/mln/util/object_id.hh
@@ -185,6 +185,13 @@ namespace mln
+ template <typename Tag, typename V, typename V2>
+ inline
+ bool
+ operator==(const object_id<Tag,V>& lhs, const Value<V2>& rhs)
+ {
+ return lhs.value() == exact(rhs).to_equiv();
+ }
template <typename Tag, typename V>
inline
diff --git a/milena/mln/util/vertex.hh b/milena/mln/util/vertex.hh
index 4f0c5ad..6d5af65 100644
--- a/milena/mln/util/vertex.hh
+++ b/milena/mln/util/vertex.hh
@@ -378,7 +378,9 @@ namespace mln
bool
operator==(const vertex<G>& v1, const vertex<G>& v2)
{
- return v1.id() == v2.id();
+ return v1.id() == v2.id()
+ && (v1.graph().is_subgraph_of(v2.graph())
+ || v2.graph().is_subgraph_of(v1.graph()));
}
template<typename G>
diff --git a/milena/mln/value/rgb.hh b/milena/mln/value/rgb.hh
index ebeeb5e..54e6b76 100644
--- a/milena/mln/value/rgb.hh
+++ b/milena/mln/value/rgb.hh
@@ -42,6 +42,7 @@
# include <mln/value/ops.hh>
+# include <mln/fun/v2v/hsl_to_rgb.hh>
# include <mln/value/concept/vectorial.hh>
# include <mln/value/int_u.hh>
# include <mln/algebra/vec.hh>
diff --git a/milena/mln/util/essential.hh b/milena/mln/world/binary_2d/all.hh
similarity index 70%
copy from milena/mln/util/essential.hh
copy to milena/mln/world/binary_2d/all.hh
index 3c9b74f..cf94381 100644
--- a/milena/mln/util/essential.hh
+++ b/milena/mln/world/binary_2d/all.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008, 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
@@ -25,21 +25,17 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_UTIL_ESSENTIAL_HH
-# define MLN_UTIL_ESSENTIAL_HH
+#ifndef MLN_WORLD_BINARY_2D_ALL_HH
+# define MLN_WORLD_BINARY_2D_ALL_HH
-/// \file mln/util/essential.hh
+/// \file mln/world/all.hh
///
-/// File that includes essential util-related routines.
+/// File that includes all the world routines.
-# include <mln/util/array.hh>
-# include <mln/util/couple.hh>
-# include <mln/util/lazy_set.hh>
-# include <mln/util/lemmings.hh>
-# include <mln/util/ord.hh>
-# include <mln/util/ord_pair.hh>
-# include <mln/util/set.hh>
-# include <mln/util/site_pair.hh>
-# include <mln/util/tree.hh>
-#endif // ! MLN_UTIL_ESSENTIAL_HH
+// Sub-directories.
+# include <mln/world/binary_2d/projected_histo.hh>
+# include <mln/world/binary_2d/subsample.hh>
+
+
+#endif // ! MLN_WORLD_BINARY_2D_ALL_HH
diff --git a/milena/tests/morpho/closing/Makefile.am b/milena/tests/morpho/closing/Makefile.am
index 6d5ee0a..696cd14 100644
--- a/milena/tests/morpho/closing/Makefile.am
+++ b/milena/tests/morpho/closing/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = \
approx
check_PROGRAMS = \
+ area_on_vertices \
leveling \
algebraic \
height \
@@ -14,6 +15,7 @@ check_PROGRAMS = \
structural \
sum
+area_on_vertices_SOURCES = area_on_vertices.cc
leveling_SOURCES = leveling.cc
algebraic_SOURCES = algebraic.cc
height_SOURCES = height.cc
diff --git a/milena/mln/fun/math/sup.hh b/milena/tests/morpho/closing/area_on_vertices.cc
similarity index 58%
copy from milena/mln/fun/math/sup.hh
copy to milena/tests/morpho/closing/area_on_vertices.cc
index 20e19bf..4d8db2d 100644
--- a/milena/mln/fun/math/sup.hh
+++ b/milena/tests/morpho/closing/area_on_vertices.cc
@@ -7,7 +7,7 @@
//
// 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 F PARTICULAR PURPOSE. See the GNU
+// 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
@@ -25,46 +25,43 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_FUN_MATH_SUP_HH
-# define MLN_FUN_MATH_SUP_HH
+/// \file tests/morpho/closing/area_on_vertices.cc
+///
+/// Test on mln::morpho::closing::area_on_vertices.
-# include <mln/fun/binary.hh>
-# include <mln/math/max.hh>
+#include <mln/core/image/edge_image.hh>
+#include <mln/morpho/closing/area_on_vertices.hh>
+#include <mln/util/graph.hh>
+#include <mln/fun/i2v/array.hh>
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct sup : binary<sup> {};
- }
+#include "tests/data.hh"
- namespace trait
- {
- namespace next
- {
+const unsigned result[] = { 101, 101, 102 };
- template <typename T>
- struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
- {
- typedef set_binary_ ret;
- typedef mln_trait_promote(T1, T2) result;
- typedef T1 argument1;
- typedef T2 argument2;
-
- static result read(const argument1& a, const argument1& b)
- {
- return math::max(a, b);
- }
- };
+int main()
+{
+ using namespace mln;
- } // end of namespace mln::trait::next
+ util::graph gr;
+ gr.add_vertices(5);
+ gr.add_edge(1, 3);
+ gr.add_edge(1, 2);
+ gr.add_edge(2 ,4);
- } // end of namespace mln::trait
+ fun::i2v::array<unsigned> f(5);
+ for (unsigned i = 0; i < 5; ++i)
+ f(i) = 100 + i;
+ typedef edge_image<void,unsigned> e_ima_t;
+ e_ima_t e_ima(gr, f);
+ typedef e_ima_t::nbh_t nbh_t;
+ nbh_t nbh;
-} // end of namespace mln
+ e_ima_t clo = morpho::closing::area_on_vertices(e_ima, nbh, 3);
-#endif /* ! MLN_FUN_MATH_SUP_HH */
+ unsigned i = 0;
+ mln_piter_(e_ima_t) p(clo.domain());
+ for_all(p)
+ mln_assertion(result[i++] == clo(p));
+}
diff --git a/milena/tests/morpho/opening/Makefile.am b/milena/tests/morpho/opening/Makefile.am
index f0abae0..5f7e44a 100644
--- a/milena/tests/morpho/opening/Makefile.am
+++ b/milena/tests/morpho/opening/Makefile.am
@@ -6,6 +6,7 @@ SUBDIRS = \
approx
check_PROGRAMS = \
+ area_on_vertices \
leveling \
algebraic \
height \
@@ -14,6 +15,7 @@ check_PROGRAMS = \
structural \
sum
+area_on_vertices_SOURCES = area_on_vertices.cc
leveling_SOURCES = leveling.cc
algebraic_SOURCES = algebraic.cc
height_SOURCES = height.cc
diff --git a/milena/mln/fun/math/sup.hh b/milena/tests/morpho/opening/area_on_vertices.cc
similarity index 58%
copy from milena/mln/fun/math/sup.hh
copy to milena/tests/morpho/opening/area_on_vertices.cc
index 20e19bf..f259770 100644
--- a/milena/mln/fun/math/sup.hh
+++ b/milena/tests/morpho/opening/area_on_vertices.cc
@@ -7,7 +7,7 @@
//
// 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 F PARTICULAR PURPOSE. See the GNU
+// 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
@@ -25,46 +25,43 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_FUN_MATH_SUP_HH
-# define MLN_FUN_MATH_SUP_HH
+/// \file tests/morpho/opening/area_on_vertices.cc
+///
+/// Test on mln::morpho::opening::area_on_vertices.
-# include <mln/fun/binary.hh>
-# include <mln/math/max.hh>
+#include <mln/core/image/edge_image.hh>
+#include <mln/morpho/opening/area_on_vertices.hh>
+#include <mln/util/graph.hh>
+#include <mln/fun/i2v/array.hh>
-namespace mln
-{
-
- // Cosinus, bijective
- namespace fun
- {
- struct sup : binary<sup> {};
- }
+#include "tests/data.hh"
- namespace trait
- {
- namespace next
- {
+const unsigned result[] = { 100, 101, 101 };
- template <typename T>
- struct set_binary_<mln::fun::sup, mln::Object, T1, mln::Object, T2>
- {
- typedef set_binary_ ret;
- typedef mln_trait_promote(T1, T2) result;
- typedef T1 argument1;
- typedef T2 argument2;
-
- static result read(const argument1& a, const argument1& b)
- {
- return math::max(a, b);
- }
- };
+int main()
+{
+ using namespace mln;
- } // end of namespace mln::trait::next
+ util::graph gr;
+ gr.add_vertices(5);
+ gr.add_edge(1, 3);
+ gr.add_edge(1, 2);
+ gr.add_edge(2 ,4);
- } // end of namespace mln::trait
+ fun::i2v::array<unsigned> f(5);
+ for (unsigned i = 0; i < 5; ++i)
+ f(i) = 100 + i;
+ typedef edge_image<void,unsigned> e_ima_t;
+ e_ima_t e_ima(gr, f);
+ typedef e_ima_t::nbh_t nbh_t;
+ nbh_t nbh;
-} // end of namespace mln
+ e_ima_t clo = morpho::opening::area_on_vertices(e_ima, nbh, 3);
-#endif /* ! MLN_FUN_MATH_SUP_HH */
+ unsigned i = 0;
+ mln_piter_(e_ima_t) p(clo.domain());
+ for_all(p)
+ mln_assertion(result[i++] == clo(p));
+}
diff --git a/milena/tests/unit_test/unit-tests.mk b/milena/tests/unit_test/unit-tests.mk
index 6869395..37f1d72 100644
--- a/milena/tests/unit_test/unit-tests.mk
+++ b/milena/tests/unit_test/unit-tests.mk
@@ -55,16 +55,25 @@ mln_literal_one \
mln_literal_min \
mln_literal_white \
mln_literal_essential \
+mln_world_all \
mln_world_binary_2d_subsample \
+mln_world_binary_2d_all \
mln_world_binary_2d_projected_histo \
+mln_world_inter_pixel_is_pixel \
+mln_world_inter_pixel_all \
mln_world_inter_pixel_neighb2d \
-mln_world_inter_pixel_full \
+mln_world_inter_pixel_is_separator \
+mln_world_inter_pixel_immerse \
+mln_world_inter_pixel_separator_to_pixels \
mln_world_inter_pixel_display_edge \
+mln_world_inter_pixel_compute \
mln_world_inter_pixel_dim2_is_pixel \
mln_world_inter_pixel_dim2_all \
mln_world_inter_pixel_dim2_is_edge \
+mln_world_inter_pixel_dim2_make_edge_image \
mln_world_inter_pixel_dim2_is_dot \
mln_world_inter_pixel_dim2_is_row_odd \
+mln_world_inter_pixel_full2image \
mln_registration_get_rtransf \
mln_registration_internal_rms \
mln_registration_get_rot \
@@ -78,7 +87,6 @@ mln_util_max \
mln_util_lazy_set \
mln_util_soft_heap \
mln_util_set \
-mln_util_tree_to_image \
mln_util_lemmings \
mln_util_greater_point \
mln_util_internal_graph_iter_base \
@@ -104,24 +112,21 @@ mln_util_timer \
mln_util_yes \
mln_util_line_graph \
mln_util_ord \
-mln_util_tree_fast_to_image \
-mln_util_tree \
+mln_util_adjacency_matrix \
mln_util_couple \
mln_util_index \
mln_util_multi_site \
-mln_util_branch_iter \
-mln_util_branch_iter_ind \
-mln_util_tree_to_fast \
mln_util_array \
mln_util_vertex \
mln_util_pix \
-mln_util_tree_fast \
+mln_util_object_id \
mln_util_site_pair \
mln_util_nil \
mln_util_graph_ids \
mln_util_eat \
mln_util_essential \
mln_data_memset_ \
+mln_data_paste_without_localization \
mln_data_memcpy_ \
mln_data_all \
mln_data_paste \
@@ -210,6 +215,8 @@ mln_fun_p2p_all \
mln_fun_p2p_translation \
mln_fun_p2p_mirror \
mln_fun_accu_result \
+mln_fun_stat_mahalanobis \
+mln_fun_stat_all \
mln_fun_binary_param \
mln_fun_x2p_closest_point \
mln_fun_x2p_all \
@@ -287,6 +294,8 @@ mln_fun_vv2b_lt \
mln_fun_vv2b_eq \
mln_fun_cast \
mln_fun_composition \
+mln_fun_access_all \
+mln_fun_access_mean \
mln_fun_i2v_all \
mln_fun_i2v_array \
mln_fun_i2v_all_to \
@@ -297,10 +306,13 @@ mln_fun_x2x_translation \
mln_fun_x2x_rotation \
mln_fun_x2x_essential \
mln_fun_component_red \
+mln_fun_component_comp_count \
+mln_fun_component_scomp \
mln_fun_component_green \
mln_fun_component_comp \
mln_fun_component_blue \
mln_fun_component_rgb \
+mln_fun_component_ithcomp \
mln_fun_compose \
mln_fun_meta_red \
mln_fun_meta_hue \
@@ -424,6 +436,7 @@ mln_accu_site_set_all \
mln_accu_site_set_essential \
mln_accu_stat_variance \
mln_accu_stat_deviation \
+mln_accu_stat_all \
mln_accu_stat_var \
mln_accu_max \
mln_accu_lor \
@@ -471,6 +484,7 @@ mln_accu_image_init \
mln_accu_image_to_result \
mln_accu_image_all \
mln_accu_image_set_value \
+mln_accu_image_untake \
mln_accu_image_take \
mln_accu_image_take_as_init \
mln_accu_image_take_n_times \
@@ -559,7 +573,6 @@ mln_trait_ch_function_value \
mln_trait_ch_value \
mln_trait_solve \
mln_trait_solve_unary \
-mln_trait_fun \
mln_trait_op_postdec \
mln_trait_op_mod \
mln_trait_op_lor \
@@ -587,6 +600,7 @@ mln_trait_op_uplus \
mln_trait_op_essential \
mln_trait_op_eq \
mln_trait_concrete \
+mln_trait_functions \
mln_trait_windows \
mln_trait_site_sets \
mln_trait_image_from_grid \
@@ -994,7 +1008,6 @@ mln_core_concept_window \
mln_core_concept_value \
mln_core_concept_accumulator \
mln_core_concept_site_set \
-mln_core_concept_object_id \
mln_core_concept_object \
mln_core_concept_meta_fun \
mln_core_concept_delta_point_site \
@@ -1076,6 +1089,7 @@ mln_labeling_all \
mln_labeling_level \
mln_labeling_flat_zones \
mln_labeling_foreground \
+mln_labeling_colorize \
mln_labeling_regional_maxima \
mln_labeling_wrap \
mln_labeling_compute \
@@ -1168,7 +1182,6 @@ mln_norm_essential \
mln_debug_iota \
mln_debug_all \
mln_debug_println_with_border \
-mln_debug_colorize \
mln_debug_slices_2d \
mln_debug_draw_graph \
mln_debug_filename \
@@ -1192,6 +1205,7 @@ mln_graph_attribute_card \
mln_graph_compute \
mln_graph_essential \
mln_set_uni \
+mln_set_compute_with_weights \
mln_set_unique \
mln_set_inter \
mln_set_all \
@@ -1273,16 +1287,25 @@ mln_literal_one_SOURCES = mln_literal_one.cc
mln_literal_min_SOURCES = mln_literal_min.cc
mln_literal_white_SOURCES = mln_literal_white.cc
mln_literal_essential_SOURCES = mln_literal_essential.cc
+mln_world_all_SOURCES = mln_world_all.cc
mln_world_binary_2d_subsample_SOURCES = mln_world_binary_2d_subsample.cc
+mln_world_binary_2d_all_SOURCES = mln_world_binary_2d_all.cc
mln_world_binary_2d_projected_histo_SOURCES = mln_world_binary_2d_projected_histo.cc
+mln_world_inter_pixel_is_pixel_SOURCES = mln_world_inter_pixel_is_pixel.cc
+mln_world_inter_pixel_all_SOURCES = mln_world_inter_pixel_all.cc
mln_world_inter_pixel_neighb2d_SOURCES = mln_world_inter_pixel_neighb2d.cc
-mln_world_inter_pixel_full_SOURCES = mln_world_inter_pixel_full.cc
+mln_world_inter_pixel_is_separator_SOURCES = mln_world_inter_pixel_is_separator.cc
+mln_world_inter_pixel_immerse_SOURCES = mln_world_inter_pixel_immerse.cc
+mln_world_inter_pixel_separator_to_pixels_SOURCES = mln_world_inter_pixel_separator_to_pixels.cc
mln_world_inter_pixel_display_edge_SOURCES = mln_world_inter_pixel_display_edge.cc
+mln_world_inter_pixel_compute_SOURCES = mln_world_inter_pixel_compute.cc
mln_world_inter_pixel_dim2_is_pixel_SOURCES = mln_world_inter_pixel_dim2_is_pixel.cc
mln_world_inter_pixel_dim2_all_SOURCES = mln_world_inter_pixel_dim2_all.cc
mln_world_inter_pixel_dim2_is_edge_SOURCES = mln_world_inter_pixel_dim2_is_edge.cc
+mln_world_inter_pixel_dim2_make_edge_image_SOURCES = mln_world_inter_pixel_dim2_make_edge_image.cc
mln_world_inter_pixel_dim2_is_dot_SOURCES = mln_world_inter_pixel_dim2_is_dot.cc
mln_world_inter_pixel_dim2_is_row_odd_SOURCES = mln_world_inter_pixel_dim2_is_row_odd.cc
+mln_world_inter_pixel_full2image_SOURCES = mln_world_inter_pixel_full2image.cc
mln_registration_get_rtransf_SOURCES = mln_registration_get_rtransf.cc
mln_registration_internal_rms_SOURCES = mln_registration_internal_rms.cc
mln_registration_get_rot_SOURCES = mln_registration_get_rot.cc
@@ -1296,7 +1319,6 @@ mln_util_max_SOURCES = mln_util_max.cc
mln_util_lazy_set_SOURCES = mln_util_lazy_set.cc
mln_util_soft_heap_SOURCES = mln_util_soft_heap.cc
mln_util_set_SOURCES = mln_util_set.cc
-mln_util_tree_to_image_SOURCES = mln_util_tree_to_image.cc
mln_util_lemmings_SOURCES = mln_util_lemmings.cc
mln_util_greater_point_SOURCES = mln_util_greater_point.cc
mln_util_internal_graph_iter_base_SOURCES = mln_util_internal_graph_iter_base.cc
@@ -1322,24 +1344,21 @@ mln_util_timer_SOURCES = mln_util_timer.cc
mln_util_yes_SOURCES = mln_util_yes.cc
mln_util_line_graph_SOURCES = mln_util_line_graph.cc
mln_util_ord_SOURCES = mln_util_ord.cc
-mln_util_tree_fast_to_image_SOURCES = mln_util_tree_fast_to_image.cc
-mln_util_tree_SOURCES = mln_util_tree.cc
+mln_util_adjacency_matrix_SOURCES = mln_util_adjacency_matrix.cc
mln_util_couple_SOURCES = mln_util_couple.cc
mln_util_index_SOURCES = mln_util_index.cc
mln_util_multi_site_SOURCES = mln_util_multi_site.cc
-mln_util_branch_iter_SOURCES = mln_util_branch_iter.cc
-mln_util_branch_iter_ind_SOURCES = mln_util_branch_iter_ind.cc
-mln_util_tree_to_fast_SOURCES = mln_util_tree_to_fast.cc
mln_util_array_SOURCES = mln_util_array.cc
mln_util_vertex_SOURCES = mln_util_vertex.cc
mln_util_pix_SOURCES = mln_util_pix.cc
-mln_util_tree_fast_SOURCES = mln_util_tree_fast.cc
+mln_util_object_id_SOURCES = mln_util_object_id.cc
mln_util_site_pair_SOURCES = mln_util_site_pair.cc
mln_util_nil_SOURCES = mln_util_nil.cc
mln_util_graph_ids_SOURCES = mln_util_graph_ids.cc
mln_util_eat_SOURCES = mln_util_eat.cc
mln_util_essential_SOURCES = mln_util_essential.cc
mln_data_memset__SOURCES = mln_data_memset_.cc
+mln_data_paste_without_localization_SOURCES = mln_data_paste_without_localization.cc
mln_data_memcpy__SOURCES = mln_data_memcpy_.cc
mln_data_all_SOURCES = mln_data_all.cc
mln_data_paste_SOURCES = mln_data_paste.cc
@@ -1428,6 +1447,8 @@ mln_fun_p2p_all_SOURCES = mln_fun_p2p_all.cc
mln_fun_p2p_translation_SOURCES = mln_fun_p2p_translation.cc
mln_fun_p2p_mirror_SOURCES = mln_fun_p2p_mirror.cc
mln_fun_accu_result_SOURCES = mln_fun_accu_result.cc
+mln_fun_stat_mahalanobis_SOURCES = mln_fun_stat_mahalanobis.cc
+mln_fun_stat_all_SOURCES = mln_fun_stat_all.cc
mln_fun_binary_param_SOURCES = mln_fun_binary_param.cc
mln_fun_x2p_closest_point_SOURCES = mln_fun_x2p_closest_point.cc
mln_fun_x2p_all_SOURCES = mln_fun_x2p_all.cc
@@ -1505,6 +1526,8 @@ mln_fun_vv2b_lt_SOURCES = mln_fun_vv2b_lt.cc
mln_fun_vv2b_eq_SOURCES = mln_fun_vv2b_eq.cc
mln_fun_cast_SOURCES = mln_fun_cast.cc
mln_fun_composition_SOURCES = mln_fun_composition.cc
+mln_fun_access_all_SOURCES = mln_fun_access_all.cc
+mln_fun_access_mean_SOURCES = mln_fun_access_mean.cc
mln_fun_i2v_all_SOURCES = mln_fun_i2v_all.cc
mln_fun_i2v_array_SOURCES = mln_fun_i2v_array.cc
mln_fun_i2v_all_to_SOURCES = mln_fun_i2v_all_to.cc
@@ -1515,10 +1538,13 @@ mln_fun_x2x_translation_SOURCES = mln_fun_x2x_translation.cc
mln_fun_x2x_rotation_SOURCES = mln_fun_x2x_rotation.cc
mln_fun_x2x_essential_SOURCES = mln_fun_x2x_essential.cc
mln_fun_component_red_SOURCES = mln_fun_component_red.cc
+mln_fun_component_comp_count_SOURCES = mln_fun_component_comp_count.cc
+mln_fun_component_scomp_SOURCES = mln_fun_component_scomp.cc
mln_fun_component_green_SOURCES = mln_fun_component_green.cc
mln_fun_component_comp_SOURCES = mln_fun_component_comp.cc
mln_fun_component_blue_SOURCES = mln_fun_component_blue.cc
mln_fun_component_rgb_SOURCES = mln_fun_component_rgb.cc
+mln_fun_component_ithcomp_SOURCES = mln_fun_component_ithcomp.cc
mln_fun_compose_SOURCES = mln_fun_compose.cc
mln_fun_meta_red_SOURCES = mln_fun_meta_red.cc
mln_fun_meta_hue_SOURCES = mln_fun_meta_hue.cc
@@ -1642,6 +1668,7 @@ mln_accu_site_set_all_SOURCES = mln_accu_site_set_all.cc
mln_accu_site_set_essential_SOURCES = mln_accu_site_set_essential.cc
mln_accu_stat_variance_SOURCES = mln_accu_stat_variance.cc
mln_accu_stat_deviation_SOURCES = mln_accu_stat_deviation.cc
+mln_accu_stat_all_SOURCES = mln_accu_stat_all.cc
mln_accu_stat_var_SOURCES = mln_accu_stat_var.cc
mln_accu_max_SOURCES = mln_accu_max.cc
mln_accu_lor_SOURCES = mln_accu_lor.cc
@@ -1689,6 +1716,7 @@ mln_accu_image_init_SOURCES = mln_accu_image_init.cc
mln_accu_image_to_result_SOURCES = mln_accu_image_to_result.cc
mln_accu_image_all_SOURCES = mln_accu_image_all.cc
mln_accu_image_set_value_SOURCES = mln_accu_image_set_value.cc
+mln_accu_image_untake_SOURCES = mln_accu_image_untake.cc
mln_accu_image_take_SOURCES = mln_accu_image_take.cc
mln_accu_image_take_as_init_SOURCES = mln_accu_image_take_as_init.cc
mln_accu_image_take_n_times_SOURCES = mln_accu_image_take_n_times.cc
@@ -1777,7 +1805,6 @@ mln_trait_ch_function_value_SOURCES = mln_trait_ch_function_value.cc
mln_trait_ch_value_SOURCES = mln_trait_ch_value.cc
mln_trait_solve_SOURCES = mln_trait_solve.cc
mln_trait_solve_unary_SOURCES = mln_trait_solve_unary.cc
-mln_trait_fun_SOURCES = mln_trait_fun.cc
mln_trait_op_postdec_SOURCES = mln_trait_op_postdec.cc
mln_trait_op_mod_SOURCES = mln_trait_op_mod.cc
mln_trait_op_lor_SOURCES = mln_trait_op_lor.cc
@@ -1805,6 +1832,7 @@ mln_trait_op_uplus_SOURCES = mln_trait_op_uplus.cc
mln_trait_op_essential_SOURCES = mln_trait_op_essential.cc
mln_trait_op_eq_SOURCES = mln_trait_op_eq.cc
mln_trait_concrete_SOURCES = mln_trait_concrete.cc
+mln_trait_functions_SOURCES = mln_trait_functions.cc
mln_trait_windows_SOURCES = mln_trait_windows.cc
mln_trait_site_sets_SOURCES = mln_trait_site_sets.cc
mln_trait_image_from_grid_SOURCES = mln_trait_image_from_grid.cc
@@ -2212,7 +2240,6 @@ mln_core_concept_window_SOURCES = mln_core_concept_window.cc
mln_core_concept_value_SOURCES = mln_core_concept_value.cc
mln_core_concept_accumulator_SOURCES = mln_core_concept_accumulator.cc
mln_core_concept_site_set_SOURCES = mln_core_concept_site_set.cc
-mln_core_concept_object_id_SOURCES = mln_core_concept_object_id.cc
mln_core_concept_object_SOURCES = mln_core_concept_object.cc
mln_core_concept_meta_fun_SOURCES = mln_core_concept_meta_fun.cc
mln_core_concept_delta_point_site_SOURCES = mln_core_concept_delta_point_site.cc
@@ -2294,6 +2321,7 @@ mln_labeling_all_SOURCES = mln_labeling_all.cc
mln_labeling_level_SOURCES = mln_labeling_level.cc
mln_labeling_flat_zones_SOURCES = mln_labeling_flat_zones.cc
mln_labeling_foreground_SOURCES = mln_labeling_foreground.cc
+mln_labeling_colorize_SOURCES = mln_labeling_colorize.cc
mln_labeling_regional_maxima_SOURCES = mln_labeling_regional_maxima.cc
mln_labeling_wrap_SOURCES = mln_labeling_wrap.cc
mln_labeling_compute_SOURCES = mln_labeling_compute.cc
@@ -2386,7 +2414,6 @@ mln_norm_essential_SOURCES = mln_norm_essential.cc
mln_debug_iota_SOURCES = mln_debug_iota.cc
mln_debug_all_SOURCES = mln_debug_all.cc
mln_debug_println_with_border_SOURCES = mln_debug_println_with_border.cc
-mln_debug_colorize_SOURCES = mln_debug_colorize.cc
mln_debug_slices_2d_SOURCES = mln_debug_slices_2d.cc
mln_debug_draw_graph_SOURCES = mln_debug_draw_graph.cc
mln_debug_filename_SOURCES = mln_debug_filename.cc
@@ -2410,6 +2437,7 @@ mln_graph_attribute_card_SOURCES = mln_graph_attribute_card.cc
mln_graph_compute_SOURCES = mln_graph_compute.cc
mln_graph_essential_SOURCES = mln_graph_essential.cc
mln_set_uni_SOURCES = mln_set_uni.cc
+mln_set_compute_with_weights_SOURCES = mln_set_compute_with_weights.cc
mln_set_unique_SOURCES = mln_set_unique.cc
mln_set_inter_SOURCES = mln_set_inter.cc
mln_set_all_SOURCES = mln_set_all.cc
diff --git a/milena/tests/util/Makefile.am b/milena/tests/util/Makefile.am
index 07b6018..a808683 100644
--- a/milena/tests/util/Makefile.am
+++ b/milena/tests/util/Makefile.am
@@ -19,9 +19,7 @@ check_PROGRAMS = \
tree \
tree_fast \
tree_fast_to_image \
- tree_to_fast \
- tree_to_image
-
+ tree_to_fast
adjacency_matrix_SOURCES = adjacency_matrix.cc
branch_iter_SOURCES = branch_iter.cc
@@ -37,9 +35,7 @@ set_SOURCES = set.cc
soft_heap_SOURCES = soft_heap.cc
tree_SOURCES = tree.cc
tree_fast_SOURCES = tree_fast.cc
-tree_fast_to_image_SOURCES = tree_to_image.cc
tree_to_fast_SOURCES = tree_to_fast.cc
-tree_to_image_SOURCES = tree_to_image.cc
TESTS = $(check_PROGRAMS)
--
1.6.1.2
1
0
* doc/Doxyfile.in: add macro definitions.
* doc/outputs/outputs.mk: update output reference files list.
* headers.mk: update distributed files list.
* apps/statues/trimesh/misc.hh,
* doc/examples/tuto3/first_routine.cc,
* mln/accu/compute.hh,
* mln/accu/line.hh,
* mln/core/image/graph_elt_window_if.hh,
* mln/data/fill_with_image.hh,
* mln/data/paste.hh,
* mln/fun/x2x/composed.hh,
* mln/geom/pmin_pmax.hh,
* mln/geom/seeds2tiling.hh,
* mln/io/dump/save.hh,
* mln/io/txt/save.hh,
* mln/labeling/compute.hh,
* mln/labeling/pack.hh,
* mln/labeling/relabel.hh,
* mln/util/internal/id2element.hh,
* mln/world/inter_pixel/dim2/is_dot.hh,
* mln/world/inter_pixel/dim2/is_edge.hh,
* mln/world/inter_pixel/dim2/is_pixel.hh,
* mln/world/inter_pixel/dim2/is_row_odd.hh,
* mln/world/inter_pixel/full2image.hh,
* tests/accu/site_set/rectangularity.cc,
* tests/make/region_adjacency_graph.cc,
* mln/level/median.hh,
* mln/level/stretch.hh,
* mln/level/transform.hh,
* mln/level/transform_inplace.hh,
* mln/level/update.hh,
* mln/make/dummy_p_edges.hh,
* mln/make/dummy_p_vertices.hh,
* mln/make/edge_image.hh,
* mln/make/rag_and_labeled_wsl.hh,
* mln/make/region_adjacency_graph.hh,
* mln/make/relabelfun.hh,
* mln/morpho/closing/area_on_vertices.hh,
* mln/registration/icp.hh,
* tests/morpho/Rd.cc: Fix documentation issues/missing documentation.
---
milena/ChangeLog | 48 +++++++++++++++++++++++
milena/apps/statues/trimesh/misc.hh | 5 +-
milena/doc/Doxyfile.in | 11 ++++-
milena/doc/examples/tuto3/first_routine.cc | 2 +-
milena/doc/outputs/outputs.mk | 1 +
milena/headers.mk | 11 ++++-
milena/mln/accu/compute.hh | 6 ++-
milena/mln/accu/line.hh | 6 ++-
milena/mln/core/image/graph_elt_window_if.hh | 2 +-
milena/mln/data/fill_with_image.hh | 5 ++
milena/mln/data/paste.hh | 12 ++++++
milena/mln/fun/x2x/composed.hh | 4 +-
milena/mln/geom/pmin_pmax.hh | 12 +++---
milena/mln/geom/seeds2tiling.hh | 26 ++++++++-----
milena/mln/io/dump/save.hh | 8 ++++
milena/mln/io/txt/save.hh | 7 ++-
milena/mln/labeling/pack.hh | 10 +++--
milena/mln/labeling/relabel.hh | 26 ++++++------
milena/mln/level/median.hh | 3 +-
milena/mln/level/stretch.hh | 13 ++++++-
milena/mln/level/transform.hh | 5 +-
milena/mln/level/transform_inplace.hh | 7 ++-
milena/mln/level/update.hh | 10 +++--
milena/mln/make/dummy_p_edges.hh | 2 +-
milena/mln/make/dummy_p_vertices.hh | 2 +-
milena/mln/make/edge_image.hh | 6 +-
milena/mln/make/rag_and_labeled_wsl.hh | 4 +-
milena/mln/make/region_adjacency_graph.hh | 13 +++---
milena/mln/make/relabelfun.hh | 11 ++++-
milena/mln/morpho/closing/area_on_vertices.hh | 8 +++-
milena/mln/registration/icp.hh | 14 ++++++-
milena/mln/util/internal/id2element.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_dot.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_edge.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_pixel.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_row_odd.hh | 2 +-
milena/mln/world/inter_pixel/full2image.hh | 8 ++--
milena/tests/accu/site_set/rectangularity.cc | 2 +-
milena/tests/make/region_adjacency_graph.cc | 2 +-
milena/tests/morpho/Rd.cc | 2 +-
40 files changed, 231 insertions(+), 93 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f9eea0c..2fda128 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,51 @@
+2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Fix documentation.
+
+ * doc/Doxyfile.in: add macro definitions.
+
+ * doc/outputs/outputs.mk: update output reference files list.
+
+ * headers.mk: update distributed files list.
+
+ * apps/statues/trimesh/misc.hh,
+ * doc/examples/tuto3/first_routine.cc,
+ * mln/accu/compute.hh,
+ * mln/accu/line.hh,
+ * mln/core/image/graph_elt_window_if.hh,
+ * mln/data/fill_with_image.hh,
+ * mln/data/paste.hh,
+ * mln/fun/x2x/composed.hh,
+ * mln/geom/pmin_pmax.hh,
+ * mln/geom/seeds2tiling.hh,
+ * mln/io/dump/save.hh,
+ * mln/io/txt/save.hh,
+ * mln/labeling/compute.hh,
+ * mln/labeling/pack.hh,
+ * mln/labeling/relabel.hh,
+ * mln/util/internal/id2element.hh,
+ * mln/world/inter_pixel/dim2/is_dot.hh,
+ * mln/world/inter_pixel/dim2/is_edge.hh,
+ * mln/world/inter_pixel/dim2/is_pixel.hh,
+ * mln/world/inter_pixel/dim2/is_row_odd.hh,
+ * mln/world/inter_pixel/full2image.hh,
+ * tests/accu/site_set/rectangularity.cc,
+ * tests/make/region_adjacency_graph.cc,
+ * mln/level/median.hh,
+ * mln/level/stretch.hh,
+ * mln/level/transform.hh,
+ * mln/level/transform_inplace.hh,
+ * mln/level/update.hh,
+ * mln/make/dummy_p_edges.hh,
+ * mln/make/dummy_p_vertices.hh,
+ * mln/make/edge_image.hh,
+ * mln/make/rag_and_labeled_wsl.hh,
+ * mln/make/region_adjacency_graph.hh,
+ * mln/make/relabelfun.hh,
+ * mln/morpho/closing/area_on_vertices.hh,
+ * mln/registration/icp.hh,
+ * tests/morpho/Rd.cc: Fix documentation issues/missing documentation.
+
2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
diff --git a/milena/apps/statues/trimesh/misc.hh b/milena/apps/statues/trimesh/misc.hh
index a9f0fce..d72477d 100644
--- a/milena/apps/statues/trimesh/misc.hh
+++ b/milena/apps/statues/trimesh/misc.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 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
@@ -474,7 +475,7 @@ namespace mln
Jean Cousty. Artwork 3D Model Database Indexing and
Classification.
- \param[in] ima The surface (triangle mesh) on which the
+ \param[in] mesh The surface (triangle mesh) on which the
curvature is to be computed. */
/* FIXME: We should restrict attached data to vertices in return
value. */
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index f088755..cedcbc1 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -215,7 +215,7 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret"
"mln_enc(T)=typename T::enc" \
"mln_value(T)=typename T::value" \
"mln_qlf_value(T)=typename T::qlf_value" \
- "mln_pset(T)=typename T::pset" \
+ "mln_domain(T)=typename T::domain_t" \
"mln_sum(T)=typename mln::value::props<T>::sum" \
"mln_vset(T)=typename T::vset" \
"mln_rvalue(T)=typename T::rvalue" \
@@ -250,7 +250,7 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret"
"mln_enc_(T)=T::enc" \
"mln_value_(T)=T::value" \
"mln_qlf_value_(T)=T::qlf_value" \
- "mln_pset_(T)=T::pset" \
+ "mln_domain_(T)=T::domain_t" \
"mln_sum_(T)=mln::value::props<T>::sum" \
"mln_vset_(T)=T::vset" \
"mln_rvalue_(T)=T::rvalue" \
@@ -286,7 +286,12 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret"
"mln_gradient(I)=mln::value::stack_image< I::point::dim, mln::trait::ch_value< I, mln::value::props< typename I::value >::sum >::ret >" \
"mln_trait_value_sum_product(T, U)=typename mln::trait::value_< mln_trait_op_times(T,U) >::sum" \
"mln_sum_product(T, U)=typename mln::trait::value_< mln_trait_op_times(T,U) >::sum" \
- "mln_deduce(T, A1, A2)=typename T::A1::A2"
+ "mln_deduce(T, A1, A2)=typename T::A1::A2" \
+ "mln_graph_element(T)=typename T::graph_element" \
+ "mln_graph_element_(T)=T::graph_element"
+ "mln_fun_vv2v(F, L, R)=mln::fun::vv2v::F< mln_value(L), mln_value(R) >" \
+ "mln_fun_vv2v_result(F, L, R)=typename mln_fun_vv2v(F, L, R)::result" \
+ "mln_ch_fun_vv2v(F, L, R)=typename mln::trait::ch_value< L, typename mln_fun_vv2v(F, L, R)::result >::ret"
diff --git a/milena/doc/examples/tuto3/first_routine.cc b/milena/doc/examples/tuto3/first_routine.cc
index b4d3b58..5ed5919 100644
--- a/milena/doc/examples/tuto3/first_routine.cc
+++ b/milena/doc/examples/tuto3/first_routine.cc
@@ -1,4 +1,4 @@
-/// \file doc/examples/first_routine.cc
+/// \file doc/examples/tuto3/first_routine.cc
#include <mln/essential/2d.hh>
#include <tests/data.hh>
diff --git a/milena/doc/outputs/outputs.mk b/milena/doc/outputs/outputs.mk
index ac10062..5b9de7c 100644
--- a/milena/doc/outputs/outputs.mk
+++ b/milena/doc/outputs/outputs.mk
@@ -21,6 +21,7 @@ outputs/box2d-bbox.txt \
outputs/graph-iter.txt \
outputs/graph-output-1.txt \
outputs/fill-call-1.txt \
+outputs/site_set_create.txt \
outputs/ima2d-rot.txt \
outputs/paste-call-1.txt \
outputs/fun-p2v-1.txt \
diff --git a/milena/headers.mk b/milena/headers.mk
index 7d75826..34e4823 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -60,13 +60,15 @@ mln/literal/essential.hh \
mln/world/binary_2d/subsample.hh \
mln/world/binary_2d/projected_histo.hh \
mln/world/inter_pixel/neighb2d.hh \
-mln/world/inter_pixel/full.hh \
+mln/world/inter_pixel/image2full.hh \
mln/world/inter_pixel/display_edge.hh \
mln/world/inter_pixel/dim2/is_pixel.hh \
mln/world/inter_pixel/dim2/all.hh \
mln/world/inter_pixel/dim2/is_edge.hh \
+mln/world/inter_pixel/dim2/make_edge_image.hh \
mln/world/inter_pixel/dim2/is_dot.hh \
mln/world/inter_pixel/dim2/is_row_odd.hh \
+mln/world/inter_pixel/full2image.hh \
mln/registration/get_rtransf.hh \
mln/registration/internal/rms.hh \
mln/registration/get_rot.hh \
@@ -106,6 +108,7 @@ mln/util/timer.hh \
mln/util/yes.hh \
mln/util/line_graph.hh \
mln/util/ord.hh \
+mln/util/adjacency_matrix.hh \
mln/util/tree_fast_to_image.hh \
mln/util/tree.hh \
mln/util/couple.hh \
@@ -302,10 +305,13 @@ mln/fun/x2x/translation.hh \
mln/fun/x2x/rotation.hh \
mln/fun/x2x/essential.hh \
mln/fun/component/red.hh \
+mln/fun/component/comp_count.hh \
+mln/fun/component/scomp.hh \
mln/fun/component/green.hh \
mln/fun/component/comp.hh \
mln/fun/component/blue.hh \
mln/fun/component/rgb.hh \
+mln/fun/component/ithcomp.hh \
mln/fun/compose.hh \
mln/fun/meta/red.hh \
mln/fun/meta/hue.hh \
@@ -476,6 +482,7 @@ mln/accu/image/init.hh \
mln/accu/image/to_result.hh \
mln/accu/image/all.hh \
mln/accu/image/set_value.hh \
+mln/accu/image/untake.hh \
mln/accu/image/take.hh \
mln/accu/image/take_as_init.hh \
mln/accu/image/take_n_times.hh \
@@ -566,7 +573,6 @@ mln/trait/ch_function_value.hh \
mln/trait/ch_value.hh \
mln/trait/solve.hh \
mln/trait/solve_unary.hh \
-mln/trait/fun.hh \
mln/trait/op/postdec.hh \
mln/trait/op/mod.hh \
mln/trait/op/lor.hh \
@@ -594,6 +600,7 @@ mln/trait/op/uplus.hh \
mln/trait/op/essential.hh \
mln/trait/op/eq.hh \
mln/trait/concrete.hh \
+mln/trait/functions.hh \
mln/trait/windows.hh \
mln/trait/site_sets.hh \
mln/trait/image_from_grid.hh \
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index a632fa8..f78c6ec 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -50,6 +50,7 @@ namespace mln
/// Make an accumulator compute the pixels of the image \p input.
///
/// \param[in] input The input image.
+ /// \param[in] a An accumulator.
///
/// This routine runs: \n
/// a.take(make::pix(input, p));
@@ -65,6 +66,7 @@ namespace mln
/// Make an accumulator compute the pixels of the image \p input.
///
/// \param[in] input The input image.
+ /// \param[in] a A meta accumulator.
///
/// This routine runs: \n
/// a.take(make::pix(input, p));
diff --git a/milena/mln/accu/line.hh b/milena/mln/accu/line.hh
index b4f30a7..4fec281 100644
--- a/milena/mln/accu/line.hh
+++ b/milena/mln/accu/line.hh
@@ -51,8 +51,10 @@ namespace mln
/*! Line an accumulator onto the pixel values of the image \p input.
*
* \param[in] input The input image.
- * \param[in] a The accumulator.
- * \return The accumulator result.
+ * \param[in] p_start The starting site of the line.
+ * \param[in] len The line length.
+ * \param[in] half_length The half length of the line.
+ * \param[in,out] output The resulting image.
*
* This routine runs: \n
* tmp = \p a \n
diff --git a/milena/mln/core/image/graph_elt_window_if.hh b/milena/mln/core/image/graph_elt_window_if.hh
index dd4f6d9..c03ac79 100644
--- a/milena/mln/core/image/graph_elt_window_if.hh
+++ b/milena/mln/core/image/graph_elt_window_if.hh
@@ -125,7 +125,7 @@ namespace mln
/// Default. Construct an invalid window.
graph_elt_window_if();
- /// \param[in] graph_image A graph image.
+ /// \param[in] mask A graph image of bool.
///
/// \sa vertex_image, edge_image.
graph_elt_window_if(const Image<I>& mask);
diff --git a/milena/mln/data/fill_with_image.hh b/milena/mln/data/fill_with_image.hh
index 3b79e72..df67089 100644
--- a/milena/mln/data/fill_with_image.hh
+++ b/milena/mln/data/fill_with_image.hh
@@ -95,6 +95,11 @@ namespace mln
namespace generic
{
+ /// Generic implementation.
+ ///
+ /// \param[in,out] ima The image to be filled.
+ /// \param[in] data The image.
+ //
template <typename I, typename J>
void fill_with_image(Image<I>& ima_, const Image<J>& data_)
{
diff --git a/milena/mln/data/paste.hh b/milena/mln/data/paste.hh
index ef3911d..740a2a1 100644
--- a/milena/mln/data/paste.hh
+++ b/milena/mln/data/paste.hh
@@ -72,6 +72,12 @@ namespace mln
namespace internal
{
+ /// Internal tests for data::paste.
+ ///
+ /// \param[in] input The input image providing pixels values.
+ /// \param[in,out] output The image in which values are
+ /// assigned.
+ //
template <typename I, typename J>
inline
void paste_tests(const Image<I>& input, Image<J>& output)
@@ -97,6 +103,12 @@ namespace mln
namespace generic
{
+ /// Generic implementation of data::paste.
+ ///
+ /// \param[in] input The input image providing pixels values.
+ /// \param[in,out] output The image in which values are
+ /// assigned.
+ //
template <typename I, typename J>
inline
void paste(const Image<I>& input_, Image<J>& output_)
diff --git a/milena/mln/fun/x2x/composed.hh b/milena/mln/fun/x2x/composed.hh
index 0bc20b3..49d74f2 100644
--- a/milena/mln/fun/x2x/composed.hh
+++ b/milena/mln/fun/x2x/composed.hh
@@ -153,9 +153,9 @@ namespace mln
mlc_is(T2, Bijection_x2x<T2>)::value &&
mlc_is(T1, Bijection_x2x<T1>)::value>(f, g)
{}
-};
+ };
-} // end of namespace mln::fun::x2x
+ } // end of namespace mln::fun::x2x
} // end of namespace mln::fun
diff --git a/milena/mln/geom/pmin_pmax.hh b/milena/mln/geom/pmin_pmax.hh
index 3f28fe9..12e3ea7 100644
--- a/milena/mln/geom/pmin_pmax.hh
+++ b/milena/mln/geom/pmin_pmax.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 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,11 +29,10 @@
#ifndef MLN_GEOM_PMIN_PMAX_HH
# define MLN_GEOM_PMIN_PMAX_HH
-/*! \file mln/geom/pmin_pmax.hh
- *
- * \brief Several routines to compute the minimum point and/or maximum
- * point.
- */
+/// \file mln/geom/pmin_pmax.hh
+///
+/// Several routines to compute the minimum point and/or maximum
+/// point.
# include <utility>
diff --git a/milena/mln/geom/seeds2tiling.hh b/milena/mln/geom/seeds2tiling.hh
index 0dc8eef..85fb3ce 100644
--- a/milena/mln/geom/seeds2tiling.hh
+++ b/milena/mln/geom/seeds2tiling.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -29,10 +29,9 @@
#ifndef MLN_GEOM_SEEDS2TILING_HH
# define MLN_GEOM_SEEDS2TILING_HH
-/*! \file mln/geom/seeds2tiling.hh
- *
- * \brief Convert a binary image with seeds into a labeled image.
- */
+/// \file mln/geom/seeds2tiling.hh
+///
+/// Convert a binary image with seeds into a labeled image.
# include <map>
@@ -46,27 +45,34 @@
namespace mln
{
+
namespace geom
{
- /// \brief Take a labeled image \p ima_ with seeds and extend them
+ /// Take a labeled image \p ima_ with seeds and extend them
/// until creating tiles.
///
/// \param[in,out] ima_ The labeled image with seed.
/// \param[in] nbh The neighborhood to use on this algorithm.
///
- /// \pre \p ima_ has to be initialized.
+ /// \return A tiled image.
///
- /// \{
+ /// \pre \p ima_ has to be initialized.
+ //
template <typename I, typename N>
I seeds2tiling (Image<I>& ima_, const Neighborhood<N>& nbh);
- /// \}
+
# ifndef MLN_INCLUDE_ONLY
namespace impl
{
+ /// Generic implementation of geom::seed2tiling.
+ ///
+ /// \param[in,out] ima_ The labeled image with seed.
+ /// \param[in] nbh The neighborhood to use on this algorithm.
+ //
template <typename I, typename N>
inline
I
diff --git a/milena/mln/io/dump/save.hh b/milena/mln/io/dump/save.hh
index 41d4571..5056dc6 100644
--- a/milena/mln/io/dump/save.hh
+++ b/milena/mln/io/dump/save.hh
@@ -31,6 +31,7 @@
/// \file mln/io/dump/save.hh
///
/// Save a Milena image by dumping its data to a file.
+///
/// \todo handle endianness.
# include <iostream>
@@ -42,6 +43,7 @@
# include <mln/data/memcpy_.hh>
# include <mln/trait/value_.hh>
+
namespace mln
{
@@ -55,12 +57,15 @@ namespace mln
///
/// \param[in] ima_ The image to save.
/// \param[in] filename the destination.
+ //
template <typename I>
void save(const Image<I>& ima_, const std::string& filename);
+
# ifndef MLN_INCLUDE_ONLY
+
namespace internal
{
@@ -121,6 +126,9 @@ namespace mln
} // end of namespace mln::io::dump::internal
+
+ // Facade
+
template <typename I>
void save(const Image<I>& ima_, const std::string& filename)
{
diff --git a/milena/mln/io/txt/save.hh b/milena/mln/io/txt/save.hh
index 4cc4e39..db0d423 100644
--- a/milena/mln/io/txt/save.hh
+++ b/milena/mln/io/txt/save.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Olena Library. This library is free
@@ -31,7 +31,7 @@
/// \file mln/io/txt/save.hh
///
-/// \brief Save an image as txt file.
+/// Save an image as txt file.
# include <iostream>
# include <fstream>
@@ -52,8 +52,9 @@ namespace mln
/// Save an image as txt file.
///
- /// \param[in] ima_ The image to save. Must be an image of char.
+ /// \param[in] ima The image to save. Must be an image of char.
/// \param[in] filename the destination.
+ //
void
save(const image2d<char>& ima, const std::string& filename);
diff --git a/milena/mln/labeling/pack.hh b/milena/mln/labeling/pack.hh
index 5235cd3..29ef2c2 100644
--- a/milena/mln/labeling/pack.hh
+++ b/milena/mln/labeling/pack.hh
@@ -52,8 +52,9 @@ namespace mln
{
/// Relabel a labeled image in order to have a contiguous labeling.
- /// \input[in] label The labeled image.
- /// \input[out] new_nlabels The number of labels after relabeling.
+ ///
+ /// \param[in] label The labeled image.
+ /// \param[out] new_nlabels The number of labels after relabeling.
///
/// \return The relabeled image.
//
@@ -65,8 +66,9 @@ namespace mln
/// Relabel inplace a labeled image in order to have a contiguous
/// labeling.
- /// \input[in] label The labeled image.
- /// \input[out] new_nlabels The number of labels after relabeling.
+ ///
+ /// \param[in] label The labeled image.
+ /// \param[out] new_nlabels The number of labels after relabeling.
//
template <typename I>
void
diff --git a/milena/mln/labeling/relabel.hh b/milena/mln/labeling/relabel.hh
index a775bfa..60b150f 100644
--- a/milena/mln/labeling/relabel.hh
+++ b/milena/mln/labeling/relabel.hh
@@ -52,10 +52,10 @@ namespace mln
{
/// Remove components and relabel a labeled image.
- /// \input[in] label the labeled image.
- /// \input[in] nlabels the number of labels in \p label.
- /// \input[out] new_nlabels the number of labels after relabeling.
- /// \input[in] f function returning whether a label must be replaced
+ /// \param[in] label the labeled image.
+ /// \param[in] nlabels the number of labels in \p label.
+ /// \param[out] new_nlabels the number of labels after relabeling.
+ /// \param[in] fv2b function returning whether a label must be replaced
/// by the background.
///
/// \return the relabeled image.
@@ -69,9 +69,9 @@ namespace mln
/// Remove components and relabel a labeled image.
- /// \input[in] label the labeled image.
- /// \input[in] nlabels the number of labels in \p label.
- /// \input[in] f function returning the new component id for each pixel
+ /// \param[in] label the labeled image.
+ /// \param[in] nlabels the number of labels in \p label.
+ /// \param[in] fv2v function returning the new component id for each pixel
/// value.
///
/// \return the relabeled image.
@@ -84,9 +84,9 @@ namespace mln
/// Remove components and relabel a labeled image inplace.
- /// \input[in, out] label the labeled image.
- /// \input[in, out] nlabels the number of labels in \p label.
- /// \input[in] f function returning whether a label must be replaced
+ /// \param[in, out] label the labeled image.
+ /// \param[in, out] nlabels the number of labels in \p label.
+ /// \param[in] fv2b function returning whether a label must be replaced
/// by the background.
//
template <typename I, typename F>
@@ -97,9 +97,9 @@ namespace mln
/// Remove components and relabel a labeled image inplace.
- /// \input[in, out] label the labeled image.
- /// \input[in, out] nlabels the number of labels in \p label.
- /// \input[in] f function returning the new component id for each
+ /// \param[in, out] label the labeled image.
+ /// \param[in, out] nlabels the number of labels in \p label.
+ /// \param[in] fv2v function returning the new component id for each
/// pixel value.
//
template <typename I, typename F>
diff --git a/milena/mln/level/median.hh b/milena/mln/level/median.hh
index 4a5c3cd..f62c7e5 100644
--- a/milena/mln/level/median.hh
+++ b/milena/mln/level/median.hh
@@ -59,9 +59,8 @@ namespace mln
*
* \param[in] input The image to be filtered.
* \param[in] win The window.
- * \param[out] output The output image.
*
- * \pre \p input and \p output have to be initialized.
+ * \pre \p input have to be initialized.
*/
template <typename I, typename W>
mln_concrete(I)
diff --git a/milena/mln/level/stretch.hh b/milena/mln/level/stretch.hh
index 63bac49..f10f4e3 100644
--- a/milena/mln/level/stretch.hh
+++ b/milena/mln/level/stretch.hh
@@ -57,7 +57,8 @@ namespace mln
*
* \param[in] v A value to set the output value type.
* \param[in] input The input image.
- * \param[out] output The result image.
+ *
+ * \return A stretch image with values of the same type as \p v.
*
* \pre input.is_valid
*/
@@ -71,6 +72,13 @@ namespace mln
namespace impl
{
+ /// Generic implementation of level::stretch.
+ ///
+ /// \param[in] v A value to set the output value type.
+ /// \param[in] input The input image.
+ ///
+ /// \return A stretch image with values of the same type as \p v.
+ //
template <typename V, typename I>
inline
mln_ch_value(I, V)
@@ -112,6 +120,9 @@ namespace mln
} // end of namespace mln::level::impl
+
+ // Facade
+
template <typename V, typename I>
inline
mln_ch_value(I, V)
diff --git a/milena/mln/level/transform.hh b/milena/mln/level/transform.hh
index 07ed377..f61fbc9 100644
--- a/milena/mln/level/transform.hh
+++ b/milena/mln/level/transform.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -130,6 +130,7 @@ namespace mln
namespace generic
{
+ /// Generic implementation of level::transform.
template <typename I, typename F>
mln_ch_value(I, mln_result(F))
transform(const Image<I>& input_, const Function_v2v<F>& f_)
diff --git a/milena/mln/level/transform_inplace.hh b/milena/mln/level/transform_inplace.hh
index ca85b28..dc632e2 100644
--- a/milena/mln/level/transform_inplace.hh
+++ b/milena/mln/level/transform_inplace.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
@@ -8,7 +9,7 @@
// 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.
+// 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
@@ -64,7 +65,7 @@ namespace mln
/*! Transform inplace the image \p ima with the image \p aux
through a function \p f.
*
- * \param[in] ima1 The image to be transformed.
+ * \param[in] ima The image to be transformed.
* \param[in] aux The auxiliary image.
* \param[in] f The function.
*
diff --git a/milena/mln/level/update.hh b/milena/mln/level/update.hh
index 10632a5..306d1ad 100644
--- a/milena/mln/level/update.hh
+++ b/milena/mln/level/update.hh
@@ -90,6 +90,7 @@ namespace mln
namespace generic
{
+ /// Generic implementation of level::update.
template <typename A, typename I>
inline
mln_result(A)
@@ -112,21 +113,22 @@ namespace mln
} // end of namespace mln::level::impl::generic
+ /// Fastest implementation of level::update.
template <typename A, typename I>
inline
mln_result(A)
update_fastest(Accumulator<A>& a_, const Image<I>& input_)
{
trace::entering("level::impl::update_fastest");
-
+
A& a = exact(a_);
const I& input = exact(input_);
level::internal::update_tests(a, input);
-
+
mln_pixter(const I) pxl(input);
for_all(pxl)
a.take(pxl.val());
-
+
trace::exiting("level::impl::update_fastest");
return a.to_result();
}
@@ -134,7 +136,7 @@ namespace mln
} // end of namespace mln::level::impl
-
+
// Dispatch.
diff --git a/milena/mln/make/dummy_p_edges.hh b/milena/mln/make/dummy_p_edges.hh
index 7c17aec..aaf17f8 100644
--- a/milena/mln/make/dummy_p_edges.hh
+++ b/milena/mln/make/dummy_p_edges.hh
@@ -62,7 +62,7 @@ namespace mln
/// Create a p_edges which associate a graph element to a constant site.
/// \c 0 (int) is used as dummy site.
///
- /// \param[in] g_ A graph.
+ /// \param[in] g A graph.
///
/// \return A p_edges.
//
diff --git a/milena/mln/make/dummy_p_vertices.hh b/milena/mln/make/dummy_p_vertices.hh
index c9c643d..462473a 100644
--- a/milena/mln/make/dummy_p_vertices.hh
+++ b/milena/mln/make/dummy_p_vertices.hh
@@ -62,7 +62,7 @@ namespace mln
/// Create a p_vertices which associate a graph element to a constant site.
/// \c 0 (int) is used as dummy site.
///
- /// \param[in] g_ A graph.
+ /// \param[in] g A graph.
///
/// \return A p_vertices.
//
diff --git a/milena/mln/make/edge_image.hh b/milena/mln/make/edge_image.hh
index bd03162..0c2deff 100644
--- a/milena/mln/make/edge_image.hh
+++ b/milena/mln/make/edge_image.hh
@@ -60,7 +60,7 @@ namespace mln
/// Construct an edge image.
///
- /// \param[in] g A graph
+ /// \param[in] g_ A graph
/// \param[in] fp A function mapping edge ids to sites.
/// \param[in] fv A function mapping edge ids to values.
///
@@ -78,7 +78,7 @@ namespace mln
///
/// \param[in] v_ima_ A vertex image.
/// \param[in] pe A p_edges mapping graph element to sites .
- /// \param[in] fv A function mapping two vertex ids to a value.
+ /// \param[in] fv_ A function mapping two vertex ids to a value.
/// The result is associated to the corresponding edge.
///
/// \return an edge image.
@@ -94,7 +94,7 @@ namespace mln
/// Construct an edge image.
///
/// \param[in] v_ima_ A vertex image.
- /// \param[in] fv A function mapping two vertex ids to a value.
+ /// \param[in] fv_ A function mapping two vertex ids to a value.
/// The result is associated to the corresponding edge.
///
/// \return an edge image without localization information mapped to
diff --git a/milena/mln/make/rag_and_labeled_wsl.hh b/milena/mln/make/rag_and_labeled_wsl.hh
index 60f2824..c170d18 100644
--- a/milena/mln/make/rag_and_labeled_wsl.hh
+++ b/milena/mln/make/rag_and_labeled_wsl.hh
@@ -57,8 +57,8 @@ namespace mln
/// Create a region adjacency graph and a label image of the watershed line
/// from a watershed image.
///
- /// \param[in] wshd Watershed image.
- /// \param[in] nbh Neighborhood
+ /// \param[in] wshd_ Watershed image.
+ /// \param[in] nbh_ Neighborhood
/// \param[in] nbasins Number of influence zone in \p wshd.
///
/// \return A couple. First element is the graph, second element is an
diff --git a/milena/mln/make/region_adjacency_graph.hh b/milena/mln/make/region_adjacency_graph.hh
index b930367..ba2e177 100644
--- a/milena/mln/make/region_adjacency_graph.hh
+++ b/milena/mln/make/region_adjacency_graph.hh
@@ -53,7 +53,8 @@ namespace mln
/// Create a region adjacency graph from a watershed image.
///
- /// \param[in] wshd watershed image.
+ /// \param[in] wshd_ watershed image.
+ /// \param[in] nbh A neighborhood.
/// \param[in] nbasins number of influence zone in \p wshd.
///
/// \return util::graph Graph based on the adjacency of the influence zones.
@@ -61,7 +62,7 @@ namespace mln
util::graph
region_adjacency_graph(const Image<I>& wshd_,
const Neighborhood<N>& nbh,
- mln_value(I) nbasins);
+ const mln_value(I)& nbasins);
@@ -75,7 +76,7 @@ namespace mln
void
region_adjacency_graph_tests(const Image<I>& wshd,
const Neighborhood<N>& nbh,
- mln_value(I))
+ const mln_value(I)&)
{
mln_precondition(exact(wshd).is_valid());
mln_precondition(exact(nbh).is_valid());
@@ -96,7 +97,7 @@ namespace mln
util::graph
region_adjacency_graph(const Image<I>& wshd_,
const Neighborhood<N>& nbh_,
- mln_value(I) nbasins)
+ const mln_value(I)& nbasins)
{
trace::entering("make::impl::generic::region_adjacency_graph");
@@ -163,7 +164,7 @@ namespace mln
util::graph
region_adjacency_graph_dispatch(const Image<I>& wshd,
const Neighborhood<N>& nbh,
- mln_value(I) nbasins)
+ const mln_value(I)& nbasins)
{
return make::impl::generic::region_adjacency_graph(wshd, nbh, nbasins);
}
@@ -179,7 +180,7 @@ namespace mln
util::graph
region_adjacency_graph(const Image<I>& wshd,
const Neighborhood<N>& nbh,
- mln_value(I) nbasins)
+ const mln_value(I)& nbasins)
{
trace::entering("make::region_adjacency_graph");
diff --git a/milena/mln/make/relabelfun.hh b/milena/mln/make/relabelfun.hh
index 19b072d..11fe1fe 100644
--- a/milena/mln/make/relabelfun.hh
+++ b/milena/mln/make/relabelfun.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
@@ -45,7 +46,9 @@ namespace mln
/// Create a i2v function from a v2b function.
/// This function can be used to relabel a labeled image.
///
- /// \param[in] f a v2b function.
+ /// \param[in] fv2b A v2b function.
+ /// \param[in] nlabels The number of labels.
+ /// \param[in] new_nlabels The number of labels after relabeling.
///
/// \return a i2v function.
///
@@ -59,7 +62,9 @@ namespace mln
/// Create a i2v function from a v2v function.
/// This function can be used to relabel a labeled image.
///
- /// \param[in] f a v2v function.
+ /// \param[in] fv2v A v2v function.
+ /// \param[in] nlabels The number of labels.
+ /// \param[in] new_nlabels The number of labels after relabeling.
///
/// \return a i2v function.
///
diff --git a/milena/mln/morpho/closing/area_on_vertices.hh b/milena/mln/morpho/closing/area_on_vertices.hh
index 099e473..46c6774 100644
--- a/milena/mln/morpho/closing/area_on_vertices.hh
+++ b/milena/mln/morpho/closing/area_on_vertices.hh
@@ -34,7 +34,6 @@
/// Morphological area closing on a line graph image computing
/// the area in terms of adjacent vertices.
-# include <mln/pw/image.hh>
# include <mln/core/image/edge_image.hh>
# include <mln/morpho/closing/algebraic.hh>
# include <mln/morpho/attribute/count_adjacent_vertices.hh>
@@ -51,6 +50,13 @@ namespace mln
/// Morphological area closing on a mln::line_graph_image computing
/// the area in terms of adjacent vertices.
+ ///
+ /// \param[in] input An edge image.
+ /// \param[in] nbh A graph neighborhood.
+ /// \param[in] lambda Closing parameter.
+ ///
+ /// \return An edge image.
+ //
template <typename P, typename V, typename G, typename N>
edge_image<P,V,G>
area_on_vertices(const edge_image<P,V,G>& input,
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index 540efba..a2bee09 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -90,11 +90,13 @@ namespace mln
/*! Register point in \p c using a function of closest points
* \p closest_point.
+ * This overload allows to specify initial transformations.
*
* \param[in] P_ The cloud of points.
* \param[in] X the reference surface.
* \param[in] closest_point The function of closest points.
- * \param[out] qk The rigid transformation obtained.
+ * \param[in] initial_rot An initial rotation.
+ * \param[in] initial_translation An initial translation.
*
* \return the rigid transformation which may be use later to create
* a registered image.
@@ -118,6 +120,16 @@ namespace mln
const mln_vec(P)& initial_translation);
+ /*! Register point in \p c using a function of closest points
+ * \p closest_point.
+ *
+ * \param[in] P_ The cloud of points.
+ * \param[in] X the reference surface.
+ * \param[in] closest_point The function of closest points.
+ *
+ * \return the rigid transformation which may be use later to create
+ * a registered image.
+ */
template <typename P, typename F>
composed< translation<P::dim,float>,rotation<P::dim,float> >
icp(const p_array<P>& P_,
diff --git a/milena/mln/util/internal/id2element.hh b/milena/mln/util/internal/id2element.hh
index 48550da..34aac26 100644
--- a/milena/mln/util/internal/id2element.hh
+++ b/milena/mln/util/internal/id2element.hh
@@ -29,7 +29,7 @@
#ifndef MLN_UTIL_INTERNAL_ID2VERTEX_HH
# define MLN_UTIL_INTERNAL_ID2VERTEX_HH
-/// \file mln/util/id2element.hh
+/// \file mln/util/internal/id2element.hh
///
/// Function constructing a element from an id.
diff --git a/milena/mln/world/inter_pixel/dim2/is_dot.hh b/milena/mln/world/inter_pixel/dim2/is_dot.hh
index da41552..74c7732 100644
--- a/milena/mln/world/inter_pixel/dim2/is_dot.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_dot.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_DOT_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_DOT_HH
-/// \file mln/world/inter_pixel/dim2d/is_dot.hh
+/// \file mln/world/inter_pixel/dim2/is_dot.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/dim2/is_edge.hh b/milena/mln/world/inter_pixel/dim2/is_edge.hh
index c5ef485..383bb85 100644
--- a/milena/mln/world/inter_pixel/dim2/is_edge.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_edge.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_EDGE_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_EDGE_HH
-/// \file mln/world/inter_pixel/dim2d/is_edge.hh
+/// \file mln/world/inter_pixel/dim2/is_edge.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/dim2/is_pixel.hh b/milena/mln/world/inter_pixel/dim2/is_pixel.hh
index 1aa866d..c9cc4e9 100644
--- a/milena/mln/world/inter_pixel/dim2/is_pixel.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_pixel.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_PIXEL_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_PIXEL_HH
-/// \file mln/world/inter_pixel/dim2d/is_pixel.hh
+/// \file mln/world/inter_pixel/dim2/is_pixel.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/dim2/is_row_odd.hh b/milena/mln/world/inter_pixel/dim2/is_row_odd.hh
index 24cdb29..6bf4905 100644
--- a/milena/mln/world/inter_pixel/dim2/is_row_odd.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_row_odd.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_ROW_ODD_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_ROW_ODD_HH
-/// \file mln/world/inter_pixel/dim2d/is_row_odd.hh
+/// \file mln/world/inter_pixel/dim2/is_row_odd.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/full2image.hh b/milena/mln/world/inter_pixel/full2image.hh
index c116964..50f6b28 100644
--- a/milena/mln/world/inter_pixel/full2image.hh
+++ b/milena/mln/world/inter_pixel/full2image.hh
@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_WORLD_INTER_PIXEL_FULL_HH
-# define MLN_WORLD_INTER_PIXEL_FULL_HH
+#ifndef MLN_WORLD_INTER_PIXEL_FULL2IMAGE_HH
+# define MLN_WORLD_INTER_PIXEL_FULL2IMAGE_HH
-/// \file mln/world/inter_pixel/full.hh
+/// \file mln/world/inter_pixel/full2image.hh
///
/// Convert an inter-pixel image to a classical image.
///
@@ -92,4 +92,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_WORLD_INTER_PIXEL_FULL
+#endif // ! MLN_WORLD_INTER_PIXEL_FULL2IMAGE
diff --git a/milena/tests/accu/site_set/rectangularity.cc b/milena/tests/accu/site_set/rectangularity.cc
index ee6b6d1..9efef9b 100644
--- a/milena/tests/accu/site_set/rectangularity.cc
+++ b/milena/tests/accu/site_set/rectangularity.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/accu/site_set/rectangularity.hh
+/// \file tests/accu/site_set/rectangularity.cc
///
/// Tests on mln::accu::site_set::rectangularity.
diff --git a/milena/tests/make/region_adjacency_graph.cc b/milena/tests/make/region_adjacency_graph.cc
index 7f8cb12..641626b 100644
--- a/milena/tests/make/region_adjacency_graph.cc
+++ b/milena/tests/make/region_adjacency_graph.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/make/graph.cc
+/// \file tests/make/region_adjacency_graph.cc
///
/// Tests on mln::make::region_adjacency_graph.
diff --git a/milena/tests/morpho/Rd.cc b/milena/tests/morpho/Rd.cc
index 48bc5bb..8b4ec21 100644
--- a/milena/tests/morpho/Rd.cc
+++ b/milena/tests/morpho/Rd.cc
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/morpho/combined.cc
+/// \file tests/morpho/rd.cc
///
/// Test on mln::morpho::Rd.
--
1.5.6.5
1
0
* doc/Doxyfile.in: add macro definitions.
* doc/outputs/outputs.mk: update output reference files list.
* headers.mk: update distributed files list.
* apps/statues/trimesh/misc.hh,
* doc/examples/tuto3/first_routine.cc,
* mln/accu/compute.hh,
* mln/accu/line.hh,
* mln/core/image/graph_elt_window_if.hh,
* mln/data/fill_with_image.hh,
* mln/data/paste.hh,
* mln/fun/x2x/composed.hh,
* mln/geom/pmin_pmax.hh,
* mln/geom/seeds2tiling.hh,
* mln/io/dump/save.hh,
* mln/io/txt/save.hh,
* mln/labeling/compute.hh,
* mln/labeling/pack.hh,
* mln/labeling/relabel.hh,
* mln/util/internal/id2element.hh,
* mln/world/inter_pixel/dim2/is_dot.hh,
* mln/world/inter_pixel/dim2/is_edge.hh,
* mln/world/inter_pixel/dim2/is_pixel.hh,
* mln/world/inter_pixel/dim2/is_row_odd.hh,
* mln/world/inter_pixel/full2image.hh,
* tests/accu/site_set/rectangularity.cc,
* tests/make/region_adjacency_graph.cc,
* mln/level/median.hh,
* mln/level/stretch.hh,
* mln/level/transform.hh,
* mln/level/transform_inplace.hh,
* mln/level/update.hh,
* mln/make/dummy_p_edges.hh,
* mln/make/dummy_p_vertices.hh,
* mln/make/edge_image.hh,
* mln/make/rag_and_labeled_wsl.hh,
* mln/make/region_adjacency_graph.hh,
* mln/make/relabelfun.hh,
* mln/morpho/closing/area_on_vertices.hh,
* mln/registration/icp.hh,
* tests/morpho/Rd.cc: Fix documentation issues/missing documentation.
---
milena/ChangeLog | 48 +++++++++++++++++++++++
milena/apps/statues/trimesh/misc.hh | 5 +-
milena/doc/Doxyfile.in | 11 ++++-
milena/doc/examples/tuto3/first_routine.cc | 2 +-
milena/doc/outputs/outputs.mk | 1 +
milena/headers.mk | 11 ++++-
milena/mln/accu/compute.hh | 6 ++-
milena/mln/accu/line.hh | 6 ++-
milena/mln/core/image/graph_elt_window_if.hh | 2 +-
milena/mln/data/fill_with_image.hh | 5 ++
milena/mln/data/paste.hh | 12 ++++++
milena/mln/fun/x2x/composed.hh | 4 +-
milena/mln/geom/pmin_pmax.hh | 12 +++---
milena/mln/geom/seeds2tiling.hh | 26 ++++++++-----
milena/mln/io/dump/save.hh | 8 ++++
milena/mln/io/txt/save.hh | 7 ++-
milena/mln/labeling/pack.hh | 10 +++--
milena/mln/labeling/relabel.hh | 26 ++++++------
milena/mln/level/median.hh | 3 +-
milena/mln/level/stretch.hh | 13 ++++++-
milena/mln/level/transform.hh | 5 +-
milena/mln/level/transform_inplace.hh | 7 ++-
milena/mln/level/update.hh | 10 +++--
milena/mln/make/dummy_p_edges.hh | 2 +-
milena/mln/make/dummy_p_vertices.hh | 2 +-
milena/mln/make/edge_image.hh | 6 +-
milena/mln/make/rag_and_labeled_wsl.hh | 4 +-
milena/mln/make/region_adjacency_graph.hh | 13 +++---
milena/mln/make/relabelfun.hh | 11 ++++-
milena/mln/morpho/closing/area_on_vertices.hh | 8 +++-
milena/mln/registration/icp.hh | 14 ++++++-
milena/mln/util/internal/id2element.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_dot.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_edge.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_pixel.hh | 2 +-
milena/mln/world/inter_pixel/dim2/is_row_odd.hh | 2 +-
milena/mln/world/inter_pixel/full2image.hh | 8 ++--
milena/tests/accu/site_set/rectangularity.cc | 2 +-
milena/tests/make/region_adjacency_graph.cc | 2 +-
milena/tests/morpho/Rd.cc | 2 +-
40 files changed, 231 insertions(+), 93 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index f9eea0c..2fda128 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,51 @@
+2009-05-11 Guillaume Lazzara <lazzara(a)lrde.epita.fr>
+
+ Fix documentation.
+
+ * doc/Doxyfile.in: add macro definitions.
+
+ * doc/outputs/outputs.mk: update output reference files list.
+
+ * headers.mk: update distributed files list.
+
+ * apps/statues/trimesh/misc.hh,
+ * doc/examples/tuto3/first_routine.cc,
+ * mln/accu/compute.hh,
+ * mln/accu/line.hh,
+ * mln/core/image/graph_elt_window_if.hh,
+ * mln/data/fill_with_image.hh,
+ * mln/data/paste.hh,
+ * mln/fun/x2x/composed.hh,
+ * mln/geom/pmin_pmax.hh,
+ * mln/geom/seeds2tiling.hh,
+ * mln/io/dump/save.hh,
+ * mln/io/txt/save.hh,
+ * mln/labeling/compute.hh,
+ * mln/labeling/pack.hh,
+ * mln/labeling/relabel.hh,
+ * mln/util/internal/id2element.hh,
+ * mln/world/inter_pixel/dim2/is_dot.hh,
+ * mln/world/inter_pixel/dim2/is_edge.hh,
+ * mln/world/inter_pixel/dim2/is_pixel.hh,
+ * mln/world/inter_pixel/dim2/is_row_odd.hh,
+ * mln/world/inter_pixel/full2image.hh,
+ * tests/accu/site_set/rectangularity.cc,
+ * tests/make/region_adjacency_graph.cc,
+ * mln/level/median.hh,
+ * mln/level/stretch.hh,
+ * mln/level/transform.hh,
+ * mln/level/transform_inplace.hh,
+ * mln/level/update.hh,
+ * mln/make/dummy_p_edges.hh,
+ * mln/make/dummy_p_vertices.hh,
+ * mln/make/edge_image.hh,
+ * mln/make/rag_and_labeled_wsl.hh,
+ * mln/make/region_adjacency_graph.hh,
+ * mln/make/relabelfun.hh,
+ * mln/morpho/closing/area_on_vertices.hh,
+ * mln/registration/icp.hh,
+ * tests/morpho/Rd.cc: Fix documentation issues/missing documentation.
+
2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
diff --git a/milena/apps/statues/trimesh/misc.hh b/milena/apps/statues/trimesh/misc.hh
index a9f0fce..d72477d 100644
--- a/milena/apps/statues/trimesh/misc.hh
+++ b/milena/apps/statues/trimesh/misc.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 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
@@ -474,7 +475,7 @@ namespace mln
Jean Cousty. Artwork 3D Model Database Indexing and
Classification.
- \param[in] ima The surface (triangle mesh) on which the
+ \param[in] mesh The surface (triangle mesh) on which the
curvature is to be computed. */
/* FIXME: We should restrict attached data to vertices in return
value. */
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index f088755..cedcbc1 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -215,7 +215,7 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret"
"mln_enc(T)=typename T::enc" \
"mln_value(T)=typename T::value" \
"mln_qlf_value(T)=typename T::qlf_value" \
- "mln_pset(T)=typename T::pset" \
+ "mln_domain(T)=typename T::domain_t" \
"mln_sum(T)=typename mln::value::props<T>::sum" \
"mln_vset(T)=typename T::vset" \
"mln_rvalue(T)=typename T::rvalue" \
@@ -250,7 +250,7 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret"
"mln_enc_(T)=T::enc" \
"mln_value_(T)=T::value" \
"mln_qlf_value_(T)=T::qlf_value" \
- "mln_pset_(T)=T::pset" \
+ "mln_domain_(T)=T::domain_t" \
"mln_sum_(T)=mln::value::props<T>::sum" \
"mln_vset_(T)=T::vset" \
"mln_rvalue_(T)=T::rvalue" \
@@ -286,7 +286,12 @@ PREDEFINED = "mlc_unqualif(T)=typename mln::metal::unqualif<T>::ret"
"mln_gradient(I)=mln::value::stack_image< I::point::dim, mln::trait::ch_value< I, mln::value::props< typename I::value >::sum >::ret >" \
"mln_trait_value_sum_product(T, U)=typename mln::trait::value_< mln_trait_op_times(T,U) >::sum" \
"mln_sum_product(T, U)=typename mln::trait::value_< mln_trait_op_times(T,U) >::sum" \
- "mln_deduce(T, A1, A2)=typename T::A1::A2"
+ "mln_deduce(T, A1, A2)=typename T::A1::A2" \
+ "mln_graph_element(T)=typename T::graph_element" \
+ "mln_graph_element_(T)=T::graph_element"
+ "mln_fun_vv2v(F, L, R)=mln::fun::vv2v::F< mln_value(L), mln_value(R) >" \
+ "mln_fun_vv2v_result(F, L, R)=typename mln_fun_vv2v(F, L, R)::result" \
+ "mln_ch_fun_vv2v(F, L, R)=typename mln::trait::ch_value< L, typename mln_fun_vv2v(F, L, R)::result >::ret"
diff --git a/milena/doc/examples/tuto3/first_routine.cc b/milena/doc/examples/tuto3/first_routine.cc
index b4d3b58..5ed5919 100644
--- a/milena/doc/examples/tuto3/first_routine.cc
+++ b/milena/doc/examples/tuto3/first_routine.cc
@@ -1,4 +1,4 @@
-/// \file doc/examples/first_routine.cc
+/// \file doc/examples/tuto3/first_routine.cc
#include <mln/essential/2d.hh>
#include <tests/data.hh>
diff --git a/milena/doc/outputs/outputs.mk b/milena/doc/outputs/outputs.mk
index ac10062..5b9de7c 100644
--- a/milena/doc/outputs/outputs.mk
+++ b/milena/doc/outputs/outputs.mk
@@ -21,6 +21,7 @@ outputs/box2d-bbox.txt \
outputs/graph-iter.txt \
outputs/graph-output-1.txt \
outputs/fill-call-1.txt \
+outputs/site_set_create.txt \
outputs/ima2d-rot.txt \
outputs/paste-call-1.txt \
outputs/fun-p2v-1.txt \
diff --git a/milena/headers.mk b/milena/headers.mk
index 7d75826..34e4823 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -60,13 +60,15 @@ mln/literal/essential.hh \
mln/world/binary_2d/subsample.hh \
mln/world/binary_2d/projected_histo.hh \
mln/world/inter_pixel/neighb2d.hh \
-mln/world/inter_pixel/full.hh \
+mln/world/inter_pixel/image2full.hh \
mln/world/inter_pixel/display_edge.hh \
mln/world/inter_pixel/dim2/is_pixel.hh \
mln/world/inter_pixel/dim2/all.hh \
mln/world/inter_pixel/dim2/is_edge.hh \
+mln/world/inter_pixel/dim2/make_edge_image.hh \
mln/world/inter_pixel/dim2/is_dot.hh \
mln/world/inter_pixel/dim2/is_row_odd.hh \
+mln/world/inter_pixel/full2image.hh \
mln/registration/get_rtransf.hh \
mln/registration/internal/rms.hh \
mln/registration/get_rot.hh \
@@ -106,6 +108,7 @@ mln/util/timer.hh \
mln/util/yes.hh \
mln/util/line_graph.hh \
mln/util/ord.hh \
+mln/util/adjacency_matrix.hh \
mln/util/tree_fast_to_image.hh \
mln/util/tree.hh \
mln/util/couple.hh \
@@ -302,10 +305,13 @@ mln/fun/x2x/translation.hh \
mln/fun/x2x/rotation.hh \
mln/fun/x2x/essential.hh \
mln/fun/component/red.hh \
+mln/fun/component/comp_count.hh \
+mln/fun/component/scomp.hh \
mln/fun/component/green.hh \
mln/fun/component/comp.hh \
mln/fun/component/blue.hh \
mln/fun/component/rgb.hh \
+mln/fun/component/ithcomp.hh \
mln/fun/compose.hh \
mln/fun/meta/red.hh \
mln/fun/meta/hue.hh \
@@ -476,6 +482,7 @@ mln/accu/image/init.hh \
mln/accu/image/to_result.hh \
mln/accu/image/all.hh \
mln/accu/image/set_value.hh \
+mln/accu/image/untake.hh \
mln/accu/image/take.hh \
mln/accu/image/take_as_init.hh \
mln/accu/image/take_n_times.hh \
@@ -566,7 +573,6 @@ mln/trait/ch_function_value.hh \
mln/trait/ch_value.hh \
mln/trait/solve.hh \
mln/trait/solve_unary.hh \
-mln/trait/fun.hh \
mln/trait/op/postdec.hh \
mln/trait/op/mod.hh \
mln/trait/op/lor.hh \
@@ -594,6 +600,7 @@ mln/trait/op/uplus.hh \
mln/trait/op/essential.hh \
mln/trait/op/eq.hh \
mln/trait/concrete.hh \
+mln/trait/functions.hh \
mln/trait/windows.hh \
mln/trait/site_sets.hh \
mln/trait/image_from_grid.hh \
diff --git a/milena/mln/accu/compute.hh b/milena/mln/accu/compute.hh
index a632fa8..f78c6ec 100644
--- a/milena/mln/accu/compute.hh
+++ b/milena/mln/accu/compute.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -50,6 +50,7 @@ namespace mln
/// Make an accumulator compute the pixels of the image \p input.
///
/// \param[in] input The input image.
+ /// \param[in] a An accumulator.
///
/// This routine runs: \n
/// a.take(make::pix(input, p));
@@ -65,6 +66,7 @@ namespace mln
/// Make an accumulator compute the pixels of the image \p input.
///
/// \param[in] input The input image.
+ /// \param[in] a A meta accumulator.
///
/// This routine runs: \n
/// a.take(make::pix(input, p));
diff --git a/milena/mln/accu/line.hh b/milena/mln/accu/line.hh
index b4f30a7..4fec281 100644
--- a/milena/mln/accu/line.hh
+++ b/milena/mln/accu/line.hh
@@ -51,8 +51,10 @@ namespace mln
/*! Line an accumulator onto the pixel values of the image \p input.
*
* \param[in] input The input image.
- * \param[in] a The accumulator.
- * \return The accumulator result.
+ * \param[in] p_start The starting site of the line.
+ * \param[in] len The line length.
+ * \param[in] half_length The half length of the line.
+ * \param[in,out] output The resulting image.
*
* This routine runs: \n
* tmp = \p a \n
diff --git a/milena/mln/core/image/graph_elt_window_if.hh b/milena/mln/core/image/graph_elt_window_if.hh
index dd4f6d9..c03ac79 100644
--- a/milena/mln/core/image/graph_elt_window_if.hh
+++ b/milena/mln/core/image/graph_elt_window_if.hh
@@ -125,7 +125,7 @@ namespace mln
/// Default. Construct an invalid window.
graph_elt_window_if();
- /// \param[in] graph_image A graph image.
+ /// \param[in] mask A graph image of bool.
///
/// \sa vertex_image, edge_image.
graph_elt_window_if(const Image<I>& mask);
diff --git a/milena/mln/data/fill_with_image.hh b/milena/mln/data/fill_with_image.hh
index 3b79e72..df67089 100644
--- a/milena/mln/data/fill_with_image.hh
+++ b/milena/mln/data/fill_with_image.hh
@@ -95,6 +95,11 @@ namespace mln
namespace generic
{
+ /// Generic implementation.
+ ///
+ /// \param[in,out] ima The image to be filled.
+ /// \param[in] data The image.
+ //
template <typename I, typename J>
void fill_with_image(Image<I>& ima_, const Image<J>& data_)
{
diff --git a/milena/mln/data/paste.hh b/milena/mln/data/paste.hh
index ef3911d..740a2a1 100644
--- a/milena/mln/data/paste.hh
+++ b/milena/mln/data/paste.hh
@@ -72,6 +72,12 @@ namespace mln
namespace internal
{
+ /// Internal tests for data::paste.
+ ///
+ /// \param[in] input The input image providing pixels values.
+ /// \param[in,out] output The image in which values are
+ /// assigned.
+ //
template <typename I, typename J>
inline
void paste_tests(const Image<I>& input, Image<J>& output)
@@ -97,6 +103,12 @@ namespace mln
namespace generic
{
+ /// Generic implementation of data::paste.
+ ///
+ /// \param[in] input The input image providing pixels values.
+ /// \param[in,out] output The image in which values are
+ /// assigned.
+ //
template <typename I, typename J>
inline
void paste(const Image<I>& input_, Image<J>& output_)
diff --git a/milena/mln/fun/x2x/composed.hh b/milena/mln/fun/x2x/composed.hh
index 0bc20b3..49d74f2 100644
--- a/milena/mln/fun/x2x/composed.hh
+++ b/milena/mln/fun/x2x/composed.hh
@@ -153,9 +153,9 @@ namespace mln
mlc_is(T2, Bijection_x2x<T2>)::value &&
mlc_is(T1, Bijection_x2x<T1>)::value>(f, g)
{}
-};
+ };
-} // end of namespace mln::fun::x2x
+ } // end of namespace mln::fun::x2x
} // end of namespace mln::fun
diff --git a/milena/mln/geom/pmin_pmax.hh b/milena/mln/geom/pmin_pmax.hh
index 3f28fe9..12e3ea7 100644
--- a/milena/mln/geom/pmin_pmax.hh
+++ b/milena/mln/geom/pmin_pmax.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 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,11 +29,10 @@
#ifndef MLN_GEOM_PMIN_PMAX_HH
# define MLN_GEOM_PMIN_PMAX_HH
-/*! \file mln/geom/pmin_pmax.hh
- *
- * \brief Several routines to compute the minimum point and/or maximum
- * point.
- */
+/// \file mln/geom/pmin_pmax.hh
+///
+/// Several routines to compute the minimum point and/or maximum
+/// point.
# include <utility>
diff --git a/milena/mln/geom/seeds2tiling.hh b/milena/mln/geom/seeds2tiling.hh
index 0dc8eef..85fb3ce 100644
--- a/milena/mln/geom/seeds2tiling.hh
+++ b/milena/mln/geom/seeds2tiling.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -29,10 +29,9 @@
#ifndef MLN_GEOM_SEEDS2TILING_HH
# define MLN_GEOM_SEEDS2TILING_HH
-/*! \file mln/geom/seeds2tiling.hh
- *
- * \brief Convert a binary image with seeds into a labeled image.
- */
+/// \file mln/geom/seeds2tiling.hh
+///
+/// Convert a binary image with seeds into a labeled image.
# include <map>
@@ -46,27 +45,34 @@
namespace mln
{
+
namespace geom
{
- /// \brief Take a labeled image \p ima_ with seeds and extend them
+ /// Take a labeled image \p ima_ with seeds and extend them
/// until creating tiles.
///
/// \param[in,out] ima_ The labeled image with seed.
/// \param[in] nbh The neighborhood to use on this algorithm.
///
- /// \pre \p ima_ has to be initialized.
+ /// \return A tiled image.
///
- /// \{
+ /// \pre \p ima_ has to be initialized.
+ //
template <typename I, typename N>
I seeds2tiling (Image<I>& ima_, const Neighborhood<N>& nbh);
- /// \}
+
# ifndef MLN_INCLUDE_ONLY
namespace impl
{
+ /// Generic implementation of geom::seed2tiling.
+ ///
+ /// \param[in,out] ima_ The labeled image with seed.
+ /// \param[in] nbh The neighborhood to use on this algorithm.
+ //
template <typename I, typename N>
inline
I
diff --git a/milena/mln/io/dump/save.hh b/milena/mln/io/dump/save.hh
index 41d4571..5056dc6 100644
--- a/milena/mln/io/dump/save.hh
+++ b/milena/mln/io/dump/save.hh
@@ -31,6 +31,7 @@
/// \file mln/io/dump/save.hh
///
/// Save a Milena image by dumping its data to a file.
+///
/// \todo handle endianness.
# include <iostream>
@@ -42,6 +43,7 @@
# include <mln/data/memcpy_.hh>
# include <mln/trait/value_.hh>
+
namespace mln
{
@@ -55,12 +57,15 @@ namespace mln
///
/// \param[in] ima_ The image to save.
/// \param[in] filename the destination.
+ //
template <typename I>
void save(const Image<I>& ima_, const std::string& filename);
+
# ifndef MLN_INCLUDE_ONLY
+
namespace internal
{
@@ -121,6 +126,9 @@ namespace mln
} // end of namespace mln::io::dump::internal
+
+ // Facade
+
template <typename I>
void save(const Image<I>& ima_, const std::string& filename)
{
diff --git a/milena/mln/io/txt/save.hh b/milena/mln/io/txt/save.hh
index 4cc4e39..db0d423 100644
--- a/milena/mln/io/txt/save.hh
+++ b/milena/mln/io/txt/save.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of the Olena Library. This library is free
@@ -31,7 +31,7 @@
/// \file mln/io/txt/save.hh
///
-/// \brief Save an image as txt file.
+/// Save an image as txt file.
# include <iostream>
# include <fstream>
@@ -52,8 +52,9 @@ namespace mln
/// Save an image as txt file.
///
- /// \param[in] ima_ The image to save. Must be an image of char.
+ /// \param[in] ima The image to save. Must be an image of char.
/// \param[in] filename the destination.
+ //
void
save(const image2d<char>& ima, const std::string& filename);
diff --git a/milena/mln/labeling/pack.hh b/milena/mln/labeling/pack.hh
index 5235cd3..29ef2c2 100644
--- a/milena/mln/labeling/pack.hh
+++ b/milena/mln/labeling/pack.hh
@@ -52,8 +52,9 @@ namespace mln
{
/// Relabel a labeled image in order to have a contiguous labeling.
- /// \input[in] label The labeled image.
- /// \input[out] new_nlabels The number of labels after relabeling.
+ ///
+ /// \param[in] label The labeled image.
+ /// \param[out] new_nlabels The number of labels after relabeling.
///
/// \return The relabeled image.
//
@@ -65,8 +66,9 @@ namespace mln
/// Relabel inplace a labeled image in order to have a contiguous
/// labeling.
- /// \input[in] label The labeled image.
- /// \input[out] new_nlabels The number of labels after relabeling.
+ ///
+ /// \param[in] label The labeled image.
+ /// \param[out] new_nlabels The number of labels after relabeling.
//
template <typename I>
void
diff --git a/milena/mln/labeling/relabel.hh b/milena/mln/labeling/relabel.hh
index a775bfa..60b150f 100644
--- a/milena/mln/labeling/relabel.hh
+++ b/milena/mln/labeling/relabel.hh
@@ -52,10 +52,10 @@ namespace mln
{
/// Remove components and relabel a labeled image.
- /// \input[in] label the labeled image.
- /// \input[in] nlabels the number of labels in \p label.
- /// \input[out] new_nlabels the number of labels after relabeling.
- /// \input[in] f function returning whether a label must be replaced
+ /// \param[in] label the labeled image.
+ /// \param[in] nlabels the number of labels in \p label.
+ /// \param[out] new_nlabels the number of labels after relabeling.
+ /// \param[in] fv2b function returning whether a label must be replaced
/// by the background.
///
/// \return the relabeled image.
@@ -69,9 +69,9 @@ namespace mln
/// Remove components and relabel a labeled image.
- /// \input[in] label the labeled image.
- /// \input[in] nlabels the number of labels in \p label.
- /// \input[in] f function returning the new component id for each pixel
+ /// \param[in] label the labeled image.
+ /// \param[in] nlabels the number of labels in \p label.
+ /// \param[in] fv2v function returning the new component id for each pixel
/// value.
///
/// \return the relabeled image.
@@ -84,9 +84,9 @@ namespace mln
/// Remove components and relabel a labeled image inplace.
- /// \input[in, out] label the labeled image.
- /// \input[in, out] nlabels the number of labels in \p label.
- /// \input[in] f function returning whether a label must be replaced
+ /// \param[in, out] label the labeled image.
+ /// \param[in, out] nlabels the number of labels in \p label.
+ /// \param[in] fv2b function returning whether a label must be replaced
/// by the background.
//
template <typename I, typename F>
@@ -97,9 +97,9 @@ namespace mln
/// Remove components and relabel a labeled image inplace.
- /// \input[in, out] label the labeled image.
- /// \input[in, out] nlabels the number of labels in \p label.
- /// \input[in] f function returning the new component id for each
+ /// \param[in, out] label the labeled image.
+ /// \param[in, out] nlabels the number of labels in \p label.
+ /// \param[in] fv2v function returning the new component id for each
/// pixel value.
//
template <typename I, typename F>
diff --git a/milena/mln/level/median.hh b/milena/mln/level/median.hh
index 4a5c3cd..f62c7e5 100644
--- a/milena/mln/level/median.hh
+++ b/milena/mln/level/median.hh
@@ -59,9 +59,8 @@ namespace mln
*
* \param[in] input The image to be filtered.
* \param[in] win The window.
- * \param[out] output The output image.
*
- * \pre \p input and \p output have to be initialized.
+ * \pre \p input have to be initialized.
*/
template <typename I, typename W>
mln_concrete(I)
diff --git a/milena/mln/level/stretch.hh b/milena/mln/level/stretch.hh
index 63bac49..f10f4e3 100644
--- a/milena/mln/level/stretch.hh
+++ b/milena/mln/level/stretch.hh
@@ -57,7 +57,8 @@ namespace mln
*
* \param[in] v A value to set the output value type.
* \param[in] input The input image.
- * \param[out] output The result image.
+ *
+ * \return A stretch image with values of the same type as \p v.
*
* \pre input.is_valid
*/
@@ -71,6 +72,13 @@ namespace mln
namespace impl
{
+ /// Generic implementation of level::stretch.
+ ///
+ /// \param[in] v A value to set the output value type.
+ /// \param[in] input The input image.
+ ///
+ /// \return A stretch image with values of the same type as \p v.
+ //
template <typename V, typename I>
inline
mln_ch_value(I, V)
@@ -112,6 +120,9 @@ namespace mln
} // end of namespace mln::level::impl
+
+ // Facade
+
template <typename V, typename I>
inline
mln_ch_value(I, V)
diff --git a/milena/mln/level/transform.hh b/milena/mln/level/transform.hh
index 07ed377..f61fbc9 100644
--- a/milena/mln/level/transform.hh
+++ b/milena/mln/level/transform.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -130,6 +130,7 @@ namespace mln
namespace generic
{
+ /// Generic implementation of level::transform.
template <typename I, typename F>
mln_ch_value(I, mln_result(F))
transform(const Image<I>& input_, const Function_v2v<F>& f_)
diff --git a/milena/mln/level/transform_inplace.hh b/milena/mln/level/transform_inplace.hh
index ca85b28..dc632e2 100644
--- a/milena/mln/level/transform_inplace.hh
+++ b/milena/mln/level/transform_inplace.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
@@ -8,7 +9,7 @@
// 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.
+// 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
@@ -64,7 +65,7 @@ namespace mln
/*! Transform inplace the image \p ima with the image \p aux
through a function \p f.
*
- * \param[in] ima1 The image to be transformed.
+ * \param[in] ima The image to be transformed.
* \param[in] aux The auxiliary image.
* \param[in] f The function.
*
diff --git a/milena/mln/level/update.hh b/milena/mln/level/update.hh
index 10632a5..306d1ad 100644
--- a/milena/mln/level/update.hh
+++ b/milena/mln/level/update.hh
@@ -90,6 +90,7 @@ namespace mln
namespace generic
{
+ /// Generic implementation of level::update.
template <typename A, typename I>
inline
mln_result(A)
@@ -112,21 +113,22 @@ namespace mln
} // end of namespace mln::level::impl::generic
+ /// Fastest implementation of level::update.
template <typename A, typename I>
inline
mln_result(A)
update_fastest(Accumulator<A>& a_, const Image<I>& input_)
{
trace::entering("level::impl::update_fastest");
-
+
A& a = exact(a_);
const I& input = exact(input_);
level::internal::update_tests(a, input);
-
+
mln_pixter(const I) pxl(input);
for_all(pxl)
a.take(pxl.val());
-
+
trace::exiting("level::impl::update_fastest");
return a.to_result();
}
@@ -134,7 +136,7 @@ namespace mln
} // end of namespace mln::level::impl
-
+
// Dispatch.
diff --git a/milena/mln/make/dummy_p_edges.hh b/milena/mln/make/dummy_p_edges.hh
index 7c17aec..aaf17f8 100644
--- a/milena/mln/make/dummy_p_edges.hh
+++ b/milena/mln/make/dummy_p_edges.hh
@@ -62,7 +62,7 @@ namespace mln
/// Create a p_edges which associate a graph element to a constant site.
/// \c 0 (int) is used as dummy site.
///
- /// \param[in] g_ A graph.
+ /// \param[in] g A graph.
///
/// \return A p_edges.
//
diff --git a/milena/mln/make/dummy_p_vertices.hh b/milena/mln/make/dummy_p_vertices.hh
index c9c643d..462473a 100644
--- a/milena/mln/make/dummy_p_vertices.hh
+++ b/milena/mln/make/dummy_p_vertices.hh
@@ -62,7 +62,7 @@ namespace mln
/// Create a p_vertices which associate a graph element to a constant site.
/// \c 0 (int) is used as dummy site.
///
- /// \param[in] g_ A graph.
+ /// \param[in] g A graph.
///
/// \return A p_vertices.
//
diff --git a/milena/mln/make/edge_image.hh b/milena/mln/make/edge_image.hh
index bd03162..0c2deff 100644
--- a/milena/mln/make/edge_image.hh
+++ b/milena/mln/make/edge_image.hh
@@ -60,7 +60,7 @@ namespace mln
/// Construct an edge image.
///
- /// \param[in] g A graph
+ /// \param[in] g_ A graph
/// \param[in] fp A function mapping edge ids to sites.
/// \param[in] fv A function mapping edge ids to values.
///
@@ -78,7 +78,7 @@ namespace mln
///
/// \param[in] v_ima_ A vertex image.
/// \param[in] pe A p_edges mapping graph element to sites .
- /// \param[in] fv A function mapping two vertex ids to a value.
+ /// \param[in] fv_ A function mapping two vertex ids to a value.
/// The result is associated to the corresponding edge.
///
/// \return an edge image.
@@ -94,7 +94,7 @@ namespace mln
/// Construct an edge image.
///
/// \param[in] v_ima_ A vertex image.
- /// \param[in] fv A function mapping two vertex ids to a value.
+ /// \param[in] fv_ A function mapping two vertex ids to a value.
/// The result is associated to the corresponding edge.
///
/// \return an edge image without localization information mapped to
diff --git a/milena/mln/make/rag_and_labeled_wsl.hh b/milena/mln/make/rag_and_labeled_wsl.hh
index 60f2824..c170d18 100644
--- a/milena/mln/make/rag_and_labeled_wsl.hh
+++ b/milena/mln/make/rag_and_labeled_wsl.hh
@@ -57,8 +57,8 @@ namespace mln
/// Create a region adjacency graph and a label image of the watershed line
/// from a watershed image.
///
- /// \param[in] wshd Watershed image.
- /// \param[in] nbh Neighborhood
+ /// \param[in] wshd_ Watershed image.
+ /// \param[in] nbh_ Neighborhood
/// \param[in] nbasins Number of influence zone in \p wshd.
///
/// \return A couple. First element is the graph, second element is an
diff --git a/milena/mln/make/region_adjacency_graph.hh b/milena/mln/make/region_adjacency_graph.hh
index b930367..ba2e177 100644
--- a/milena/mln/make/region_adjacency_graph.hh
+++ b/milena/mln/make/region_adjacency_graph.hh
@@ -53,7 +53,8 @@ namespace mln
/// Create a region adjacency graph from a watershed image.
///
- /// \param[in] wshd watershed image.
+ /// \param[in] wshd_ watershed image.
+ /// \param[in] nbh A neighborhood.
/// \param[in] nbasins number of influence zone in \p wshd.
///
/// \return util::graph Graph based on the adjacency of the influence zones.
@@ -61,7 +62,7 @@ namespace mln
util::graph
region_adjacency_graph(const Image<I>& wshd_,
const Neighborhood<N>& nbh,
- mln_value(I) nbasins);
+ const mln_value(I)& nbasins);
@@ -75,7 +76,7 @@ namespace mln
void
region_adjacency_graph_tests(const Image<I>& wshd,
const Neighborhood<N>& nbh,
- mln_value(I))
+ const mln_value(I)&)
{
mln_precondition(exact(wshd).is_valid());
mln_precondition(exact(nbh).is_valid());
@@ -96,7 +97,7 @@ namespace mln
util::graph
region_adjacency_graph(const Image<I>& wshd_,
const Neighborhood<N>& nbh_,
- mln_value(I) nbasins)
+ const mln_value(I)& nbasins)
{
trace::entering("make::impl::generic::region_adjacency_graph");
@@ -163,7 +164,7 @@ namespace mln
util::graph
region_adjacency_graph_dispatch(const Image<I>& wshd,
const Neighborhood<N>& nbh,
- mln_value(I) nbasins)
+ const mln_value(I)& nbasins)
{
return make::impl::generic::region_adjacency_graph(wshd, nbh, nbasins);
}
@@ -179,7 +180,7 @@ namespace mln
util::graph
region_adjacency_graph(const Image<I>& wshd,
const Neighborhood<N>& nbh,
- mln_value(I) nbasins)
+ const mln_value(I)& nbasins)
{
trace::entering("make::region_adjacency_graph");
diff --git a/milena/mln/make/relabelfun.hh b/milena/mln/make/relabelfun.hh
index 19b072d..11fe1fe 100644
--- a/milena/mln/make/relabelfun.hh
+++ b/milena/mln/make/relabelfun.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
@@ -45,7 +46,9 @@ namespace mln
/// Create a i2v function from a v2b function.
/// This function can be used to relabel a labeled image.
///
- /// \param[in] f a v2b function.
+ /// \param[in] fv2b A v2b function.
+ /// \param[in] nlabels The number of labels.
+ /// \param[in] new_nlabels The number of labels after relabeling.
///
/// \return a i2v function.
///
@@ -59,7 +62,9 @@ namespace mln
/// Create a i2v function from a v2v function.
/// This function can be used to relabel a labeled image.
///
- /// \param[in] f a v2v function.
+ /// \param[in] fv2v A v2v function.
+ /// \param[in] nlabels The number of labels.
+ /// \param[in] new_nlabels The number of labels after relabeling.
///
/// \return a i2v function.
///
diff --git a/milena/mln/morpho/closing/area_on_vertices.hh b/milena/mln/morpho/closing/area_on_vertices.hh
index 099e473..46c6774 100644
--- a/milena/mln/morpho/closing/area_on_vertices.hh
+++ b/milena/mln/morpho/closing/area_on_vertices.hh
@@ -34,7 +34,6 @@
/// Morphological area closing on a line graph image computing
/// the area in terms of adjacent vertices.
-# include <mln/pw/image.hh>
# include <mln/core/image/edge_image.hh>
# include <mln/morpho/closing/algebraic.hh>
# include <mln/morpho/attribute/count_adjacent_vertices.hh>
@@ -51,6 +50,13 @@ namespace mln
/// Morphological area closing on a mln::line_graph_image computing
/// the area in terms of adjacent vertices.
+ ///
+ /// \param[in] input An edge image.
+ /// \param[in] nbh A graph neighborhood.
+ /// \param[in] lambda Closing parameter.
+ ///
+ /// \return An edge image.
+ //
template <typename P, typename V, typename G, typename N>
edge_image<P,V,G>
area_on_vertices(const edge_image<P,V,G>& input,
diff --git a/milena/mln/registration/icp.hh b/milena/mln/registration/icp.hh
index 540efba..a2bee09 100644
--- a/milena/mln/registration/icp.hh
+++ b/milena/mln/registration/icp.hh
@@ -90,11 +90,13 @@ namespace mln
/*! Register point in \p c using a function of closest points
* \p closest_point.
+ * This overload allows to specify initial transformations.
*
* \param[in] P_ The cloud of points.
* \param[in] X the reference surface.
* \param[in] closest_point The function of closest points.
- * \param[out] qk The rigid transformation obtained.
+ * \param[in] initial_rot An initial rotation.
+ * \param[in] initial_translation An initial translation.
*
* \return the rigid transformation which may be use later to create
* a registered image.
@@ -118,6 +120,16 @@ namespace mln
const mln_vec(P)& initial_translation);
+ /*! Register point in \p c using a function of closest points
+ * \p closest_point.
+ *
+ * \param[in] P_ The cloud of points.
+ * \param[in] X the reference surface.
+ * \param[in] closest_point The function of closest points.
+ *
+ * \return the rigid transformation which may be use later to create
+ * a registered image.
+ */
template <typename P, typename F>
composed< translation<P::dim,float>,rotation<P::dim,float> >
icp(const p_array<P>& P_,
diff --git a/milena/mln/util/internal/id2element.hh b/milena/mln/util/internal/id2element.hh
index 48550da..34aac26 100644
--- a/milena/mln/util/internal/id2element.hh
+++ b/milena/mln/util/internal/id2element.hh
@@ -29,7 +29,7 @@
#ifndef MLN_UTIL_INTERNAL_ID2VERTEX_HH
# define MLN_UTIL_INTERNAL_ID2VERTEX_HH
-/// \file mln/util/id2element.hh
+/// \file mln/util/internal/id2element.hh
///
/// Function constructing a element from an id.
diff --git a/milena/mln/world/inter_pixel/dim2/is_dot.hh b/milena/mln/world/inter_pixel/dim2/is_dot.hh
index da41552..74c7732 100644
--- a/milena/mln/world/inter_pixel/dim2/is_dot.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_dot.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_DOT_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_DOT_HH
-/// \file mln/world/inter_pixel/dim2d/is_dot.hh
+/// \file mln/world/inter_pixel/dim2/is_dot.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/dim2/is_edge.hh b/milena/mln/world/inter_pixel/dim2/is_edge.hh
index c5ef485..383bb85 100644
--- a/milena/mln/world/inter_pixel/dim2/is_edge.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_edge.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_EDGE_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_EDGE_HH
-/// \file mln/world/inter_pixel/dim2d/is_edge.hh
+/// \file mln/world/inter_pixel/dim2/is_edge.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/dim2/is_pixel.hh b/milena/mln/world/inter_pixel/dim2/is_pixel.hh
index 1aa866d..c9cc4e9 100644
--- a/milena/mln/world/inter_pixel/dim2/is_pixel.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_pixel.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_PIXEL_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_PIXEL_HH
-/// \file mln/world/inter_pixel/dim2d/is_pixel.hh
+/// \file mln/world/inter_pixel/dim2/is_pixel.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/dim2/is_row_odd.hh b/milena/mln/world/inter_pixel/dim2/is_row_odd.hh
index 24cdb29..6bf4905 100644
--- a/milena/mln/world/inter_pixel/dim2/is_row_odd.hh
+++ b/milena/mln/world/inter_pixel/dim2/is_row_odd.hh
@@ -28,7 +28,7 @@
#ifndef MLN_WORLD_INTER_PIXEL_DIM2_IS_ROW_ODD_HH
# define MLN_WORLD_INTER_PIXEL_DIM2_IS_ROW_ODD_HH
-/// \file mln/world/inter_pixel/dim2d/is_row_odd.hh
+/// \file mln/world/inter_pixel/dim2/is_row_odd.hh
///
/// FIXME: insert comment.
diff --git a/milena/mln/world/inter_pixel/full2image.hh b/milena/mln/world/inter_pixel/full2image.hh
index c116964..50f6b28 100644
--- a/milena/mln/world/inter_pixel/full2image.hh
+++ b/milena/mln/world/inter_pixel/full2image.hh
@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_WORLD_INTER_PIXEL_FULL_HH
-# define MLN_WORLD_INTER_PIXEL_FULL_HH
+#ifndef MLN_WORLD_INTER_PIXEL_FULL2IMAGE_HH
+# define MLN_WORLD_INTER_PIXEL_FULL2IMAGE_HH
-/// \file mln/world/inter_pixel/full.hh
+/// \file mln/world/inter_pixel/full2image.hh
///
/// Convert an inter-pixel image to a classical image.
///
@@ -92,4 +92,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_WORLD_INTER_PIXEL_FULL
+#endif // ! MLN_WORLD_INTER_PIXEL_FULL2IMAGE
diff --git a/milena/tests/accu/site_set/rectangularity.cc b/milena/tests/accu/site_set/rectangularity.cc
index ee6b6d1..9efef9b 100644
--- a/milena/tests/accu/site_set/rectangularity.cc
+++ b/milena/tests/accu/site_set/rectangularity.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/accu/site_set/rectangularity.hh
+/// \file tests/accu/site_set/rectangularity.cc
///
/// Tests on mln::accu::site_set::rectangularity.
diff --git a/milena/tests/make/region_adjacency_graph.cc b/milena/tests/make/region_adjacency_graph.cc
index 7f8cb12..641626b 100644
--- a/milena/tests/make/region_adjacency_graph.cc
+++ b/milena/tests/make/region_adjacency_graph.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/make/graph.cc
+/// \file tests/make/region_adjacency_graph.cc
///
/// Tests on mln::make::region_adjacency_graph.
diff --git a/milena/tests/morpho/Rd.cc b/milena/tests/morpho/Rd.cc
index 48bc5bb..8b4ec21 100644
--- a/milena/tests/morpho/Rd.cc
+++ b/milena/tests/morpho/Rd.cc
@@ -26,7 +26,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/morpho/combined.cc
+/// \file tests/morpho/rd.cc
///
/// Test on mln::morpho::Rd.
--
1.6.1.2
1
0
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
ChangeLog:
2009-05-10 Edwin Carlinet <carlinet(a)lrde.epita.fr>
Make clean in tree files and procedures.
* edwin/mln/morpho/tree/filter.hh:
group strategies for non-increasing attribute filtering.
* edwin/attributes/bbox.hh,
* edwin/attributes/occupation.hh,
* edwin/attributes,
* edwin/mln/morpho/attribute,
* edwin/mln/morpho/tree/components.hh,
* edwin/mln/morpho/tree/propagate.hh,
* edwin/mln/morpho/tree/propagate_if.hh,
* edwin/mln/morpho/tree/propagate_node.hh,
* edwin/mln/morpho/tree,
* edwin/mln/morpho,
* edwin/mln,
* edwin/rush/exo2/test.cc,
* edwin/tests,
* edwin/tree/components.hh,
* edwin/tree/propagate.hh,
* edwin/tree/propagate_if.hh,
* edwin/tree/propagate_node.hh,
move all tree materials in edwin/mln/morpho/tree.
---
mln/morpho/attribute/bbox.hh | 203 ++++++++++++++++++++++
mln/morpho/attribute/occupation.hh | 252 ++++++++++++++++++++++++++++
mln/morpho/tree/components.hh | 319 ++++++++++++++++++++++++++++++++++++
mln/morpho/tree/filter.hh | 205 +++++++++++++++++++++++
mln/morpho/tree/propagate.hh | 124 ++++++++++++++
mln/morpho/tree/propagate_if.hh | 327 +++++++++++++++++++++++++++++++++++++
mln/morpho/tree/propagate_node.hh | 209 +++++++++++++++++++++++
rush/exo2/test.cc | 1
8 files changed, 1640 insertions(+)
Index: trunk/milena/sandbox/edwin/tree/propagate.hh (deleted)
===================================================================
Index: trunk/milena/sandbox/edwin/tree/components.hh (deleted)
===================================================================
Index: trunk/milena/sandbox/edwin/tree/propagate_node.hh (deleted)
===================================================================
Index: trunk/milena/sandbox/edwin/tree/propagate_if.hh (deleted)
===================================================================
Index: trunk/milena/sandbox/edwin/rush/exo2/test.cc
===================================================================
--- trunk/milena/sandbox/edwin/rush/exo2/test.cc (revision 3778)
+++ trunk/milena/sandbox/edwin/rush/exo2/test.cc (revision 3779)
@@ -18,6 +18,7 @@
#include <mln/fun/p2v/ternary.hh>
#include <mln/pw/all.hh>
+
namespace mln
{
// Sharpness Attribute -> Height Attribute
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/propagate.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/propagate.hh (revision 3779)
@@ -0,0 +1,124 @@
+// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_TREE_PROPAGATE_HH_
+# define MLN_MORPHO_TREE_PROPAGATE_HH_
+
+/// \file mln/morpho/tree/propagate.hh
+///
+/// Functions to propagate a node value in the tree.
+
+# include <mln/morpho/tree/data.hh>
+# include <mln/morpho/tree/propagate_node.hh>
+
+namespace mln {
+ namespace morpho {
+ namespace tree {
+
+
+ /// Propagate the representative point's value to
+ /// non-representative node points.
+ template <typename T, typename A>
+ void
+ propagate_representative(const T& t, Image<A>& a_)
+ {
+ A a = exact(a_);
+ mln_up_site_piter(T) p(t);
+ for_all(p)
+ if (! t.is_a_node(p))
+ {
+ mln_assertion(t.is_a_node(t.parent(p)));
+ a(p) = a(t.parent(p));
+ }
+ }
+
+ /**
+ ** For each component in the list \p component_list, it
+ ** propagates the representant value to the remaining nodes of the
+ ** component. The value of a node that doesn't belong to a component is
+ ** set to \p null.
+ **
+ ** @param attr_image The attribute image.
+ ** @param tree The component tree used to propagate value.
+ ** @param component_list The list of components.
+ ** @param null The nodes that don't belong to components will be set
+ ** with this value.
+ **
+ ** @return The resulting component image.
+ */
+ template <typename A, typename T>
+ inline
+ A propagate_components(const Image<A>& attr_image,
+ const T& tree,
+ const p_array< mln_psite(A) >& component_list,
+ const mln_value(A)& null)
+ {
+ const A& a = exact(attr_image);
+ A out;
+ initialize(out, a);
+ mln::data::fill(out, null);
+
+ mln_piter(p_array<mln_psite(A)>) p(component_list);
+ for_all(p)
+ {
+ out(p) = a(p);
+ morpho::tree::propagate_node_to_descendants(p, tree, out, a(p));
+ }
+ morpho::tree::propagate_representative(tree, out);
+ return out;
+ }
+
+
+ template <typename T, typename V>
+ inline
+ mln_ch_value(typename T::function, V)
+ set_value_to_components(const T& tree,
+ const p_array< mln_psite(T) >& component_list,
+ const V& value,
+ const V& null)
+ {
+ mln_ch_value(typename T::function, V) out;
+ initialize(out, tree.f());
+ mln::data::fill(out, null);
+
+ mln_piter(p_array< mln_psite(T) >) p(component_list);
+ for_all(p)
+ {
+ out(p) = value;
+ morpho::tree::propagate_node_to_descendants(p, tree, out);
+ }
+ morpho::tree::propagate_representative(tree, out);
+ return out;
+ }
+
+ } // end of namespace mln::morpho::tree
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+#endif /* !MLN_MORPHO_TREE_PROPAGATE_HH_ */
+
+
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/components.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/components.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/components.hh (revision 3779)
@@ -0,0 +1,319 @@
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_TREE_COMPONENTS_HH_
+# define MLN_MORPHO_TREE_COMPONENTS_HH_
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/concept/function.hh>
+# include <mln/data/fill.hh>
+
+# include <mln/morpho/tree/data.hh>
+# include "propagate_node.hh"
+
+# include <mln/trace/entering.hh>
+# include <mln/trace/exiting.hh>
+
+
+/**
+** \file mln/morpho/tree/components.hh
+**
+** Routines that offers different way of retrieving tree components.
+** Tree components are nodes maximising the attribute.
+*/
+
+
+namespace mln {
+ namespace morpho {
+ namespace tree {
+
+ /**
+ ** Retrieve components from the tree until all leaves belong to
+ ** components.
+ **
+ ** @param tree Component tree.
+ ** @param attr_image Attribute image.
+ **
+ ** @return Array of components.
+ */
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image);
+
+ /**
+ ** Retrieve the \p n most important components from the tree. n
+ ** should be lesser than the maximum number of components. If
+ ** not, the functions stops when there's no more components.
+ **
+ ** @param tree Component tree.
+ ** @param attr_image Attribute image.
+ ** @param n Number of components to get.
+ **
+ ** @return Array of components.
+ */
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, unsigned n);
+
+ /**
+ ** Retrieve the most important components that check
+ ** predicate \p pred.
+ **
+ ** @param tree Component tree.
+ ** @param attr_image Attribute image.
+ ** @param pred Predicate that components must check.
+ **
+ ** @return Array of components.
+ */
+ template <typename T, typename A, typename P2B>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, const Function_p2b<P2B>& pred);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace internal
+ {
+ template <typename P, typename I>
+ struct desc_sort
+ {
+ bool operator()(const P& p1, const P& p2) const
+ {
+ return ima(p1) > ima(p2);
+ }
+ const I& ima;
+
+ desc_sort(const I& ima) : ima(ima) {}
+ };
+
+ template <typename P, typename I>
+ inline
+ void
+ sort(p_array<P>& arr, const I& ima_)
+ {
+ mlc_converts_to(P, mln_psite(I))::check();
+
+ const I& ima = exact(ima_);
+ std::vector<P>& v = arr.hook_std_vector_();
+ std::sort(v.begin(), v.end(), desc_sort<P,I>(ima));
+ }
+
+ template <typename A>
+ inline
+ bool
+ get_max(const p_array< mln_psite(A) >& arr, const A& activity, unsigned& pos)
+ {
+ while (pos < arr.nsites() && !activity(arr[pos]))
+ ++pos;
+ return (pos < arr.nsites());
+ }
+
+
+ //////////////////////////
+ // Predifined predicate //
+ //////////////////////////
+
+ /// Predicate used to gets components until tree leaves last.
+ template <typename T>
+ class pred_tree_leaves_last
+ {
+ public:
+ pred_tree_leaves_last(const T& tree) :
+ n_ (tree.leaves().nsites())
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p, unsigned n, unsigned* nb_leaves) const
+ {
+ (void)p;
+ (void)n;
+ mln_assertion(nb_leaves != 0);
+
+ return (*nb_leaves < n_);
+ }
+
+
+ private:
+ unsigned n_;
+ };
+
+ /// Predicate used to get n components.
+ class pred_n_components
+ {
+ public:
+ pred_n_components(unsigned n) :
+ n_(n)
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p, unsigned n, unsigned* nb_leaves) const
+ {
+ (void)p;
+ (void)nb_leaves;
+
+ return (n < n_);
+ }
+
+
+ private:
+ unsigned n_;
+ };
+
+ /// Predicate used to get components that check a p2b function predicate.
+ template <typename P2B>
+ class pred_p2b
+ {
+ public:
+ pred_p2b(const P2B& f) :
+ f_ (f)
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p, unsigned n, unsigned* nb_leaves) const
+ {
+ (void)n;
+ (void)nb_leaves;
+
+ return (f_(p));
+ }
+
+
+ private:
+ const P2B& f_;
+ };
+
+
+
+
+ template <typename T, typename A, class P>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const A& a, const P& pred, bool uses_leaves = 0)
+ {
+
+ mln_psite(A) p;
+ p_array< mln_psite(A) > components;
+ mln_ch_value(A, bool) activity;
+ p_array< mln_psite(A) > max_arr = tree.nodes();
+ unsigned arr_pos = 0; //position in max_array
+ unsigned n = 0;
+ unsigned* nb_leaves = uses_leaves ? new unsigned(0) : 0;
+
+ initialize(activity, a);
+ mln::data::fill(activity, true);
+ internal::sort(max_arr, a);
+
+ do
+ {
+ if (!internal::get_max(max_arr, activity, arr_pos))
+ break;
+ p = max_arr[arr_pos];
+ if (a(p) == 0)
+ break;
+ std::cout << p << " " << a(p) << std::endl;
+ components.insert(p);
+ morpho::tree::propagate_node_to_descendants(p, tree, activity, false, nb_leaves);
+ morpho::tree::propagate_node_to_ancestors(p, tree, activity, false);
+ activity(p) = false;
+ n++;
+ mln_assertion(nb_leaves == 0 || *nb_leaves < mln_max(unsigned));
+ }
+ while (pred(p, n, nb_leaves));
+
+ if (uses_leaves)
+ delete nb_leaves;
+ return components;
+ }
+
+ } // end of namespace mln::morpho::tree::internal
+
+
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image)
+ {
+ trace::entering("mln::morpho::tree::get_components");
+
+ const A& a = exact(attr_image);
+ mln_precondition(tree.f().domain() == a.domain());
+ mln_precondition(a.is_valid());
+
+ p_array< mln_psite(A) > components =
+ internal::get_components<T, A>(tree, a, internal::pred_tree_leaves_last<T>(tree), true);
+
+ trace::exiting("mln::morpho::tree::get_components");
+ return components;
+ }
+
+
+ template <typename T, typename A>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, unsigned n)
+ {
+ trace::entering("mln::morpho::tree::get_components");
+
+ const A& a = exact(attr_image);
+ mln_precondition(tree.f().domain() == a.domain());
+ mln_precondition(a.is_valid());
+
+ p_array< mln_psite(A) > components;
+
+ if (n > 0)
+ components = internal::get_components(tree, a, internal::pred_n_components(n), false);
+
+ trace::exiting("mln::morpho::tree::get_components");
+ return components;
+ }
+
+ template <typename T, typename A, typename P2B>
+ p_array< mln_psite(A) >
+ get_components(const T& tree, const Image<A>& attr_image, const Function_p2b<P2B>& pred)
+ {
+ trace::entering("mln::morpho::tree::get_components");
+
+ const A& a = exact(attr_image);
+ const P2B& predicate = exact(pred);
+ mln_precondition(tree.f().domain() == a.domain());
+ mln_precondition(a.is_valid());
+
+ p_array< mln_psite(A) > components =
+ internal::get_components(tree, a, internal::pred_p2b<P2B>(predicate), false);
+
+ trace::exiting("mln::morpho::tree::get_components");
+ return components;
+ }
+
+ } // end of namespace mln::morpho::tree
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+# endif /* !MLN_INCLUDE_ONLY */
+
+#endif /* !MLN_MORPHO_TREE_COMPONENTS_HH_ */
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/tree/components.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/filter.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/filter.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/filter.hh (revision 3779)
@@ -0,0 +1,205 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_TREE_FILTER_HH_
+# define MLN_MORPHO_TREE_FILTER_HH_
+
+/**
+** @file mln/morpho/tree/filter.hh
+**
+** @brief Methods to handle component tree filtering strategies with
+** non-increasing attribute. Nevertheless, it works on increasing
+** predicate as well. In this case, all strategies have the same
+** result but min filter or direct filter should be used in term
+** of performance. If a predicate test is not enough fast, then
+** prefer the min filter that minimizes call to predicate.
+*/
+
+# include <mln/core/concept/function.hh>
+# include <mln/morpho/tree/data.hh>
+# include <mln/morpho/tree/propagate_if.hh>
+
+namespace mln {
+ namespace morpho {
+ namespace tree {
+ namespace filter {
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ min(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ max(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ direct(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ subtractive(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+
+# ifndef MLN_INCLUDE_ONLY
+ namespace internal
+ {
+
+ template <typename P2B>
+ struct not_pred_ : Function_p2b< not_pred_<P2B> >
+ {
+ not_pred_(const Function_p2b<P2B>& f) :
+ f_ (exact(f))
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p) const
+ {
+ return !(f_(p));
+ }
+
+ private:
+ const P2B& f_;
+ };
+
+ template <typename P2B>
+ inline
+ not_pred_<P2B>
+ not_pred(const Function_p2b<P2B>& f)
+ {
+ return not_pred_<P2B>(f);
+ }
+
+ }
+
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ min(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+ mln_ch_value(F, bool) mark;
+ initialize(mark, f);
+ mln::data::fill(mark, false);
+
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(tree.parent(n)) || !pred(n))
+ {
+ f(n) = f(tree.parent(n));
+ mark(n) = true;
+ }
+ //FIXME postcondition
+ }
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ max(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+ mln_ch_value(F, bool) mark;
+ initialize(mark, f);
+ mln::data::fill(mark, true);
+
+ {
+ mln_up_node_piter(T) n(tree);
+ for_all(n)
+ if (!mark(n))
+ mark(tree.parent(n)) = false;
+ else if (pred(n))
+ {
+ mark(tree.parent(n)) = false;
+ mark(n) = false;
+ }
+ }
+
+ {
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(n))
+ f(n) = f(tree.parent(n));
+ }
+ }
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ direct(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (!pred(n))
+ f(n) = f(tree.parent(n));
+ //FIXME postcondition
+ }
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ subtractive(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+
+ morpho::tree::propagate_if(tree, f, morpho::tree::desc_propagation (), internal::not_pred(pred));
+
+ mln_up_node_piter(T) n(tree);
+ for_all(n)
+ if (!pred(n))
+ f(n) = f(tree.parent(n));
+ //FIXME postcondition
+ }
+
+# endif /* !MLN_INCLUDE_ONLY */
+
+ } // end of namespace mln::morpho::tree::filter
+ } // end of namespace mln::morpho::tree
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+
+#endif /* !MLN_MORPHO_TREE_FILTER_HH_ */
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node.hh (revision 3779)
@@ -0,0 +1,209 @@
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_TREE_PROPAGATE_NODE_HH_
+# define MLN_MORPHO_TREE_PROPAGATE_NODE_HH_
+
+# include <mln/core/concept/image.hh>
+# include <mln/core/macros.hh>
+# include <mln/morpho/tree/data.hh>
+
+/// \file mln/morpho/tree/propagate_node.hh
+///
+/// Functions to propagate node in the tree.
+
+namespace mln {
+ namespace morpho {
+ namespace tree {
+
+ /**
+ ** Propagate a value \p v from a node \p n to its descendants.
+ **
+ ** @param n[in] Node to propagate.
+ ** @param t[in] Component tree used for propagation.
+ ** @param a_[in] Attribute image where values are propagated.
+ ** @param v[in] Value to propagate.
+ ** @param nb_leaves[out] Optional. Store the number of leaves in
+ ** the component.
+ */
+ template <typename T, typename A>
+ void
+ propagate_node_to_descendants(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v,
+ unsigned* nb_leaves = 0);
+
+ /**
+ ** Propagate the node's value to its descendants.
+ **
+ ** @param n[in] Node to propagate.
+ ** @param t[in] Component tree used for propagation.
+ ** @param a_[in] Attribute image where values are propagated.
+ ** @param nb_leaves[out] Optional. Store the number of leaves in
+ ** the component.
+ */
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_descendants(mln_psite(A)& n,
+ const T& t,
+ Image<A>& a_,
+ unsigned* nb_leaves = 0);
+
+
+ /**
+ ** Propagate a value \v from a node \n to its ancestors.
+ **
+ ** @param n Node to propagate.
+ ** @param t Component tree used for propagation.
+ ** @param a_ Attribute image where values are propagated.
+ ** @param v Value to propagate.
+ */
+ template <typename T, typename A>
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v);
+
+ /**
+ ** Propagate the node's value to its ancestors.
+ **
+ ** @param n Node to propagate.
+ ** @param t Component tree used for propagation.
+ ** @param a_ Attribute image where values are propagated.
+ */
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_);
+
+
+ # ifndef MLN_INCLUDE_ONLY
+
+ /* Descendants propagation */
+
+
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_descendants(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v,
+ unsigned* nb_leaves = 0)
+ {
+ A& a = exact(a_);
+ mln_precondition(a.is_valid());
+ mln_precondition(a.domain() == t.f().domain());
+ mln_precondition(a.domain().has(n));
+
+
+ if (!t.is_a_node(n)) // Get the representant.
+ n = t.parent(n);
+ mln_assertion(t.is_a_node(n));
+
+ typename T::preorder_piter pp(t, n);
+
+ pp.start(); // We don't set n to v.
+
+ if (nb_leaves)
+ *nb_leaves += t.is_a_leaf(pp);
+
+ for (pp.next(); pp.is_valid(); pp.next())
+ {
+ a(pp) = v;
+ if (nb_leaves && t.is_a_leaf(pp))
+ ++(*nb_leaves);
+ }
+ }
+
+
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_descendants(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ unsigned* nb_leaves = 0)
+
+ {
+ A& a = exact(a_);
+ propagate_node_to_descendants(n, t, a, a(n), nb_leaves);
+ }
+
+
+ /* Ancestors propagation */
+
+ template <typename T, typename A>
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_,
+ const mln_value(A)& v)
+ {
+ A& a = exact(a_);
+ mln_precondition(a.is_valid());
+ mln_precondition(a.domain() == t.f().domain());
+ mln_precondition(a.domain().has(n));
+
+ if (!t.is_a_node(n)) // Get the representant.
+ n = t.parent(n);
+ mln_assertion(t.is_a_node(n));
+
+ if (t.is_root(n))
+ return;
+
+ do {
+ n = t.parent(n);
+ a(n) = v;
+ } while (!t.is_root(n));
+
+ }
+
+ template <typename T, typename A>
+ inline
+ void
+ propagate_node_to_ancestors(mln_psite(A) n,
+ const T& t,
+ Image<A>& a_)
+ {
+ A& a = exact(a_);
+ propagate_node_to_ancestors(n, t, a, a(n));
+ }
+
+ # endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::morpho::tree
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+#endif /* !MLN_MORPHO_TREE_PROPAGATE_NODE_HH_ */
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_node.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh (revision 3779)
@@ -0,0 +1,327 @@
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_TREE_PROPAGATE_IF_HH_
+# define MLN_MORPHO_TREE_PROPAGATE_IF_HH_
+
+/**
+** @file mln/morpho/tree/propagate_if.hh
+**
+** @brief Methods to handle propagation startegies
+** in component trees.
+**
+*/
+
+# include <mln/morpho/tree/data.hh>
+# include <mln/morpho/tree/propagate_node.hh>
+
+# include <mln/data/fill.hh>
+# include <mln/pw/all.hh>
+
+namespace mln {
+ namespace morpho {
+ namespace tree {
+
+ template <typename WP>
+ struct way_of_propagation : Object< WP > { protected: way_of_propagation() {}; };
+ struct desc_propagation : way_of_propagation <desc_propagation> {};
+ struct asc_propagation : way_of_propagation <asc_propagation> {};
+
+ /**
+ ** Propagate nodes checking the predicate \p pred in the way
+ ** defined by \p way_of_propagation.
+ **
+ ** @param tree Component tree used for propagation.
+ ** @param a_ Attributed image where values are propagated.
+ ** @param way_of_propagation Propagate node in acsendant or
+ ** descendant way.
+ ** @param pred Predicate that node must check to be propagated.
+ ** @param v Value to be propagated. (By default \p v is the value
+ ** at the node being propagated).
+ */
+ template <typename T, typename A, typename P2B, typename WP>
+ inline
+ void
+ propagate_if(const T& tree,
+ Image<A>& a_,
+ const way_of_propagation<WP>&,
+ const Function_p2b<P2B>& pred,
+ const mln_value(A)& v);
+
+ template <typename T, typename A, typename P2B>
+ inline
+ void
+ propagate_if(const T& tree,
+ Image<A>& a_,
+ const desc_propagation&,
+ const Function_p2b<P2B>& pred);
+
+ /**
+ ** Propagate nodes having the value v in the way
+ ** defined by \p way_of_propagation.
+ **
+ ** @param tree Component tree used for propagation.
+ ** @param a_ Attributed image where values are propagated.
+ ** @param way_of_propagation Propagate node in acsendant or
+ ** descendant way.
+ ** @param v Value that node must have to be propagated.
+ ** @param v_prop Value to propagate (By default it is the value
+ ** at the node being propagated).
+ */
+ template <typename T, typename A, typename WP>
+ inline
+ void
+ propagate_if_value(const T& tree,
+ Image<A>& a_,
+ const way_of_propagation<WP>&,
+ const mln_value(A)& v,
+ const mln_value(A)& v_prop);
+
+ template <typename T, typename A, typename WP>
+ inline
+ void
+ propagate_if_value(const T& tree,
+ Image<A>& a_,
+ const way_of_propagation<WP>&,
+ const mln_value(A)& v);
+
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace internal
+ {
+ template <typename T, typename A, typename P2B>
+ bool check_propagate_if(const T& t,
+ const A& a,
+ const asc_propagation& prop,
+ const P2B& pred,
+ const mln_value(A)& v)
+ {
+ (void) prop;
+ mln_node_piter(T) n(t);
+ for_all(n)
+ if (pred(n) && a(t.parent(n)) != v)
+ return false;
+ return true;
+ }
+
+ template <typename T, typename A, typename P2B>
+ bool check_propagate_if(const T& t,
+ const A& a,
+ const desc_propagation& prop,
+ const P2B& pred,
+ const mln_value(A)& v)
+ {
+ (void) prop;
+ mln_node_piter(T) n(t);
+ for_all(n)
+ if (a(n) != v && pred(t.parent(n)))
+ return false;
+ return true;
+ }
+
+ template <typename T, typename A, typename P2B>
+ bool check_propagate_if(const T& t,
+ const A& a,
+ const desc_propagation& prop,
+ const P2B& pred)
+ {
+ (void) prop;
+ mln_node_piter(T) n(t);
+ for_all(n)
+ if (a(n) != a(t.parent(n)) && pred(t.parent(n)))
+ return false;
+ return true;
+ }
+
+ template <typename T, typename A, typename P2B>
+ inline
+ void
+ propagate_if(const T& tree,
+ A& a,
+ const desc_propagation& prop,
+ const P2B& pred,
+ const mln_value(A)& v)
+ {
+ (void) prop;
+
+ mln_precondition(a.is_valid());
+ mln_precondition(tree.f().domain() == a.domain());
+
+ mln_ch_value(typename T::function, bool) mark;
+ initialize(mark, tree.f());
+ mln::data::fill(mark, false);
+
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(tree.parent(n)))
+ {
+ a(n) = v;
+ mark(n) = true;
+ }
+ else if (pred(n))
+ mark(n) = true;
+ mln_postcondition(check_propagate_if(tree, a, prop, pred, v));
+ }
+
+ template <typename T, typename A, typename P2B>
+ inline
+ void
+ propagate_if(const T& tree,
+ A& a,
+ const desc_propagation& prop,
+ const P2B& pred)
+ {
+ (void) prop;
+
+ mln_precondition(a.is_valid());
+ mln_precondition(tree.f().domain() == a.domain());
+
+ mln_ch_value(typename T::function, bool) mark;
+ initialize(mark, tree.f());
+ mln::data::fill(mark, false);
+
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(tree.parent(n)))
+ {
+ a(n) = a(tree.parent(n));
+ mark(n) = true;
+ }
+ else if (pred(n))
+ mark(n) = true;
+ mln_postcondition(check_propagate_if(tree, a, prop, pred));
+ }
+
+
+ template <typename T, typename A, typename P2B>
+ inline
+ void
+ propagate_if(const T& tree,
+ A& a,
+ const asc_propagation& prop,
+ const P2B& pred,
+ const mln_value(A)& v)
+ {
+ (void) prop;
+
+ mln_precondition(a.is_valid());
+ mln_precondition(tree.f().domain() == a.domain());
+
+ mln_ch_value(typename T::function, bool) mark;
+ initialize(mark, tree.f());
+ mln::data::fill(mark, false);
+
+ mln_up_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(n))
+ {
+ a(n) = v;
+ mark(tree.parent(n)) = true;
+ }
+ else if (pred(n))
+ mark(tree.parent(n)) = true;
+
+ mln_postcondition(check_propagate_if(tree, a, prop, pred, v));
+ }
+
+ } // end of namespace mln::morpho::tree::internal
+
+
+ /* Facades */
+
+ template <typename T, typename A, typename WP>
+ inline
+ void
+ propagate_if_value(const T& tree,
+ Image<A>& a_,
+ const way_of_propagation<WP>& prop_,
+ const mln_value(A)& v,
+ const mln_value(A)& v_prop)
+ {
+ A& a = exact(a_);
+ const WP& prop = exact(prop_);
+
+ internal::propagate_if(tree, a, prop, pw::value(a) == pw::cst(v), v_prop);
+ }
+
+
+ template <typename T, typename A, typename WP>
+ inline
+ void
+ propagate_if_value(const T& tree,
+ Image<A>& a_,
+ const way_of_propagation<WP>& prop_,
+ const mln_value(A)& v)
+ {
+ A& a = exact(a_);
+ const WP& prop = exact(prop_);
+
+ internal::propagate_if(tree, a, prop, pw::value(a) == pw::cst(v), v);
+ }
+
+ template <typename T, typename A, typename P2B, typename WP>
+ inline
+ void
+ propagate_if(const T& tree,
+ Image<A>& a_,
+ const way_of_propagation<WP>& prop_,
+ const Function_p2b<P2B>& pred_,
+ const mln_value(A)& v)
+ {
+ A& a = exact(a_);
+ const WP& prop = exact(prop_);
+ const P2B& pred = exact(pred_);
+
+ internal::propagate_if(tree, a, prop, pred, v);
+ }
+
+ template <typename T, typename A, typename P2B>
+ inline
+ void
+ propagate_if(const T& tree,
+ Image<A>& a_,
+ const desc_propagation& prop,
+ const Function_p2b<P2B>& pred_)
+ {
+ A& a = exact(a_);
+ const P2B& pred = exact(pred_);
+
+ internal::propagate_if(tree, a, prop, pred);
+ }
+
+#endif /* !MLN_INCLUDE_ONLY */
+
+
+ } // end of namespace mln::morpho::tree
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+#endif /* !MLN_MORPHO_TREE_PROPAGATE_IF_HH_ */
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: trunk/milena/sandbox/edwin/mln/morpho/attribute/occupation.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/attribute/occupation.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/attribute/occupation.hh (revision 3779)
@@ -0,0 +1,252 @@
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_ATTRIBUTE_OCCUPATION_HH
+# define MLN_MORPHO_ATTRIBUTE_OCCUPATION_HH
+
+/// \file mln/morpho/attribute/occupation.hh
+///
+/// Define an accumulator that computes the occupation of a
+/// component. (occupation = volume of the component / volume of box bounding the component.
+
+# include <mln/core/concept/accumulator.hh>
+# include <mln/accu/internal/base.hh>
+# include <mln/morpho/attribute/volume.hh>
+
+
+namespace mln
+{
+
+ // Forward declaration.
+ namespace morpho {
+ namespace attribute {
+ template <typename I>
+ class occupation;
+ }
+ }
+
+
+ // Traits.
+
+ namespace trait
+ {
+
+ template <typename I>
+ struct accumulator_< morpho::attribute::occupation<I> >
+ {
+ typedef accumulator::has_untake::no has_untake;
+ typedef accumulator::has_set_value::no has_set_value;
+ typedef accumulator::has_stop::no has_stop;
+ typedef accumulator::when_pix::use_v when_pix;
+ };
+
+ } // end of namespace mln::trait
+
+
+ namespace morpho
+ {
+
+ namespace attribute
+ {
+
+ /// Occupation accumulator class.
+ ///
+ /// The parameter \p I is the image type on which the accumulator
+ /// of pixels is built.
+ template <typename I>
+ struct occupation
+ : public mln::accu::internal::base< double, occupation<I> >
+ {
+ typedef mln_value(I) argument;
+
+ occupation();
+
+ /// Manipulators.
+ /// \{
+ void init();
+
+ void take(const mln_value(I)& v);
+ void take(const util::pix<I>& px);
+ void take(const occupation<I>& other);
+
+ void take_as_init(const mln_value(I)& v);
+ void take_as_init(const util::pix<I>& px);
+ /// \}
+
+ /// Get the value of the accumulator.
+ double to_result() const;
+
+ /// Check whether this accu is able to return a result.
+ /// Always true here.
+ bool is_valid() const;
+
+ /// Give the area of the component.
+ unsigned area() const;
+
+ /// Give the height.
+ unsigned height() const;
+
+ /// Give the volume of the component.
+ unsigned volume() const;
+
+ protected:
+ /// The min value taken.
+ unsigned min_;
+ /// The max value taken.
+ unsigned max_;
+ /// The volume of the component.
+ typename mln::morpho::attribute::volume<I> volume_;
+ };
+
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename I>
+ inline
+ occupation<I>::occupation()
+ {
+ init();
+ }
+
+ template <typename I>
+ inline
+ void
+ occupation<I>::init()
+ {
+ min_ = mln_max(unsigned);
+ max_ = mln_min(unsigned);
+ volume_.init();
+ }
+
+ template <typename I>
+ inline
+ void
+ occupation<I>::take(const mln_value(I)& v)
+ {
+ if (! is_valid())
+ {
+ take_as_init(v);
+ return;
+ }
+ volume_.take(v);
+ if (v < min_)
+ min_ = v;
+ if (v > max_)
+ max_ = v;
+ }
+
+ template <typename I>
+ inline
+ void
+ occupation<I>::take(const util::pix<I>& px)
+ {
+ take(px.v());
+ }
+
+ template <typename I>
+ inline
+ void
+ occupation<I>::take(const occupation<I>& other)
+ {
+ mln_invariant(is_valid());
+ volume_.take(other.volume_);
+ if (other.min_ < min_)
+ min_ = other.min_;
+ if (other.max_ > max_)
+ max_ = other.max_;
+ }
+
+ template <typename I>
+ inline
+ void
+ occupation<I>::take_as_init(const mln_value(I)& v)
+ {
+ volume_.take_as_init(v);
+ max_ = v;
+ min_ = v;
+ }
+
+ template <typename I>
+ inline
+ void
+ occupation<I>::take_as_init(const util::pix<I>& px)
+ {
+ take_as_init(px.v());
+ }
+
+ template <typename I>
+ inline
+ double
+ occupation<I>::to_result() const
+ {
+ return (double)volume_.to_result() / (double)(volume_.area() * height());
+ }
+
+ template <typename I>
+ inline
+ unsigned
+ occupation<I>::area() const
+ {
+ return volume_.area();
+ }
+
+ template <typename I>
+ inline
+ unsigned
+ occupation<I>::volume() const
+ {
+ return volume_.to_result();
+ }
+
+ template <typename I>
+ inline
+ unsigned
+ occupation<I>::height() const
+ {
+ return (max_ - min_);
+ }
+
+ template <typename I>
+ inline
+ bool
+ occupation<I>::is_valid() const
+ {
+ return volume_.is_valid();
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::morpho::attribute
+
+ } // end of namespace mln::morpho
+
+} // end of namespace mln
+
+
+#endif // ! MLN_MORPHO_ATTRIBUTE_OCCUPATION_HH
Index: trunk/milena/sandbox/edwin/mln/morpho/attribute/bbox.hh
===================================================================
--- trunk/milena/sandbox/edwin/mln/morpho/attribute/bbox.hh (revision 0)
+++ trunk/milena/sandbox/edwin/mln/morpho/attribute/bbox.hh (revision 3779)
@@ -0,0 +1,203 @@
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_ATTRIBUTE_BBOX_HH_
+# define MLN_MORPHO_ATTRIBUTE_BBOX_HH_
+
+/// \file mln/morpho/attribute/bbox.hh
+///
+/// Define an accumulator that computes bounding box of a
+/// component.
+
+# include <mln/core/concept/box.hh>
+
+
+namespace mln
+{
+
+ // Forward declaration.
+
+ namespace morpho {
+ namespace attribute {
+ template <typename I> class bbox;
+ }
+ }
+
+ // Traits.
+
+ namespace trait
+ {
+
+ template <typename I>
+ struct accumulator_< morpho::attribute::bbox<I> >
+ {
+ typedef accumulator::has_untake::no has_untake;
+ typedef accumulator::has_set_value::no has_set_value;
+ typedef accumulator::has_stop::no has_stop;
+ typedef accumulator::when_pix::use_p when_pix;
+ };
+
+ } // end of namespace mln::trait
+
+ namespace morpho {
+ namespace attribute {
+
+ template <typename I>
+ struct bbox : public mln::accu::internal::base<const box<mln_psite(I)>&, bbox<I> >
+ {
+ typedef mln::accu::internal::base<const box<mln_psite(I)>&, bbox<I> > super_;
+
+ public:
+ typedef mln_psite(I) P;
+ typedef mln_psite(I) argument;
+
+ bbox();
+
+ /// Manipulators.
+ /// \{
+ void init();
+ void take(const argument& p);
+ void take(const bbox<I>& other);
+ void take_as_init(const argument& p);
+
+ /// \}
+
+ /// Get the value of the accumulator.
+ const box<P>& to_result() const;
+
+
+ /// Check whether this accu is able to return a result.
+ /// Always true here.
+ bool is_valid() const;
+
+ protected:
+
+ bool is_valid_;
+ box<mln_psite(I)> b_;
+ };
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename I>
+ inline
+ bbox<I>::bbox()
+ {
+ init();
+ }
+
+ template <typename I>
+ inline
+ void
+ bbox<I>::init()
+ {
+ is_valid_ = false;
+ }
+
+ template <typename I>
+ inline
+ void
+ bbox<I>::take_as_init(const mln_psite(I)& p)
+ {
+ b_.pmin() = p;
+ b_.pmax() = p;
+ is_valid_ = true;
+ }
+
+ template <typename I>
+ inline
+ void
+ bbox<I>::take(const mln_psite(I)& p)
+ {
+ if (!is_valid_)
+ {
+ b_.pmin() = p;
+ b_.pmax() = p;
+ is_valid_ = true;
+ return;
+ }
+ for (unsigned i = 0; i < mln_psite_(I)::dim; ++i)
+ if (p[i] < b_.pmin()[i])
+ b_.pmin()[i] = p[i];
+ else if (p[i] > b_.pmax()[i])
+ b_.pmax()[i] = p[i];
+ }
+
+ template <typename I>
+ inline
+ void
+ bbox<I>::take(const bbox<I>& other)
+ {
+ if (! other.is_valid_)
+ {
+ // no-op
+ return;
+ }
+ if (! this->is_valid_)
+ {
+ // 'other' makes '*this' valid
+ *this = other;
+ is_valid_ = true;
+ return;
+ }
+ // both are valids so:
+ const box<mln_psite(I)>& o_b = other.b_;
+ for (unsigned i = 0; i < mln_psite_(I)::dim; ++i)
+ {
+ if (o_b.pmin()[i] < b_.pmin()[i])
+ b_.pmin()[i] = o_b.pmin()[i];
+ if (o_b.pmax()[i] > b_.pmax()[i])
+ b_.pmax()[i] = o_b.pmax()[i];
+ }
+ }
+
+ template <typename I>
+ inline
+ const box<mln_psite(I)>&
+ bbox<I>::to_result() const
+ {
+ mln_precondition(is_valid_);
+ return b_;
+ }
+
+ template <typename I>
+ inline
+ bool
+ bbox<I>::is_valid() const
+ {
+ return is_valid_;
+ }
+
+
+# endif /* !MLN_INCLUDE_ONLY */
+ } // end of namespace mln::morpho::attribute
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+
+
+#endif /* !MLN_MORPHO_ATTRIBUTE_BBOX_HH_ */
Property changes on: trunk/milena/sandbox/edwin/mln/morpho/attribute
___________________________________________________________________
Added: svn:mergeinfo
1
0
* edwin/mln/morpho/tree/filter.hh:
group strategies for non-increasing attribute filtering.
* edwin/attributes/bbox.hh,
* edwin/attributes/occupation.hh,
* edwin/attributes,
* edwin/mln/morpho/attribute,
* edwin/mln/morpho/tree/components.hh,
* edwin/mln/morpho/tree/propagate.hh,
* edwin/mln/morpho/tree/propagate_if.hh,
* edwin/mln/morpho/tree/propagate_node.hh,
* edwin/mln/morpho/tree,
* edwin/mln/morpho,
* edwin/mln,
* edwin/rush/exo2/test.cc,
* edwin/tests,
* edwin/tree/components.hh,
* edwin/tree/propagate.hh,
* edwin/tree/propagate_if.hh,
* edwin/tree/propagate_node.hh,
move all tree materials in edwin/mln/morpho/tree.
---
milena/sandbox/ChangeLog | 25 +++
.../{attributes => mln/morpho/attribute}/bbox.hh | 0
.../morpho/attribute}/occupation.hh | 0
.../edwin/{ => mln/morpho}/tree/components.hh | 2 +-
milena/sandbox/edwin/mln/morpho/tree/filter.hh | 205 ++++++++++++++++++++
.../edwin/{ => mln/morpho}/tree/propagate.hh | 14 +-
.../edwin/{ => mln/morpho}/tree/propagate_if.hh | 2 +-
.../edwin/{ => mln/morpho}/tree/propagate_node.hh | 0
milena/sandbox/edwin/rush/exo2/test.cc | 1 +
9 files changed, 240 insertions(+), 9 deletions(-)
rename milena/sandbox/edwin/{attributes => mln/morpho/attribute}/bbox.hh (100%)
rename milena/sandbox/edwin/{attributes => mln/morpho/attribute}/occupation.hh (100%)
rename milena/sandbox/edwin/{ => mln/morpho}/tree/components.hh (99%)
create mode 100644 milena/sandbox/edwin/mln/morpho/tree/filter.hh
rename milena/sandbox/edwin/{ => mln/morpho}/tree/propagate.hh (92%)
rename milena/sandbox/edwin/{ => mln/morpho}/tree/propagate_if.hh (99%)
rename milena/sandbox/edwin/{ => mln/morpho}/tree/propagate_node.hh (100%)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index be85cde..3cffc50 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,28 @@
+2009-05-10 Edwin Carlinet <carlinet(a)lrde.epita.fr>
+
+ Make clean in tree files and procedures.
+ * edwin/mln/morpho/tree/filter.hh:
+ group strategies for non-increasing attribute filtering.
+
+ * edwin/attributes/bbox.hh,
+ * edwin/attributes/occupation.hh,
+ * edwin/attributes,
+ * edwin/mln/morpho/attribute,
+ * edwin/mln/morpho/tree/components.hh,
+ * edwin/mln/morpho/tree/propagate.hh,
+ * edwin/mln/morpho/tree/propagate_if.hh,
+ * edwin/mln/morpho/tree/propagate_node.hh,
+ * edwin/mln/morpho/tree,
+ * edwin/mln/morpho,
+ * edwin/mln,
+ * edwin/rush/exo2/test.cc,
+ * edwin/tests,
+ * edwin/tree/components.hh,
+ * edwin/tree/propagate.hh,
+ * edwin/tree/propagate_if.hh,
+ * edwin/tree/propagate_node.hh,
+ move all tree materials in edwin/mln/morpho/tree.
+
2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
diff --git a/milena/sandbox/edwin/attributes/bbox.hh b/milena/sandbox/edwin/mln/morpho/attribute/bbox.hh
similarity index 100%
rename from milena/sandbox/edwin/attributes/bbox.hh
rename to milena/sandbox/edwin/mln/morpho/attribute/bbox.hh
diff --git a/milena/sandbox/edwin/attributes/occupation.hh b/milena/sandbox/edwin/mln/morpho/attribute/occupation.hh
similarity index 100%
rename from milena/sandbox/edwin/attributes/occupation.hh
rename to milena/sandbox/edwin/mln/morpho/attribute/occupation.hh
diff --git a/milena/sandbox/edwin/tree/components.hh b/milena/sandbox/edwin/mln/morpho/tree/components.hh
similarity index 99%
rename from milena/sandbox/edwin/tree/components.hh
rename to milena/sandbox/edwin/mln/morpho/tree/components.hh
index 2b4cfac..6485241 100644
--- a/milena/sandbox/edwin/tree/components.hh
+++ b/milena/sandbox/edwin/mln/morpho/tree/components.hh
@@ -227,7 +227,7 @@ namespace mln {
unsigned* nb_leaves = uses_leaves ? new unsigned(0) : 0;
initialize(activity, a);
- data::fill(activity, true);
+ mln::data::fill(activity, true);
internal::sort(max_arr, a);
do
diff --git a/milena/sandbox/edwin/mln/morpho/tree/filter.hh b/milena/sandbox/edwin/mln/morpho/tree/filter.hh
new file mode 100644
index 0000000..26e4f9a
--- /dev/null
+++ b/milena/sandbox/edwin/mln/morpho/tree/filter.hh
@@ -0,0 +1,205 @@
+// Copyright (C) 2009 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_MORPHO_TREE_FILTER_HH_
+# define MLN_MORPHO_TREE_FILTER_HH_
+
+/**
+** @file mln/morpho/tree/filter.hh
+**
+** @brief Methods to handle component tree filtering strategies with
+** non-increasing attribute. Nevertheless, it works on increasing
+** predicate as well. In this case, all strategies have the same
+** result but min filter or direct filter should be used in term
+** of performance. If a predicate test is not enough fast, then
+** prefer the min filter that minimizes call to predicate.
+*/
+
+# include <mln/core/concept/function.hh>
+# include <mln/morpho/tree/data.hh>
+# include <mln/morpho/tree/propagate_if.hh>
+
+namespace mln {
+ namespace morpho {
+ namespace tree {
+ namespace filter {
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ min(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ max(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ direct(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ subtractive(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_);
+
+
+# ifndef MLN_INCLUDE_ONLY
+ namespace internal
+ {
+
+ template <typename P2B>
+ struct not_pred_ : Function_p2b< not_pred_<P2B> >
+ {
+ not_pred_(const Function_p2b<P2B>& f) :
+ f_ (exact(f))
+ {
+ }
+
+ template <typename P>
+ bool operator() (const P& p) const
+ {
+ return !(f_(p));
+ }
+
+ private:
+ const P2B& f_;
+ };
+
+ template <typename P2B>
+ inline
+ not_pred_<P2B>
+ not_pred(const Function_p2b<P2B>& f)
+ {
+ return not_pred_<P2B>(f);
+ }
+
+ }
+
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ min(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+ mln_ch_value(F, bool) mark;
+ initialize(mark, f);
+ mln::data::fill(mark, false);
+
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(tree.parent(n)) || !pred(n))
+ {
+ f(n) = f(tree.parent(n));
+ mark(n) = true;
+ }
+ //FIXME postcondition
+ }
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ max(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+ mln_ch_value(F, bool) mark;
+ initialize(mark, f);
+ mln::data::fill(mark, true);
+
+ {
+ mln_up_node_piter(T) n(tree);
+ for_all(n)
+ if (!mark(n))
+ mark(tree.parent(n)) = false;
+ else if (pred(n))
+ {
+ mark(tree.parent(n)) = false;
+ mark(n) = false;
+ }
+ }
+
+ {
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (mark(n))
+ f(n) = f(tree.parent(n));
+ }
+ }
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ direct(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+ mln_dn_node_piter(T) n(tree);
+ for_all(n)
+ if (!pred(n))
+ f(n) = f(tree.parent(n));
+ //FIXME postcondition
+ }
+
+ template <typename T, typename F, typename P2B>
+ inline
+ void
+ subtractive(const T& tree, Image<F>& f_, const Function_p2b<P2B>& pred_)
+ {
+ F& f = exact(f_);
+ const P2B& pred = exact(pred_);
+
+ //FIXME precondition
+
+ morpho::tree::propagate_if(tree, f, morpho::tree::desc_propagation (), internal::not_pred(pred));
+
+ mln_up_node_piter(T) n(tree);
+ for_all(n)
+ if (!pred(n))
+ f(n) = f(tree.parent(n));
+ //FIXME postcondition
+ }
+
+# endif /* !MLN_INCLUDE_ONLY */
+
+ } // end of namespace mln::morpho::tree::filter
+ } // end of namespace mln::morpho::tree
+ } // end of namespace mln::morpho
+} // end of namespace mln
+
+
+#endif /* !MLN_MORPHO_TREE_FILTER_HH_ */
diff --git a/milena/sandbox/edwin/tree/propagate.hh b/milena/sandbox/edwin/mln/morpho/tree/propagate.hh
similarity index 92%
rename from milena/sandbox/edwin/tree/propagate.hh
rename to milena/sandbox/edwin/mln/morpho/tree/propagate.hh
index d25f811..58a0e8f 100644
--- a/milena/sandbox/edwin/tree/propagate.hh
+++ b/milena/sandbox/edwin/mln/morpho/tree/propagate.hh
@@ -33,7 +33,7 @@
/// Functions to propagate a node value in the tree.
# include <mln/morpho/tree/data.hh>
-# include "propagate_node.hh"
+# include <mln/morpho/tree/propagate_node.hh>
namespace mln {
namespace morpho {
@@ -41,10 +41,10 @@ namespace mln {
/// Propagate the representative point's value to
- /// non-representative points of the same node.
+ /// non-representative node points.
template <typename T, typename A>
void
- propagate_representant(const T& t, Image<A>& a_)
+ propagate_representative(const T& t, Image<A>& a_)
{
A a = exact(a_);
mln_up_site_piter(T) p(t);
@@ -80,7 +80,7 @@ namespace mln {
const A& a = exact(attr_image);
A out;
initialize(out, a);
- data::fill(out, null);
+ mln::data::fill(out, null);
mln_piter(p_array<mln_psite(A)>) p(component_list);
for_all(p)
@@ -88,7 +88,7 @@ namespace mln {
out(p) = a(p);
morpho::tree::propagate_node_to_descendants(p, tree, out, a(p));
}
- morpho::tree::propagate_representant(tree, out);
+ morpho::tree::propagate_representative(tree, out);
return out;
}
@@ -103,7 +103,7 @@ namespace mln {
{
mln_ch_value(typename T::function, V) out;
initialize(out, tree.f());
- data::fill(out, null);
+ mln::data::fill(out, null);
mln_piter(p_array< mln_psite(T) >) p(component_list);
for_all(p)
@@ -111,7 +111,7 @@ namespace mln {
out(p) = value;
morpho::tree::propagate_node_to_descendants(p, tree, out);
}
- morpho::tree::propagate_representant(tree, out);
+ morpho::tree::propagate_representative(tree, out);
return out;
}
diff --git a/milena/sandbox/edwin/tree/propagate_if.hh b/milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh
similarity index 99%
rename from milena/sandbox/edwin/tree/propagate_if.hh
rename to milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh
index d8c1b03..c310857 100644
--- a/milena/sandbox/edwin/tree/propagate_if.hh
+++ b/milena/sandbox/edwin/mln/morpho/tree/propagate_if.hh
@@ -38,7 +38,7 @@
*/
# include <mln/morpho/tree/data.hh>
-# include "propagate_node.hh"
+# include <mln/morpho/tree/propagate_node.hh>
# include <mln/data/fill.hh>
# include <mln/pw/all.hh>
diff --git a/milena/sandbox/edwin/tree/propagate_node.hh b/milena/sandbox/edwin/mln/morpho/tree/propagate_node.hh
similarity index 100%
rename from milena/sandbox/edwin/tree/propagate_node.hh
rename to milena/sandbox/edwin/mln/morpho/tree/propagate_node.hh
diff --git a/milena/sandbox/edwin/rush/exo2/test.cc b/milena/sandbox/edwin/rush/exo2/test.cc
index eeca8bf..40a0f66 100755
--- a/milena/sandbox/edwin/rush/exo2/test.cc
+++ b/milena/sandbox/edwin/rush/exo2/test.cc
@@ -18,6 +18,7 @@
#include <mln/fun/p2v/ternary.hh>
#include <mln/pw/all.hh>
+
namespace mln
{
// Sharpness Attribute -> Height Attribute
--
1.6.1.2
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena/sandbox
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
* scribo/debug/save_label_image.hh,
* scribo/src/extract_text_single_link.cc,
* scribo/src/extract_text_graph.cc,
* scribo/src/morpho.cc,
* scribo/src/table_rebuild_rank.cc,
* scribo/src/extract_text_several_left_links.cc,
* scribo/src/table_rebuild_opening.cc,
* scribo/src/extract_text_several_graph.cc,
* scribo/src/dmap.cc,
* scribo/src/table_extract.cc,
* scribo/src/extract_text_double_link.cc,
* scribo/src/extract_text_double_several_links.cc,
* scribo/src/photo_basic.cc,
* scribo/table/internal/repair_lines.hh,
* scribo/demat.hh,
* icdar/2009/dibco/quasi.cc,
* icdar/2009/dibco/svg.1.binarization.cc,
* icdar/2009/dibco/svg.2.binarization.cc,
* icdar/2009/dibco/svg.3.binarization.cc,
* icdar/2009/dibco/binarization.cc,
* icdar/2009/hsc/icdar2ppm.hh,
* icdar/2009/hsc/input_to_words_dat.cc,
* icdar/2009/hsc/dummy_input_to_words_dat.cc,
* icdar/2009/hsc/input_to_lines_dat.cc,
* icdar/2009/hsc/input_to_ws.hh,
* icdar/2009/hsc/first_attempts/boxes.cc,
* icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
* icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
* icdar/2009/hsc/first_attempts/main.cc,
* icdar/2009/hsc/input_to_wsl.cc,
* icdar/2009/hsc/old_input_to_lines.cc,
* icdar/2009/hsc/ws_to_wsl.hh,
* fabien/igr/seg_fixed.cc,
* fabien/igr/graph.cc,
* fabien/igr/nbasins_finder.cc,
* fabien/bin/dumpl32_to_colorize.cc,
* inim/2010/boxes/boxes.cc,
* theo/color/filter_blen_rgb_edges.cc,
* lazzara/igr/igr-biggest-comp.cc,
* lazzara/igr/igr.cc,
* lazzara/igr/igr-cloud.cc,
* edwin/inim/inim.cc:
Fix missing updates about debug colorize.
edwin/inim/inim.cc | 4 ++--
fabien/bin/dumpl32_to_colorize.cc | 6 +++---
fabien/igr/graph.cc | 6 +++---
fabien/igr/nbasins_finder.cc | 4 ++--
fabien/igr/seg_fixed.cc | 4 ++--
icdar/2009/dibco/binarization.cc | 8 ++++----
icdar/2009/dibco/quasi.cc | 2 +-
icdar/2009/dibco/svg.1.binarization.cc | 4 ++--
icdar/2009/dibco/svg.2.binarization.cc | 8 ++++----
icdar/2009/dibco/svg.3.binarization.cc | 8 ++++----
icdar/2009/hsc/dummy_input_to_words_dat.cc | 4 ++--
icdar/2009/hsc/first_attempts/boxes.cc | 2 +-
icdar/2009/hsc/first_attempts/exec/iz_lines.cc | 4 ++--
icdar/2009/hsc/first_attempts/exec/relabel_lines.cc | 4 ++--
icdar/2009/hsc/first_attempts/main.cc | 6 +++---
icdar/2009/hsc/icdar2ppm.hh | 4 ++--
icdar/2009/hsc/input_to_lines_dat.cc | 4 ++--
icdar/2009/hsc/input_to_words_dat.cc | 4 ++--
icdar/2009/hsc/input_to_ws.hh | 4 ++--
icdar/2009/hsc/input_to_wsl.cc | 4 ++--
icdar/2009/hsc/old_input_to_lines.cc | 4 ++--
icdar/2009/hsc/ws_to_wsl.hh | 4 ++--
inim/2010/boxes/boxes.cc | 2 +-
lazzara/igr/igr-biggest-comp.cc | 2 +-
lazzara/igr/igr-cloud.cc | 2 +-
lazzara/igr/igr.cc | 2 +-
scribo/debug/save_label_image.hh | 2 +-
scribo/demat.hh | 8 ++++----
scribo/src/dmap.cc | 2 +-
scribo/src/extract_text_double_link.cc | 6 +++---
scribo/src/extract_text_double_several_links.cc | 4 ++--
scribo/src/extract_text_graph.cc | 4 ++--
scribo/src/extract_text_several_graph.cc | 2 +-
scribo/src/extract_text_several_left_links.cc | 2 +-
scribo/src/extract_text_single_link.cc | 8 ++++----
scribo/src/morpho.cc | 2 +-
scribo/src/photo_basic.cc | 4 ++--
scribo/src/table_extract.cc | 2 +-
scribo/src/table_rebuild_opening.cc | 2 +-
scribo/src/table_rebuild_rank.cc | 2 +-
scribo/table/internal/repair_lines.hh | 2 +-
theo/color/filter_blen_rgb_edges.cc | 6 +++---
42 files changed, 84 insertions(+), 84 deletions(-)
Index: scribo/debug/save_label_image.hh
--- scribo/debug/save_label_image.hh (revision 3777)
+++ scribo/debug/save_label_image.hh (working copy)
@@ -59,7 +59,7 @@
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(lbl).is_valid());
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels), filename);
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels), filename);
trace::exiting("scribo::debug::save_label_image");
}
Index: scribo/src/extract_text_single_link.cc
--- scribo/src/extract_text_single_link.cc (revision 3777)
+++ scribo/src/extract_text_single_link.cc (working copy)
@@ -71,7 +71,7 @@
text, left_link,
literal::red, literal::cyan,
scribo::make::debug_filename("left_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
@@ -99,7 +99,7 @@
text, right_link,
literal::red, literal::cyan,
scribo::make::debug_filename("right_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -107,7 +107,7 @@
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_single_link(text, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("right_label_color.ppm"));
Index: scribo/src/extract_text_graph.cc
--- scribo/src/extract_text_graph.cc (revision 3777)
+++ scribo/src/extract_text_graph.cc (working copy)
@@ -67,7 +67,7 @@
text, g,
literal::red, literal::cyan,
scribo::make::debug_filename("left_linked.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/morpho.cc
--- scribo/src/morpho.cc (revision 3777)
+++ scribo/src/morpho.cc (working copy)
@@ -28,7 +28,7 @@
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
image2d<unsigned>& dmap = res.first();
{
Index: scribo/src/table_rebuild_rank.cc
--- scribo/src/table_rebuild_rank.cc (revision 3777)
+++ scribo/src/table_rebuild_rank.cc (working copy)
@@ -73,7 +73,7 @@
std::cout << "ncells (including background) = " << ncells << std::endl;
- image2d<value::rgb8> table_color = mln::debug::colorize(value::rgb8(), tables, ncells);
+ image2d<value::rgb8> table_color = mln::labeling::colorize(value::rgb8(), tables, ncells);
value::label_8 bg = level::compute(accu::maj_h<value::label_8>(), tables);
Index: scribo/src/extract_text_several_left_links.cc
--- scribo/src/extract_text_several_left_links.cc (revision 3777)
+++ scribo/src/extract_text_several_left_links.cc (working copy)
@@ -75,7 +75,7 @@
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
Index: scribo/src/table_rebuild_opening.cc
--- scribo/src/table_rebuild_opening.cc (revision 3777)
+++ scribo/src/table_rebuild_opening.cc (working copy)
@@ -71,7 +71,7 @@
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
Index: scribo/src/extract_text_several_graph.cc
--- scribo/src/extract_text_several_graph.cc (revision 3777)
+++ scribo/src/extract_text_several_graph.cc (working copy)
@@ -76,7 +76,7 @@
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/dmap.cc
--- scribo/src/dmap.cc (revision 3777)
+++ scribo/src/dmap.cc (working copy)
@@ -21,6 +21,6 @@
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
}
Index: scribo/src/table_extract.cc
--- scribo/src/table_extract.cc (revision 3777)
+++ scribo/src/table_extract.cc (working copy)
@@ -60,7 +60,7 @@
image2d<value::label_16> tables = scribo::table::extract(input, ncells).first();
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::dump::save(tables, scribo::make::debug_filename("table_cells.dump"));
Index: scribo/src/extract_text_double_link.cc
--- scribo/src/extract_text_double_link.cc (revision 3777)
+++ scribo/src/extract_text_double_link.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -89,7 +89,7 @@
literal::green,
scribo::make::debug_filename("links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -98,7 +98,7 @@
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_double_link(text, left_link, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/extract_text_double_several_links.cc
--- scribo/src/extract_text_double_several_links.cc (revision 3777)
+++ scribo/src/extract_text_double_several_links.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/util/timer.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -110,7 +110,7 @@
std::cout << "Full process: " << t2 << std::endl;
std::cout << "Cleanup and grouping process: " << t3 << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
Index: scribo/src/photo_basic.cc
--- scribo/src/photo_basic.cc (revision 3777)
+++ scribo/src/photo_basic.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_single_left_link.hh>
@@ -101,7 +101,7 @@
literal::red,
scribo::make::debug_filename("test_graph_grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
scribo::make::debug_filename("grouped_text_comps.ppm"));
}
Index: scribo/table/internal/repair_lines.hh
--- scribo/table/internal/repair_lines.hh (revision 3777)
+++ scribo/table/internal/repair_lines.hh (working copy)
@@ -45,7 +45,7 @@
# include <mln/win/line.hh>
# include <mln/pw/all.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/value/rgb8.hh>
# include <mln/value/label_16.hh>
# include <scribo/make/debug_filename.hh>
Index: scribo/demat.hh
--- scribo/demat.hh (revision 3777)
+++ scribo/demat.hh (working copy)
@@ -182,7 +182,7 @@
void save_lbl_image(const image2d<V>& lbl, unsigned nlabels,
const char *filename)
{
- image2d<rgb8> output = debug::colorize(rgb8(), lbl, nlabels);
+ image2d<rgb8> output = labeling::colorize(rgb8(), lbl, nlabels);
io::ppm::save(output, output_file(filename));
}
@@ -1375,7 +1375,7 @@
std::cout << "map text to cells" << std::endl;
label_16 nlabels;
image2d<label_16> tblelbl = labeling::background(table, c8(), nlabels);
- image2d<rgb8> color = debug::colorize(rgb8(), tblelbl, nlabels);
+ image2d<rgb8> color = labeling::colorize(rgb8(), tblelbl, nlabels);
# ifndef NOUT
io::ppm::save(color, output_file("cells-labels.ppm"));
@@ -1395,7 +1395,7 @@
{
std::cout << "Merging aligned text boxes" << std::endl;
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels),
output_file("tboxes-lbl.ppm"));
typedef util::couple<image2d<unsigned>, image2d<label_16> > cpl_t;
@@ -1406,7 +1406,7 @@
#ifndef NOUT
io::pgm::save(level::transform(diz.first(), fun::l2l::wrap<label_8>()),
output_file("tboxes-dmap.pgm"));
- io::ppm::save(debug::colorize(rgb8(), diz.second(), nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), diz.second(), nlabels),
output_file("tboxes-iz.ppm"));
#endif
Index: icdar/2009/dibco/quasi.cc
--- icdar/2009/dibco/quasi.cc (revision 3777)
+++ icdar/2009/dibco/quasi.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/regional_minima.hh>
Index: icdar/2009/dibco/svg.1.binarization.cc
--- icdar/2009/dibco/svg.1.binarization.cc (revision 3777)
+++ icdar/2009/dibco/svg.1.binarization.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -335,7 +335,7 @@
label_16 nbasins;
image2d<label_16> wst = morpho::watershed::flooding(clo_vol, c4(), nbasins);
-// io::ppm::save(debug::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
+// io::ppm::save(labeling::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
util::couple<util::graph, image2d<label_16> >
Index: icdar/2009/dibco/svg.2.binarization.cc
--- icdar/2009/dibco/svg.2.binarization.cc (revision 3777)
+++ icdar/2009/dibco/svg.2.binarization.cc (working copy)
@@ -39,7 +39,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -554,7 +554,7 @@
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -580,7 +580,7 @@
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -607,7 +607,7 @@
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
Index: icdar/2009/dibco/svg.3.binarization.cc
--- icdar/2009/dibco/svg.3.binarization.cc (revision 3777)
+++ icdar/2009/dibco/svg.3.binarization.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -657,7 +657,7 @@
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -683,7 +683,7 @@
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -710,7 +710,7 @@
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
Index: icdar/2009/dibco/binarization.cc
--- icdar/2009/dibco/binarization.cc (revision 3777)
+++ icdar/2009/dibco/binarization.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -636,7 +636,7 @@
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -662,7 +662,7 @@
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -689,7 +689,7 @@
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
Index: icdar/2009/hsc/icdar2ppm.hh
--- icdar/2009/hsc/icdar2ppm.hh (revision 3777)
+++ icdar/2009/hsc/icdar2ppm.hh (working copy)
@@ -6,7 +6,7 @@
# include <mln/value/rgb8.hh>
# include <mln/level/compute.hh>
# include <mln/accu/count_labels.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/load.hh>
@@ -27,7 +27,7 @@
value::label_8 nlines = level::compute(accu::meta::count_labels(), ima);
- io::ppm::save(debug::colorize(value::rgb8(), ima, nlines), ppmfile);
+ io::ppm::save(labeling::colorize(value::rgb8(), ima, nlines), ppmfile);
}
}
Index: icdar/2009/hsc/input_to_words_dat.cc
--- icdar/2009/hsc/input_to_words_dat.cc (revision 3777)
+++ icdar/2009/hsc/input_to_words_dat.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/estim/min_max.hh>
#include <sandbox/icdar/2009/hsc/input_to_lines.hh>
@@ -101,7 +101,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
Index: icdar/2009/hsc/dummy_input_to_words_dat.cc
--- icdar/2009/hsc/dummy_input_to_words_dat.cc (revision 3777)
+++ icdar/2009/hsc/dummy_input_to_words_dat.cc (working copy)
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <sandbox/icdar/2009/hsc/clean_input.hh>
#include <sandbox/icdar/2009/hsc/line_to_words.hh>
@@ -49,7 +49,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
Index: icdar/2009/hsc/input_to_lines_dat.cc
--- icdar/2009/hsc/input_to_lines_dat.cc (revision 3777)
+++ icdar/2009/hsc/input_to_lines_dat.cc (working copy)
@@ -2,7 +2,7 @@
#include <sandbox/icdar/2009/hsc/io/icdar/save.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -43,7 +43,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_lines),
argv[3]);
Index: icdar/2009/hsc/input_to_ws.hh
--- icdar/2009/hsc/input_to_ws.hh (revision 3777)
+++ icdar/2009/hsc/input_to_ws.hh (working copy)
@@ -16,7 +16,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/level/convert.hh>
#include <mln/labeling/wrap.hh>
#include <mln/pw/all.hh>
@@ -92,7 +92,7 @@
}
{
// Watershed basins colorize the small image.
- image2d<value::rgb8> cool = debug::colorize(value::rgb8(), ws, n_lines);
+ image2d<value::rgb8> cool = labeling::colorize(value::rgb8(), ws, n_lines);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
Index: icdar/2009/hsc/first_attempts/boxes.cc
--- icdar/2009/hsc/first_attempts/boxes.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/boxes.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
Index: icdar/2009/hsc/first_attempts/exec/iz_lines.cc
--- icdar/2009/hsc/first_attempts/exec/iz_lines.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/exec/iz_lines.cc (working copy)
@@ -9,7 +9,7 @@
#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
-// #include <mln/debug/colorize.hh>
+// #include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
@@ -99,7 +99,7 @@
io::pgm::save(out, argv[3]);
-// io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+// io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
// argv[3]);
trace::exiting("main");
Index: icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
--- icdar/2009/hsc/first_attempts/exec/relabel_lines.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/exec/relabel_lines.cc (working copy)
@@ -13,7 +13,7 @@
#include <mln/accu/maj_h.hh>
#include <mln/morpho/elementary/dilation.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
#include <mln/level/transform.hh>
@@ -289,7 +289,7 @@
image2d<L> out = doit_cut(ws_txt, ws_spc);
- io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+ io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
argv[3]);
trace::exiting("main");
Index: icdar/2009/hsc/first_attempts/main.cc
--- icdar/2009/hsc/first_attempts/main.cc (revision 3777)
+++ icdar/2009/hsc/first_attempts/main.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -345,7 +345,7 @@
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
@@ -363,7 +363,7 @@
image2d<int_u8> output(input.domain());
image2d<rgb8>
- cool = debug::colorize(rgb8(), spc, n_basins),
+ cool = labeling::colorize(rgb8(), spc, n_basins),
lab(input.domain());
mln_piter_(box2d) p(input.domain());
Index: icdar/2009/hsc/input_to_wsl.cc
--- icdar/2009/hsc/input_to_wsl.cc (revision 3777)
+++ icdar/2009/hsc/input_to_wsl.cc (working copy)
@@ -5,7 +5,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -57,7 +57,7 @@
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
wsl,
n_lines),
argv[3]);
Index: icdar/2009/hsc/old_input_to_lines.cc
--- icdar/2009/hsc/old_input_to_lines.cc (revision 3777)
+++ icdar/2009/hsc/old_input_to_lines.cc (working copy)
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -348,7 +348,7 @@
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
Index: icdar/2009/hsc/ws_to_wsl.hh
--- icdar/2009/hsc/ws_to_wsl.hh (revision 3777)
+++ icdar/2009/hsc/ws_to_wsl.hh (working copy)
@@ -37,7 +37,7 @@
#include <mln/fun/i2v/array.hh>
#include <mln/level/transform.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -407,7 +407,7 @@
f_relab(l) = parent[l];
image2d<L> ws_ = level::transform(ws, f_relab);
- image2d<rgb8> cool = debug::colorize(rgb8(), ws_, n_basins);
+ image2d<rgb8> cool = labeling::colorize(rgb8(), ws_, n_basins);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
Index: fabien/igr/seg_fixed.cc
--- fabien/igr/seg_fixed.cc (revision 3777)
+++ fabien/igr/seg_fixed.cc (working copy)
@@ -43,7 +43,7 @@
#include <mln/world/inter_pixel/neighb2d.hh>
#include <mln/world/inter_pixel/is_pixel.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
@@ -284,7 +284,7 @@
mln_VAR(w, wst.unmorph_());
data::fill((w | (!world::inter_pixel::is_separator())).rw(), nbasins.next());
- io::ppm::save(debug::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
Index: fabien/igr/graph.cc
--- fabien/igr/graph.cc (revision 3777)
+++ fabien/igr/graph.cc (working copy)
@@ -55,7 +55,7 @@
#include <mln/extract/all.hh>
#include <mln/make/region_adjacency_graph.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -324,8 +324,8 @@
mln_VAR(mean, level::stretch(int_u8(), labeling::mean_values(dcm, wsd2, nbasins2)));
io::pgm::save(original, "wsd_original.pgm");
io::pgm::save(mean, "wsd_mean_colors.pgm");
- io::ppm::save(debug::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
- io::ppm::save(debug::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
}
else
{
Index: fabien/igr/nbasins_finder.cc
--- fabien/igr/nbasins_finder.cc (revision 3777)
+++ fabien/igr/nbasins_finder.cc (working copy)
@@ -27,7 +27,7 @@
#include <mln/fun/l2l/wrap.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -74,7 +74,7 @@
std::cout << " nbasins = " << nbasins << std::endl;
//io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "result_nbasins.dump");
//io::dump::save(level::stretch(int_u8(), wshed), "result_nbasins.dump");
- io::dump::save(debug::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
+ io::dump::save(labeling::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
return 0;
}
Index: fabien/bin/dumpl32_to_colorize.cc
--- fabien/bin/dumpl32_to_colorize.cc (revision 3777)
+++ fabien/bin/dumpl32_to_colorize.cc (working copy)
@@ -1,7 +1,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/make/image3d.hh>
#include <mln/debug/slices_2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u12.hh>
@@ -44,14 +44,14 @@
{
image2d<label_32> ima2d;
io::dump::load(ima2d, argv[1]);
- image2d<rgb8> ima_rgb = debug::colorize(rgb8(), ima2d, nbasins);
+ image2d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima2d, nbasins);
io::ppm::save(ima_rgb, argv[4]);
}
else
{
image3d<label_32> ima3d;
io::dump::load(ima3d, argv[1]);
- image3d<rgb8> ima_rgb = debug::colorize(rgb8(), ima3d, nbasins);
+ image3d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima3d, nbasins);
image2d<rgb8> ima_result = debug::slices_2d(ima_rgb, 1.f, literal::black);
io::ppm::save(ima_result, argv[4]);
Index: inim/2010/boxes/boxes.cc
--- inim/2010/boxes/boxes.cc (revision 3777)
+++ inim/2010/boxes/boxes.cc (working copy)
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
Index: theo/color/filter_blen_rgb_edges.cc
--- theo/color/filter_blen_rgb_edges.cc (revision 3777)
+++ theo/color/filter_blen_rgb_edges.cc (working copy)
@@ -18,7 +18,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/morpho/dilation.hh>
#include <mln/morpho/erosion.hh>
@@ -333,7 +333,7 @@
w_all);
- io::ppm::save(debug::colorize(rgb8(),
+ io::ppm::save(labeling::colorize(rgb8(),
w_all,
nbasins),
"temp_w_all.ppm");
@@ -344,7 +344,7 @@
image2d<L> out_w = full2image(w_all);
-// io::ppm::save(debug::colorize(rgb8(),
+// io::ppm::save(labeling::colorize(rgb8(),
// out_w,
// nbasins),
// argv[4]);
Index: lazzara/igr/igr-biggest-comp.cc
--- lazzara/igr/igr-biggest-comp.cc (revision 3777)
+++ lazzara/igr/igr-biggest-comp.cc (working copy)
@@ -5,7 +5,7 @@
#include <mln/labeling/flat_zones.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/essential/3d.hh>
Index: lazzara/igr/igr.cc
--- lazzara/igr/igr.cc (revision 3777)
+++ lazzara/igr/igr.cc (working copy)
@@ -4,7 +4,7 @@
#include <mln/binarization/binarization.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
//#include <mln/registration/registration.hh>
//#include <mln/registration/multiscale.hh>
Index: lazzara/igr/igr-cloud.cc
--- lazzara/igr/igr-cloud.cc (revision 3777)
+++ lazzara/igr/igr-cloud.cc (working copy)
@@ -20,7 +20,7 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/literal/black.hh>
# include <mln/literal/white.hh>
Index: edwin/inim/inim.cc
--- edwin/inim/inim.cc (revision 3777)
+++ edwin/inim/inim.cc (working copy)
@@ -43,7 +43,7 @@
#include <mln/level/stretch.hh>
#include <mln/value/label_8.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
/* Draw debug */
#include <mln/draw/box.hh>
@@ -241,7 +241,7 @@
typedef mln_ch_value_(I, value::rgb<8>) O;
value::label_8 nlabel;
L label = labeling::blobs(mask, c4(), nlabel);
- O output = debug::colorize(value::rgb8(), label, nlabel);
+ O output = labeling::colorize(value::rgb8(), label, nlabel);
io::ppm::save(output, "label.pgm");
/* Now store output image image */
1
0
* scribo/debug/save_label_image.hh,
* scribo/src/extract_text_single_link.cc,
* scribo/src/extract_text_graph.cc,
* scribo/src/morpho.cc,
* scribo/src/table_rebuild_rank.cc,
* scribo/src/extract_text_several_left_links.cc,
* scribo/src/table_rebuild_opening.cc,
* scribo/src/extract_text_several_graph.cc,
* scribo/src/dmap.cc,
* scribo/src/table_extract.cc,
* scribo/src/extract_text_double_link.cc,
* scribo/src/extract_text_double_several_links.cc,
* scribo/src/photo_basic.cc,
* scribo/table/internal/repair_lines.hh,
* scribo/demat.hh,
* icdar/2009/dibco/quasi.cc,
* icdar/2009/dibco/svg.1.binarization.cc,
* icdar/2009/dibco/svg.2.binarization.cc,
* icdar/2009/dibco/svg.3.binarization.cc,
* icdar/2009/dibco/binarization.cc,
* icdar/2009/hsc/icdar2ppm.hh,
* icdar/2009/hsc/input_to_words_dat.cc,
* icdar/2009/hsc/dummy_input_to_words_dat.cc,
* icdar/2009/hsc/input_to_lines_dat.cc,
* icdar/2009/hsc/input_to_ws.hh,
* icdar/2009/hsc/first_attempts/boxes.cc,
* icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
* icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
* icdar/2009/hsc/first_attempts/main.cc,
* icdar/2009/hsc/input_to_wsl.cc,
* icdar/2009/hsc/old_input_to_lines.cc,
* icdar/2009/hsc/ws_to_wsl.hh,
* fabien/igr/seg_fixed.cc,
* fabien/igr/graph.cc,
* fabien/igr/nbasins_finder.cc,
* fabien/bin/dumpl32_to_colorize.cc,
* inim/2010/boxes/boxes.cc,
* theo/color/filter_blen_rgb_edges.cc,
* lazzara/igr/igr-biggest-comp.cc,
* lazzara/igr/igr.cc,
* lazzara/igr/igr-cloud.cc,
* edwin/inim/inim.cc:
Fix missing updates about debug colorize.
---
milena/sandbox/ChangeLog | 48 ++++++++++++++++++++
milena/sandbox/edwin/inim/inim.cc | 4 +-
milena/sandbox/fabien/bin/dumpl32_to_colorize.cc | 6 +-
milena/sandbox/fabien/igr/graph.cc | 6 +-
milena/sandbox/fabien/igr/nbasins_finder.cc | 4 +-
milena/sandbox/fabien/igr/seg_fixed.cc | 4 +-
milena/sandbox/icdar/2009/dibco/binarization.cc | 8 ++--
milena/sandbox/icdar/2009/dibco/quasi.cc | 2 +-
.../sandbox/icdar/2009/dibco/svg.1.binarization.cc | 4 +-
.../sandbox/icdar/2009/dibco/svg.2.binarization.cc | 8 ++--
.../sandbox/icdar/2009/dibco/svg.3.binarization.cc | 8 ++--
.../icdar/2009/hsc/dummy_input_to_words_dat.cc | 4 +-
.../sandbox/icdar/2009/hsc/first_attempts/boxes.cc | 2 +-
.../icdar/2009/hsc/first_attempts/exec/iz_lines.cc | 4 +-
.../2009/hsc/first_attempts/exec/relabel_lines.cc | 4 +-
.../sandbox/icdar/2009/hsc/first_attempts/main.cc | 6 +-
milena/sandbox/icdar/2009/hsc/icdar2ppm.hh | 4 +-
.../sandbox/icdar/2009/hsc/input_to_lines_dat.cc | 4 +-
.../sandbox/icdar/2009/hsc/input_to_words_dat.cc | 4 +-
milena/sandbox/icdar/2009/hsc/input_to_ws.hh | 4 +-
milena/sandbox/icdar/2009/hsc/input_to_wsl.cc | 4 +-
.../sandbox/icdar/2009/hsc/old_input_to_lines.cc | 4 +-
milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh | 4 +-
milena/sandbox/inim/2010/boxes/boxes.cc | 2 +-
milena/sandbox/lazzara/igr/igr-biggest-comp.cc | 2 +-
milena/sandbox/lazzara/igr/igr-cloud.cc | 2 +-
milena/sandbox/lazzara/igr/igr.cc | 2 +-
milena/sandbox/scribo/debug/save_label_image.hh | 2 +-
milena/sandbox/scribo/demat.hh | 8 ++--
milena/sandbox/scribo/src/dmap.cc | 2 +-
.../sandbox/scribo/src/extract_text_double_link.cc | 6 +-
.../src/extract_text_double_several_links.cc | 4 +-
milena/sandbox/scribo/src/extract_text_graph.cc | 4 +-
.../scribo/src/extract_text_several_graph.cc | 2 +-
.../scribo/src/extract_text_several_left_links.cc | 2 +-
.../sandbox/scribo/src/extract_text_single_link.cc | 8 ++--
milena/sandbox/scribo/src/morpho.cc | 2 +-
milena/sandbox/scribo/src/photo_basic.cc | 4 +-
milena/sandbox/scribo/src/table_extract.cc | 2 +-
milena/sandbox/scribo/src/table_rebuild_opening.cc | 2 +-
milena/sandbox/scribo/src/table_rebuild_rank.cc | 2 +-
.../sandbox/scribo/table/internal/repair_lines.hh | 2 +-
milena/sandbox/theo/color/filter_blen_rgb_edges.cc | 6 +-
43 files changed, 132 insertions(+), 84 deletions(-)
diff --git a/milena/sandbox/ChangeLog b/milena/sandbox/ChangeLog
index d86c05e..be85cde 100644
--- a/milena/sandbox/ChangeLog
+++ b/milena/sandbox/ChangeLog
@@ -1,3 +1,51 @@
+2009-05-07 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
+
+ Fix missing updates about debug colorize.
+
+ * scribo/debug/save_label_image.hh,
+ * scribo/src/extract_text_single_link.cc,
+ * scribo/src/extract_text_graph.cc,
+ * scribo/src/morpho.cc,
+ * scribo/src/table_rebuild_rank.cc,
+ * scribo/src/extract_text_several_left_links.cc,
+ * scribo/src/table_rebuild_opening.cc,
+ * scribo/src/extract_text_several_graph.cc,
+ * scribo/src/dmap.cc,
+ * scribo/src/table_extract.cc,
+ * scribo/src/extract_text_double_link.cc,
+ * scribo/src/extract_text_double_several_links.cc,
+ * scribo/src/photo_basic.cc,
+ * scribo/table/internal/repair_lines.hh,
+ * scribo/demat.hh,
+ * icdar/2009/dibco/quasi.cc,
+ * icdar/2009/dibco/svg.1.binarization.cc,
+ * icdar/2009/dibco/svg.2.binarization.cc,
+ * icdar/2009/dibco/svg.3.binarization.cc,
+ * icdar/2009/dibco/binarization.cc,
+ * icdar/2009/hsc/icdar2ppm.hh,
+ * icdar/2009/hsc/input_to_words_dat.cc,
+ * icdar/2009/hsc/dummy_input_to_words_dat.cc,
+ * icdar/2009/hsc/input_to_lines_dat.cc,
+ * icdar/2009/hsc/input_to_ws.hh,
+ * icdar/2009/hsc/first_attempts/boxes.cc,
+ * icdar/2009/hsc/first_attempts/exec/iz_lines.cc,
+ * icdar/2009/hsc/first_attempts/exec/relabel_lines.cc,
+ * icdar/2009/hsc/first_attempts/main.cc,
+ * icdar/2009/hsc/input_to_wsl.cc,
+ * icdar/2009/hsc/old_input_to_lines.cc,
+ * icdar/2009/hsc/ws_to_wsl.hh,
+ * fabien/igr/seg_fixed.cc,
+ * fabien/igr/graph.cc,
+ * fabien/igr/nbasins_finder.cc,
+ * fabien/bin/dumpl32_to_colorize.cc,
+ * inim/2010/boxes/boxes.cc,
+ * theo/color/filter_blen_rgb_edges.cc,
+ * lazzara/igr/igr-biggest-comp.cc,
+ * lazzara/igr/igr.cc,
+ * lazzara/igr/igr-cloud.cc,
+ * edwin/inim/inim.cc:
+ Fix missing updates about debug colorize.
+
2009-05-07 Fabien Freling <fabien.freling(a)lrde.epita.fr>
Fixed watershed, now works on edges.
diff --git a/milena/sandbox/edwin/inim/inim.cc b/milena/sandbox/edwin/inim/inim.cc
index 9c6f38e..5dca4bd 100644
--- a/milena/sandbox/edwin/inim/inim.cc
+++ b/milena/sandbox/edwin/inim/inim.cc
@@ -43,7 +43,7 @@
#include <mln/level/stretch.hh>
#include <mln/value/label_8.hh>
#include <mln/labeling/blobs.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
/* Draw debug */
#include <mln/draw/box.hh>
@@ -241,7 +241,7 @@ int main(int argc, char* argv[])
typedef mln_ch_value_(I, value::rgb<8>) O;
value::label_8 nlabel;
L label = labeling::blobs(mask, c4(), nlabel);
- O output = debug::colorize(value::rgb8(), label, nlabel);
+ O output = labeling::colorize(value::rgb8(), label, nlabel);
io::ppm::save(output, "label.pgm");
/* Now store output image image */
diff --git a/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc b/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc
index 7f42c29..dba50ec 100644
--- a/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc
+++ b/milena/sandbox/fabien/bin/dumpl32_to_colorize.cc
@@ -1,7 +1,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/make/image3d.hh>
#include <mln/debug/slices_2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/value/int_u8.hh>
#include <mln/value/int_u12.hh>
@@ -44,14 +44,14 @@ int main(int argc, char* argv[])
{
image2d<label_32> ima2d;
io::dump::load(ima2d, argv[1]);
- image2d<rgb8> ima_rgb = debug::colorize(rgb8(), ima2d, nbasins);
+ image2d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima2d, nbasins);
io::ppm::save(ima_rgb, argv[4]);
}
else
{
image3d<label_32> ima3d;
io::dump::load(ima3d, argv[1]);
- image3d<rgb8> ima_rgb = debug::colorize(rgb8(), ima3d, nbasins);
+ image3d<rgb8> ima_rgb = labeling::colorize(rgb8(), ima3d, nbasins);
image2d<rgb8> ima_result = debug::slices_2d(ima_rgb, 1.f, literal::black);
io::ppm::save(ima_result, argv[4]);
diff --git a/milena/sandbox/fabien/igr/graph.cc b/milena/sandbox/fabien/igr/graph.cc
index bfed8e7..7402f23 100644
--- a/milena/sandbox/fabien/igr/graph.cc
+++ b/milena/sandbox/fabien/igr/graph.cc
@@ -55,7 +55,7 @@
#include <mln/extract/all.hh>
#include <mln/make/region_adjacency_graph.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -324,8 +324,8 @@ int main(int argc, char *argv[])
mln_VAR(mean, level::stretch(int_u8(), labeling::mean_values(dcm, wsd2, nbasins2)));
io::pgm::save(original, "wsd_original.pgm");
io::pgm::save(mean, "wsd_mean_colors.pgm");
- io::ppm::save(debug::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
- io::ppm::save(debug::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wshed, nbasins), "wsd_colorize_01.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), wsd2, nbasins2), "wsd_colorize_02.ppm");
}
else
{
diff --git a/milena/sandbox/fabien/igr/nbasins_finder.cc b/milena/sandbox/fabien/igr/nbasins_finder.cc
index cbb3caf..aecfbfa 100644
--- a/milena/sandbox/fabien/igr/nbasins_finder.cc
+++ b/milena/sandbox/fabien/igr/nbasins_finder.cc
@@ -27,7 +27,7 @@
#include <mln/fun/l2l/wrap.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -74,7 +74,7 @@ int main(int argc, char *argv[])
std::cout << " nbasins = " << nbasins << std::endl;
//io::dump::save(level::transform(wshed, fun::l2l::wrap<int_u8>()), "result_nbasins.dump");
//io::dump::save(level::stretch(int_u8(), wshed), "result_nbasins.dump");
- io::dump::save(debug::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
+ io::dump::save(labeling::colorize(rgb8(), wshed, nbasins), "result_nbasins.dump");
return 0;
}
diff --git a/milena/sandbox/fabien/igr/seg_fixed.cc b/milena/sandbox/fabien/igr/seg_fixed.cc
index d0b759f..2f2acbe 100644
--- a/milena/sandbox/fabien/igr/seg_fixed.cc
+++ b/milena/sandbox/fabien/igr/seg_fixed.cc
@@ -43,7 +43,7 @@
#include <mln/world/inter_pixel/neighb2d.hh>
#include <mln/world/inter_pixel/is_pixel.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
@@ -284,7 +284,7 @@ int main(int argc, char* argv[])
mln_VAR(w, wst.unmorph_());
data::fill((w | (!world::inter_pixel::is_separator())).rw(), nbasins.next());
- io::ppm::save(debug::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), w, nbasins.next()), "result.ppm");
diff --git a/milena/sandbox/icdar/2009/dibco/binarization.cc b/milena/sandbox/icdar/2009/dibco/binarization.cc
index 14f4495..786df7a 100644
--- a/milena/sandbox/icdar/2009/dibco/binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/binarization.cc
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -636,7 +636,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -662,7 +662,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -689,7 +689,7 @@ int main(int argc, char *argv[])
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
diff --git a/milena/sandbox/icdar/2009/dibco/quasi.cc b/milena/sandbox/icdar/2009/dibco/quasi.cc
index 08baf05..6ad69fc 100644
--- a/milena/sandbox/icdar/2009/dibco/quasi.cc
+++ b/milena/sandbox/icdar/2009/dibco/quasi.cc
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/regional_minima.hh>
diff --git a/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc b/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc
index 119c64b..f6824ea 100644
--- a/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/svg.1.binarization.cc
@@ -33,7 +33,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -335,7 +335,7 @@ int main(int argc, char *argv[])
label_16 nbasins;
image2d<label_16> wst = morpho::watershed::flooding(clo_vol, c4(), nbasins);
-// io::ppm::save(debug::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
+// io::ppm::save(labeling::colorize(rgb8(), wst, nbasins), "binarization_wst.ppm");
util::couple<util::graph, image2d<label_16> >
diff --git a/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc b/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc
index 20a0505..daebc17 100644
--- a/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/svg.2.binarization.cc
@@ -39,7 +39,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -554,7 +554,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -580,7 +580,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -607,7 +607,7 @@ int main(int argc, char *argv[])
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
diff --git a/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc b/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc
index 86214c6..1fa40d7 100644
--- a/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc
+++ b/milena/sandbox/icdar/2009/dibco/svg.3.binarization.cc
@@ -41,7 +41,7 @@
#include <mln/make/rag_and_labeled_wsl.hh>
#include <mln/util/graph.hh>
#include <mln/util/couple.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/fun/i2v/array.hh>
#include <mln/labeling/compute.hh>
@@ -657,7 +657,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(display_edge(debug::colorize(rgb8(),
+ io::ppm::save(display_edge(labeling::colorize(rgb8(),
wst,
nbasins).unmorph_(),
literal::black,
@@ -683,7 +683,7 @@ int main(int argc, char *argv[])
if (echo)
{
- io::ppm::save(debug::colorize(rgb8(), ws, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), ws, nbasins),
"temp_ws.ppm");
}
@@ -710,7 +710,7 @@ int main(int argc, char *argv[])
if (echo)
- io::ppm::save(debug::colorize(rgb8(), w_all, nbasins),
+ io::ppm::save(labeling::colorize(rgb8(), w_all, nbasins),
"temp_w_all.ppm");
diff --git a/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc b/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc
index 23bad06..353fb00 100644
--- a/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc
+++ b/milena/sandbox/icdar/2009/hsc/dummy_input_to_words_dat.cc
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <sandbox/icdar/2009/hsc/clean_input.hh>
#include <sandbox/icdar/2009/hsc/line_to_words.hh>
@@ -49,7 +49,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc
index 9742c1f..18792ea 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/boxes.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc
index 471657d..7df51ef 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/iz_lines.cc
@@ -9,7 +9,7 @@
#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
-// #include <mln/debug/colorize.hh>
+// #include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
io::pgm::save(out, argv[3]);
-// io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+// io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
// argv[3]);
trace::exiting("main");
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
index f7c9008..6f86fbe 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/exec/relabel_lines.cc
@@ -13,7 +13,7 @@
#include <mln/accu/maj_h.hh>
#include <mln/morpho/elementary/dilation.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/transform/influence_zone_geodesic.hh>
#include <mln/level/transform.hh>
@@ -289,7 +289,7 @@ int main(int argc, char* argv[])
image2d<L> out = doit_cut(ws_txt, ws_spc);
- io::ppm::save(debug::colorize(value::rgb8(), out, 254),
+ io::ppm::save(labeling::colorize(value::rgb8(), out, 254),
argv[3]);
trace::exiting("main");
diff --git a/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc b/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc
index 84892ea..8c4b331 100644
--- a/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc
+++ b/milena/sandbox/icdar/2009/hsc/first_attempts/main.cc
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -345,7 +345,7 @@ int main(int argc, char* argv[])
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
@@ -363,7 +363,7 @@ int main(int argc, char* argv[])
image2d<int_u8> output(input.domain());
image2d<rgb8>
- cool = debug::colorize(rgb8(), spc, n_basins),
+ cool = labeling::colorize(rgb8(), spc, n_basins),
lab(input.domain());
mln_piter_(box2d) p(input.domain());
diff --git a/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh b/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh
index eca8c84..31913f7 100644
--- a/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh
+++ b/milena/sandbox/icdar/2009/hsc/icdar2ppm.hh
@@ -6,7 +6,7 @@
# include <mln/value/rgb8.hh>
# include <mln/level/compute.hh>
# include <mln/accu/count_labels.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/load.hh>
@@ -27,7 +27,7 @@ namespace mln
value::label_8 nlines = level::compute(accu::meta::count_labels(), ima);
- io::ppm::save(debug::colorize(value::rgb8(), ima, nlines), ppmfile);
+ io::ppm::save(labeling::colorize(value::rgb8(), ima, nlines), ppmfile);
}
}
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc b/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc
index 7dd3021..ba7f668 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc
+++ b/milena/sandbox/icdar/2009/hsc/input_to_lines_dat.cc
@@ -2,7 +2,7 @@
#include <sandbox/icdar/2009/hsc/io/icdar/save.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -43,7 +43,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_lines),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc b/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc
index ac989f3..e6b01ca 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc
+++ b/milena/sandbox/icdar/2009/hsc/input_to_words_dat.cc
@@ -3,7 +3,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/estim/min_max.hh>
#include <sandbox/icdar/2009/hsc/input_to_lines.hh>
@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
output,
n_words),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_ws.hh b/milena/sandbox/icdar/2009/hsc/input_to_ws.hh
index e2289f6..a1ea537 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_ws.hh
+++ b/milena/sandbox/icdar/2009/hsc/input_to_ws.hh
@@ -16,7 +16,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/io/ppm/save.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/level/convert.hh>
#include <mln/labeling/wrap.hh>
#include <mln/pw/all.hh>
@@ -92,7 +92,7 @@ namespace mln
}
{
// Watershed basins colorize the small image.
- image2d<value::rgb8> cool = debug::colorize(value::rgb8(), ws, n_lines);
+ image2d<value::rgb8> cool = labeling::colorize(value::rgb8(), ws, n_lines);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
diff --git a/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc b/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc
index b3a71d0..819f353 100644
--- a/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc
+++ b/milena/sandbox/icdar/2009/hsc/input_to_wsl.cc
@@ -5,7 +5,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pgm/save.hh>
@@ -57,7 +57,7 @@ int main(int argc, char* argv[])
if (argc == 4)
{
- io::ppm::save(debug::colorize(value::rgb8(),
+ io::ppm::save(labeling::colorize(value::rgb8(),
wsl,
n_lines),
argv[3]);
diff --git a/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc b/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc
index e56e166..212b077 100644
--- a/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc
+++ b/milena/sandbox/icdar/2009/hsc/old_input_to_lines.cc
@@ -14,7 +14,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
#include <mln/literal/colors.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
@@ -348,7 +348,7 @@ int main(int argc, char* argv[])
# ifdef LOG
{
- io::ppm::save(debug::colorize(rgb8(), spc, n_basins),
+ io::ppm::save(labeling::colorize(rgb8(), spc, n_basins),
"tmp_spc.ppm");
io::pgm::save(ws, "tmp_ws.pgm");
diff --git a/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh b/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh
index 200461d..1f27525 100644
--- a/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh
+++ b/milena/sandbox/icdar/2009/hsc/ws_to_wsl.hh
@@ -37,7 +37,7 @@
#include <mln/fun/i2v/array.hh>
#include <mln/level/transform.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
@@ -407,7 +407,7 @@ namespace mln
f_relab(l) = parent[l];
image2d<L> ws_ = level::transform(ws, f_relab);
- image2d<rgb8> cool = debug::colorize(rgb8(), ws_, n_basins);
+ image2d<rgb8> cool = labeling::colorize(rgb8(), ws_, n_basins);
data::fill((cool | (pw::value(ws) == pw::cst(0))).rw(),
literal::white);
mln_piter(box2d) p(small.domain());
diff --git a/milena/sandbox/inim/2010/boxes/boxes.cc b/milena/sandbox/inim/2010/boxes/boxes.cc
index 8944974..3790ec5 100644
--- a/milena/sandbox/inim/2010/boxes/boxes.cc
+++ b/milena/sandbox/inim/2010/boxes/boxes.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
diff --git a/milena/sandbox/lazzara/igr/igr-biggest-comp.cc b/milena/sandbox/lazzara/igr/igr-biggest-comp.cc
index ecfc7a1..a59176f 100644
--- a/milena/sandbox/lazzara/igr/igr-biggest-comp.cc
+++ b/milena/sandbox/lazzara/igr/igr-biggest-comp.cc
@@ -5,7 +5,7 @@
#include <mln/labeling/flat_zones.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/essential/3d.hh>
diff --git a/milena/sandbox/lazzara/igr/igr-cloud.cc b/milena/sandbox/lazzara/igr/igr-cloud.cc
index 18d976f..df4b7c8 100644
--- a/milena/sandbox/lazzara/igr/igr-cloud.cc
+++ b/milena/sandbox/lazzara/igr/igr-cloud.cc
@@ -20,7 +20,7 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/literal/black.hh>
# include <mln/literal/white.hh>
diff --git a/milena/sandbox/lazzara/igr/igr.cc b/milena/sandbox/lazzara/igr/igr.cc
index 98e1ce4..fffd88f 100644
--- a/milena/sandbox/lazzara/igr/igr.cc
+++ b/milena/sandbox/lazzara/igr/igr.cc
@@ -4,7 +4,7 @@
#include <mln/binarization/binarization.hh>
#include <mln/labeling/background.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
//#include <mln/registration/registration.hh>
//#include <mln/registration/multiscale.hh>
diff --git a/milena/sandbox/scribo/debug/save_label_image.hh b/milena/sandbox/scribo/debug/save_label_image.hh
index e9b01f1..1a8036c 100644
--- a/milena/sandbox/scribo/debug/save_label_image.hh
+++ b/milena/sandbox/scribo/debug/save_label_image.hh
@@ -59,7 +59,7 @@ namespace scribo
mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
mln_precondition(exact(lbl).is_valid());
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels), filename);
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels), filename);
trace::exiting("scribo::debug::save_label_image");
}
diff --git a/milena/sandbox/scribo/demat.hh b/milena/sandbox/scribo/demat.hh
index 06e22da..e8c0e7b 100644
--- a/milena/sandbox/scribo/demat.hh
+++ b/milena/sandbox/scribo/demat.hh
@@ -182,7 +182,7 @@ namespace scribo
void save_lbl_image(const image2d<V>& lbl, unsigned nlabels,
const char *filename)
{
- image2d<rgb8> output = debug::colorize(rgb8(), lbl, nlabels);
+ image2d<rgb8> output = labeling::colorize(rgb8(), lbl, nlabels);
io::ppm::save(output, output_file(filename));
}
@@ -1375,7 +1375,7 @@ namespace scribo
std::cout << "map text to cells" << std::endl;
label_16 nlabels;
image2d<label_16> tblelbl = labeling::background(table, c8(), nlabels);
- image2d<rgb8> color = debug::colorize(rgb8(), tblelbl, nlabels);
+ image2d<rgb8> color = labeling::colorize(rgb8(), tblelbl, nlabels);
# ifndef NOUT
io::ppm::save(color, output_file("cells-labels.ppm"));
@@ -1395,7 +1395,7 @@ namespace scribo
{
std::cout << "Merging aligned text boxes" << std::endl;
- io::ppm::save(debug::colorize(rgb8(), lbl, nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), lbl, nlabels),
output_file("tboxes-lbl.ppm"));
typedef util::couple<image2d<unsigned>, image2d<label_16> > cpl_t;
@@ -1406,7 +1406,7 @@ namespace scribo
#ifndef NOUT
io::pgm::save(level::transform(diz.first(), fun::l2l::wrap<label_8>()),
output_file("tboxes-dmap.pgm"));
- io::ppm::save(debug::colorize(rgb8(), diz.second(), nlabels),
+ io::ppm::save(labeling::colorize(rgb8(), diz.second(), nlabels),
output_file("tboxes-iz.ppm"));
#endif
diff --git a/milena/sandbox/scribo/src/dmap.cc b/milena/sandbox/scribo/src/dmap.cc
index dac40ba..0375691 100644
--- a/milena/sandbox/scribo/src/dmap.cc
+++ b/milena/sandbox/scribo/src/dmap.cc
@@ -21,6 +21,6 @@ int main(int, char *argv[])
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), res.second(), nlabels), "iz.ppm");
}
diff --git a/milena/sandbox/scribo/src/extract_text_double_link.cc b/milena/sandbox/scribo/src/extract_text_double_link.cc
index d7de94b..88f8247 100644
--- a/milena/sandbox/scribo/src/extract_text_double_link.cc
+++ b/milena/sandbox/scribo/src/extract_text_double_link.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/debug/println.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -89,7 +89,7 @@ int main(int argc, char* argv[])
literal::green,
scribo::make::debug_filename("links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -98,7 +98,7 @@ int main(int argc, char* argv[])
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_double_link(text, left_link, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_double_several_links.cc b/milena/sandbox/scribo/src/extract_text_double_several_links.cc
index 1fead0a..59dad73 100644
--- a/milena/sandbox/scribo/src/extract_text_double_several_links.cc
+++ b/milena/sandbox/scribo/src/extract_text_double_several_links.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/util/timer.hh>
#include <scribo/text/extract_bboxes.hh>
@@ -110,7 +110,7 @@ int main(int argc, char* argv[])
std::cout << "Full process: " << t2 << std::endl;
std::cout << "Cleanup and grouping process: " << t3 << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_graph.cc b/milena/sandbox/scribo/src/extract_text_graph.cc
index fdcf54b..99f9a18 100644
--- a/milena/sandbox/scribo/src/extract_text_graph.cc
+++ b/milena/sandbox/scribo/src/extract_text_graph.cc
@@ -67,7 +67,7 @@ int main(int argc, char* argv[])
text, g,
literal::red, literal::cyan,
scribo::make::debug_filename("left_linked.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_several_graph.cc b/milena/sandbox/scribo/src/extract_text_several_graph.cc
index 8c84bc9..17816a0 100644
--- a/milena/sandbox/scribo/src/extract_text_several_graph.cc
+++ b/milena/sandbox/scribo/src/extract_text_several_graph.cc
@@ -76,7 +76,7 @@ int main(int argc, char* argv[])
scribo::debug::save_textbboxes_image(input, grouped_text.bboxes(),
literal::red,
scribo::make::debug_filename("grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_several_left_links.cc b/milena/sandbox/scribo/src/extract_text_several_left_links.cc
index a050ff3..2ad6ef3 100644
--- a/milena/sandbox/scribo/src/extract_text_several_left_links.cc
+++ b/milena/sandbox/scribo/src/extract_text_several_left_links.cc
@@ -75,7 +75,7 @@ int main(int argc, char* argv[])
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/extract_text_single_link.cc b/milena/sandbox/scribo/src/extract_text_single_link.cc
index 640f9f2..55e5068 100644
--- a/milena/sandbox/scribo/src/extract_text_single_link.cc
+++ b/milena/sandbox/scribo/src/extract_text_single_link.cc
@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
text, left_link,
literal::red, literal::cyan,
scribo::make::debug_filename("left_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -80,7 +80,7 @@ int main(int argc, char* argv[])
= text::grouping::group_from_single_link(text, left_link);
std::cout << "AFTER - nbboxes = " << grouped_text.bboxes().nelements() << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("left_label_color.ppm"));
@@ -99,7 +99,7 @@ int main(int argc, char* argv[])
text, right_link,
literal::red, literal::cyan,
scribo::make::debug_filename("right_links.ppm"));
-// io::ppm::save(mln::debug::colorize(value::rgb8(),
+// io::ppm::save(mln::labeling::colorize(value::rgb8(),
// text.label_image(),
// text.nbboxes()),
// scribo::make::debug_filename("lbl_before.ppm"));
@@ -107,7 +107,7 @@ int main(int argc, char* argv[])
scribo::util::text<image2d<value::label_16> > grouped_text
= text::grouping::group_from_single_link(text, right_link);
- io::ppm::save(mln::debug::colorize(value::rgb8(),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(),
grouped_text.label_image(),
grouped_text.nbboxes()),
scribo::make::debug_filename("right_label_color.ppm"));
diff --git a/milena/sandbox/scribo/src/morpho.cc b/milena/sandbox/scribo/src/morpho.cc
index 27b9f98..2195fcf 100644
--- a/milena/sandbox/scribo/src/morpho.cc
+++ b/milena/sandbox/scribo/src/morpho.cc
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
mln_VAR(res, transform::distance_and_influence_zone_geodesic(lbl, c8(), mln_max(unsigned)));
io::pgm::save(level::transform(res.first(), fun::l2l::wrap<label_8>()), "dmap.pgm");
- io::ppm::save(debug::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
+ io::ppm::save(labeling::colorize(rgb8(), res.second(), nlabels), "iz.ppm");
image2d<unsigned>& dmap = res.first();
{
diff --git a/milena/sandbox/scribo/src/photo_basic.cc b/milena/sandbox/scribo/src/photo_basic.cc
index 871da36..9b2767a 100644
--- a/milena/sandbox/scribo/src/photo_basic.cc
+++ b/milena/sandbox/scribo/src/photo_basic.cc
@@ -28,7 +28,7 @@
#include <iostream>
#include <mln/essential/2d.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <scribo/text/extract_bboxes.hh>
#include <scribo/text/grouping/group_with_single_left_link.hh>
@@ -101,7 +101,7 @@ int main(int argc, char* argv[])
literal::red,
scribo::make::debug_filename("test_graph_grouped_text.ppm"));
- io::ppm::save(mln::debug::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), grouped_textbboxes.label_image(), grouped_textbboxes.nbboxes()),
scribo::make::debug_filename("grouped_text_comps.ppm"));
}
diff --git a/milena/sandbox/scribo/src/table_extract.cc b/milena/sandbox/scribo/src/table_extract.cc
index 273bd5d..b184e53 100644
--- a/milena/sandbox/scribo/src/table_extract.cc
+++ b/milena/sandbox/scribo/src/table_extract.cc
@@ -60,7 +60,7 @@ int main(int argc, char* argv[])
image2d<value::label_16> tables = scribo::table::extract(input, ncells).first();
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::dump::save(tables, scribo::make::debug_filename("table_cells.dump"));
diff --git a/milena/sandbox/scribo/src/table_rebuild_opening.cc b/milena/sandbox/scribo/src/table_rebuild_opening.cc
index 0add582..92865c1 100644
--- a/milena/sandbox/scribo/src/table_rebuild_opening.cc
+++ b/milena/sandbox/scribo/src/table_rebuild_opening.cc
@@ -71,7 +71,7 @@ int main(int argc, char* argv[])
std::cout << "ncells (including background) = " << ncells << std::endl;
- io::ppm::save(mln::debug::colorize(value::rgb8(), tables, ncells),
+ io::ppm::save(mln::labeling::colorize(value::rgb8(), tables, ncells),
scribo::make::debug_filename("table_cells.ppm"));
io::pgm::save(tables, scribo::make::debug_filename("table_cells.pgm"));
diff --git a/milena/sandbox/scribo/src/table_rebuild_rank.cc b/milena/sandbox/scribo/src/table_rebuild_rank.cc
index 1ed8ddd..53a4718 100644
--- a/milena/sandbox/scribo/src/table_rebuild_rank.cc
+++ b/milena/sandbox/scribo/src/table_rebuild_rank.cc
@@ -73,7 +73,7 @@ int main(int argc, char* argv[])
std::cout << "ncells (including background) = " << ncells << std::endl;
- image2d<value::rgb8> table_color = mln::debug::colorize(value::rgb8(), tables, ncells);
+ image2d<value::rgb8> table_color = mln::labeling::colorize(value::rgb8(), tables, ncells);
value::label_8 bg = level::compute(accu::maj_h<value::label_8>(), tables);
diff --git a/milena/sandbox/scribo/table/internal/repair_lines.hh b/milena/sandbox/scribo/table/internal/repair_lines.hh
index cf21564..017737c 100644
--- a/milena/sandbox/scribo/table/internal/repair_lines.hh
+++ b/milena/sandbox/scribo/table/internal/repair_lines.hh
@@ -45,7 +45,7 @@
# include <mln/win/line.hh>
# include <mln/pw/all.hh>
-# include <mln/debug/colorize.hh>
+# include <mln/labeling/colorize.hh>
# include <mln/value/rgb8.hh>
# include <mln/value/label_16.hh>
# include <scribo/make/debug_filename.hh>
diff --git a/milena/sandbox/theo/color/filter_blen_rgb_edges.cc b/milena/sandbox/theo/color/filter_blen_rgb_edges.cc
index d66bd9d..3d91a0a 100644
--- a/milena/sandbox/theo/color/filter_blen_rgb_edges.cc
+++ b/milena/sandbox/theo/color/filter_blen_rgb_edges.cc
@@ -18,7 +18,7 @@
#include <mln/io/ppm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include <mln/morpho/dilation.hh>
#include <mln/morpho/erosion.hh>
@@ -333,7 +333,7 @@ int main(int argc, char* argv[])
w_all);
- io::ppm::save(debug::colorize(rgb8(),
+ io::ppm::save(labeling::colorize(rgb8(),
w_all,
nbasins),
"temp_w_all.ppm");
@@ -344,7 +344,7 @@ int main(int argc, char* argv[])
image2d<L> out_w = full2image(w_all);
-// io::ppm::save(debug::colorize(rgb8(),
+// io::ppm::save(labeling::colorize(rgb8(),
// out_w,
// nbasins),
// argv[4]);
--
1.6.1.2
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Fix missing updates about debug colorize.
* mln/debug/all.hh,
* tests/morpho/meyer_wst_long.cc:
Fix missing updates about debug colorize.
* mln/registration/icp.hh: Likewise; unused so remove.
mln/debug/all.hh | 8 ++++----
mln/registration/icp.hh | 1 -
tests/morpho/meyer_wst_long.cc | 7 ++++---
3 files changed, 8 insertions(+), 8 deletions(-)
Index: mln/debug/all.hh
--- mln/debug/all.hh (revision 3776)
+++ mln/debug/all.hh (working copy)
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2007, 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
@@ -40,14 +40,14 @@
/// Namespace of routines that help to debug.
namespace debug
{
+
/// Implementation namespace of debug namespace.
namespace impl {}
- }
}
+}
-# include <mln/debug/colorize.hh>
# include <mln/debug/format.hh>
# include <mln/debug/draw_graph.hh>
# include <mln/debug/histo.hh>
Index: mln/registration/icp.hh
--- mln/registration/icp.hh (revision 3776)
+++ mln/registration/icp.hh (working copy)
@@ -62,7 +62,6 @@
# include <mln/io/ppm/save.hh>
# include <mln/io/pbm/save.hh>
-# include <mln/debug/colorize.hh>
# include <mln/debug/histo.hh>
# include <mln/accu/histo.hh>
Index: tests/morpho/meyer_wst_long.cc
--- tests/morpho/meyer_wst_long.cc (revision 3776)
+++ tests/morpho/meyer_wst_long.cc (working copy)
@@ -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
@@ -50,7 +51,7 @@
#include <mln/io/pgm/load.hh>
#include <mln/io/ppm/save.hh>
-#include <mln/debug/colorize.hh>
+#include <mln/labeling/colorize.hh>
#include "tests/data.hh"
@@ -73,5 +74,5 @@
image2d<L> ws = morpho::meyer_wst(clo, c4(), nbasins);
// Save the image in color.
- io::ppm::save(debug::colorize(value::rgb8(), ws, nbasins), "out.ppm");
+ io::ppm::save(labeling::colorize(value::rgb8(), ws, nbasins), "out.ppm");
}
1
0