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
December 2008
- 12 participants
- 201 discussions
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Move level::fill and level::paste into data::.
* mln/data: New directory.
* mln/level/fill.hh,
* mln/level/fill_with_image.hh,
* mln/level/fill_with_image.spe.hh,
* mln/level/fill_with_value.hh,
* mln/level/fill_with_value.spe.hh,
* mln/level/memcpy_.hh,
* mln/level/memset_.hh,
* mln/level/paste.hh,
* mln/level/paste.spe.hh: Move and rename as...
* mln/data/fill.hh,
* mln/data/fill_with_image.hh,
* mln/data/fill_with_image.spe.hh,
* mln/data/fill_with_value.hh,
* mln/data/fill_with_value.spe.hh,
* mln/data/memcpy_.hh,
* mln/data/memset_.hh,
* mln/data/paste.hh,
* mln/data/paste.spe.hh: ...these.
Update.
* mln/data/essential.hh: New.
* mln/data/all.hh: New.
* tests/data: New directory.
* tests/level/fill.cc,
* tests/level/fill_full.cc,
* tests/level/fill_with_image.cc,
* tests/level/fill_with_value.cc,
* tests/level/memcpy_.cc,
* tests/level/memset_.cc,
* tests/level/paste.cc,
* tests/level/paste_full.cc,
* tests/level/transform.cc: Move and rename as...
* tests/data/fill.cc,
* tests/data/fill_full.cc,
* tests/data/fill_with_image.cc,
* tests/data/fill_with_value.cc,
* tests/data/memcpy_.cc,
* tests/data/memset_.cc,
* tests/data/paste.cc: ...these.
Update.
* tests/data/Makefile.am: New.
* tests/unit_test/mln_level_fill.cc,
* tests/unit_test/mln_level_fill_with_image.cc,
* tests/unit_test/mln_level_fill_with_value.cc,
* tests/unit_test/mln_level_memcpy_.cc,
* tests/unit_test/mln_level_memset_.cc,
* tests/unit_test/mln_level_paste.cc: Move and rename as...
* tests/unit_test/mln_data_fill.cc,
* tests/unit_test/mln_data_fill_with_image.cc,
* tests/unit_test/mln_data_fill_with_value.cc,
* tests/unit_test/mln_data_memcpy_.cc,
* tests/unit_test/mln_data_memset_.cc,
* tests/unit_test/mln_data_paste.cc: ...these.
Update.
Assign is obsolete (it performed fill!)
* mln/level/assign.hh: Remove.
* mln/level/assign.spe.hh: Remove.
* tests/level/assign.cc: Remove.
* tests/level/assign_full.cc: Remove.
* mln/debug/println.spe.hh,
* mln/debug/draw_graph.hh,
* mln/core/site_set/p_image.hh,
* mln/core/image/extension_ima.hh,
* mln/core/w_window.hh,
* mln/core/routine/clone.hh,
* mln/core/concept/window.hh,
* mln/draw/line.hh,
* mln/draw/box.hh,
* mln/draw/plot.hh,
* mln/all.hh,
* mln/level/transform.spe.hh,
* mln/level/all.hh,
* mln/level/replace.hh,
* mln/level/essential.hh,
* mln/linear/gaussian.hh,
* mln/border/resize.hh,
* mln/convert/to_image.hh,
* mln/geom/resize.hh,
* mln/geom/chamfer.hh,
* mln/morpho/tree/compute_attribute_image.hh,
* mln/morpho/tree/compute_parent.hh,
* mln/morpho/elementary/like_ero_set.hh,
* mln/morpho/elementary/gradient.hh,
* mln/morpho/hit_or_miss.hh,
* mln/morpho/laplacian.hh,
* mln/morpho/Rd.hh,
* mln/morpho/includes.hh,
* mln/morpho/skeleton_constrained.hh,
* mln/morpho/meyer_wst.hh,
* mln/canvas/distance_front.hh,
* mln/canvas/morpho/algebraic_union_find.hh,
* mln/canvas/distance_geodesic.hh,
* mln/canvas/labeling.hh,
* mln/extension/fill.hh,
* mln/util/tree_to_image.hh,
* mln/labeling/blobs.hh,
* mln/labeling/level.hh,
* mln/labeling/regional_minima.hh,
* mln/labeling/regional_maxima.hh,
* tests/debug/println_with_border.cc,
* tests/debug/println.cc,
* tests/core/other/clock_test.cc,
* tests/core/image/sub_image.cc,
* tests/core/image/cast_image.cc,
* tests/core/image/sparse_image.cc,
* tests/core/image/obased_rle_image.cc,
* tests/core/image/value_enc_image.cc,
* tests/core/image/plain.cc,
* tests/core/image/bgraph_image.cc,
* tests/core/image/fi_adaptor.cc,
* tests/core/image/mono_rle_image.cc,
* tests/core/image/rle_image.cc,
* tests/core/image/mono_obased_rle_image.cc,
* tests/core/image/interpolated.cc,
* tests/draw/graph.cc,
* tests/draw/line.cc,
* tests/opt/at.cc,
* tests/level/transform_full.cc,
* tests/level/sort_psites_full.cc,
* tests/level/Makefile.am,
* tests/linear/gaussian.cc,
* tests/transform/distance_geodesic.cc,
* tests/transform/distance_front.cc,
* tests/border/fill_full.cc,
* tests/border/resize_image3d_1.cc,
* tests/border/resize_image3d_2.cc,
* tests/border/resize_image3d_3.cc,
* tests/test/positive.cc,
* tests/convert/to_p_set.cc,
* tests/convert/to_window.cc,
* tests/pw/value.cc,
* tests/binarization/threshold.cc,
* tests/morpho/artificial_line_graph_image_wst.cc,
* tests/morpho/dilation.cc,
* tests/morpho/tree/data.cc,
* tests/morpho/skeleton_constrained.cc,
* tests/morpho/elementary/gradient.cc,
* tests/morpho/elementary/closing.cc,
* tests/morpho/elementary/erosion.cc,
* tests/morpho/elementary/top_hat.cc,
* tests/morpho/elementary/gradient_external.cc,
* tests/morpho/elementary/opening.cc,
* tests/morpho/elementary/dilation.cc,
* tests/morpho/elementary/gradient_internal.cc,
* tests/morpho/lena_line_graph_image_wst1.cc,
* tests/morpho/rank_filter.cc,
* tests/morpho/complex_image_wst.cc,
* tests/morpho/hit_or_miss.cc,
* tests/morpho/combined.cc,
* tests/morpho/lena_line_graph_image_wst2.cc,
* tests/Makefile.am,
* tests/canvas/chamfer.cc,
* tests/canvas/browsing/hyper_directional.cc,
* tests/extension/fill.cc,
* tests/util/tree_to_image.cc,
* tests/util/tree_fast_to_image.cc,
* tests/labeling/level.cc: Update.
mln/all.hh | 1
mln/border/resize.hh | 4 -
mln/canvas/distance_front.hh | 4 -
mln/canvas/distance_geodesic.hh | 4 -
mln/canvas/labeling.hh | 8 +--
mln/canvas/morpho/algebraic_union_find.hh | 17 +++---
mln/convert/to_image.hh | 4 -
mln/core/concept/window.hh | 2
mln/core/image/extension_ima.hh | 4 -
mln/core/routine/clone.hh | 4 -
mln/core/site_set/p_image.hh | 4 -
mln/core/w_window.hh | 4 -
mln/data/all.hh | 60 ++++++++++++++++++++++++
mln/data/essential.hh | 40 ++++++++++++++++
mln/data/fill.hh | 24 ++++-----
mln/data/fill_with_image.hh | 24 ++++-----
mln/data/fill_with_image.spe.hh | 44 ++++++++---------
mln/data/fill_with_value.hh | 22 ++++----
mln/data/fill_with_value.spe.hh | 28 +++++------
mln/data/memcpy_.hh | 33 ++++++-------
mln/data/memset_.hh | 32 ++++++------
mln/data/paste.hh | 24 ++++-----
mln/data/paste.spe.hh | 38 +++++++--------
mln/debug/draw_graph.hh | 2
mln/debug/println.spe.hh | 4 -
mln/draw/box.hh | 2
mln/draw/line.hh | 4 -
mln/draw/plot.hh | 4 -
mln/extension/fill.hh | 2
mln/geom/chamfer.hh | 4 -
mln/geom/resize.hh | 2
mln/labeling/blobs.hh | 4 -
mln/labeling/level.hh | 2
mln/labeling/regional_maxima.hh | 4 -
mln/labeling/regional_minima.hh | 4 -
mln/level/all.hh | 20 ++------
mln/level/essential.hh | 15 ++----
mln/level/replace.hh | 4 -
mln/level/transform.spe.hh | 4 -
mln/linear/gaussian.hh | 22 ++++----
mln/morpho/Rd.hh | 6 +-
mln/morpho/elementary/gradient.hh | 2
mln/morpho/elementary/like_ero_set.hh | 4 -
mln/morpho/hit_or_miss.hh | 8 +--
mln/morpho/includes.hh | 2
mln/morpho/laplacian.hh | 2
mln/morpho/meyer_wst.hh | 2
mln/morpho/skeleton_constrained.hh | 4 -
mln/morpho/tree/compute_attribute_image.hh | 6 +-
mln/morpho/tree/compute_parent.hh | 4 -
mln/util/tree_to_image.hh | 6 +-
tests/Makefile.am | 1
tests/binarization/threshold.cc | 2
tests/border/fill_full.cc | 8 +--
tests/border/resize_image3d_1.cc | 4 -
tests/border/resize_image3d_2.cc | 4 -
tests/border/resize_image3d_3.cc | 4 -
tests/canvas/browsing/hyper_directional.cc | 12 ++--
tests/canvas/chamfer.cc | 8 +--
tests/convert/to_p_set.cc | 6 +-
tests/convert/to_window.cc | 6 +-
tests/core/image/bgraph_image.cc | 8 +--
tests/core/image/cast_image.cc | 4 -
tests/core/image/fi_adaptor.cc | 4 -
tests/core/image/interpolated.cc | 2
tests/core/image/mono_obased_rle_image.cc | 6 +-
tests/core/image/mono_rle_image.cc | 6 +-
tests/core/image/obased_rle_image.cc | 6 +-
tests/core/image/plain.cc | 8 +--
tests/core/image/rle_image.cc | 6 +-
tests/core/image/sparse_image.cc | 6 +-
tests/core/image/sub_image.cc | 8 +--
tests/core/image/value_enc_image.cc | 6 +-
tests/core/other/clock_test.cc | 8 +--
tests/data/Makefile.am | 23 +++++++++
tests/data/fill.cc | 8 +--
tests/data/fill_full.cc | 10 ++--
tests/data/fill_with_image.cc | 56 +++++++++++-----------
tests/data/fill_with_value.cc | 22 ++++----
tests/data/memcpy_.cc | 16 +++---
tests/data/memset_.cc | 20 ++++----
tests/data/paste.cc | 44 ++++++++---------
tests/debug/println.cc | 2
tests/debug/println_with_border.cc | 2
tests/draw/graph.cc | 2
tests/draw/line.cc | 12 ++--
tests/extension/fill.cc | 4 -
tests/labeling/level.cc | 2
tests/level/Makefile.am | 6 --
tests/level/paste_full.cc | 10 ++--
tests/level/sort_psites_full.cc | 2
tests/level/transform.cc | 20 ++++----
tests/level/transform_full.cc | 2
tests/linear/gaussian.cc | 4 -
tests/morpho/artificial_line_graph_image_wst.cc | 2
tests/morpho/combined.cc | 6 +-
tests/morpho/complex_image_wst.cc | 4 -
tests/morpho/dilation.cc | 4 -
tests/morpho/elementary/closing.cc | 2
tests/morpho/elementary/dilation.cc | 2
tests/morpho/elementary/erosion.cc | 2
tests/morpho/elementary/gradient.cc | 2
tests/morpho/elementary/gradient_external.cc | 2
tests/morpho/elementary/gradient_internal.cc | 2
tests/morpho/elementary/opening.cc | 2
tests/morpho/elementary/top_hat.cc | 2
tests/morpho/hit_or_miss.cc | 2
tests/morpho/lena_line_graph_image_wst1.cc | 2
tests/morpho/lena_line_graph_image_wst2.cc | 2
tests/morpho/rank_filter.cc | 2
tests/morpho/skeleton_constrained.cc | 4 -
tests/morpho/tree/data.cc | 2
tests/opt/at.cc | 12 ++--
tests/pw/value.cc | 4 -
tests/test/positive.cc | 4 -
tests/transform/distance_front.cc | 4 -
tests/transform/distance_geodesic.cc | 4 -
tests/unit_test/mln_data_fill.cc | 6 +-
tests/unit_test/mln_data_fill_with_image.cc | 6 +-
tests/unit_test/mln_data_fill_with_value.cc | 6 +-
tests/unit_test/mln_data_memcpy_.cc | 6 +-
tests/unit_test/mln_data_memset_.cc | 6 +-
tests/unit_test/mln_data_paste.cc | 6 +-
tests/util/tree_fast_to_image.cc | 4 -
tests/util/tree_to_image.cc | 4 -
125 files changed, 603 insertions(+), 493 deletions(-)
Index: mln/debug/println.spe.hh
--- mln/debug/println.spe.hh (revision 3073)
+++ mln/debug/println.spe.hh (working copy)
@@ -44,7 +44,7 @@
# include <mln/core/concept/window.hh>
# include <mln/debug/format.hh>
# include <mln/debug/put_word.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/accu/max.hh>
# include <mln/opt/at.hh>
@@ -110,7 +110,7 @@
unsigned len = len_ + 1;
image2d<char> output(b.nrows(), b.ncols() * len, 0);
- level::fill(output, ' ');
+ data::fill(output, ' ');
for_all(p)
{
std::ostringstream oss;
Index: mln/debug/draw_graph.hh
--- mln/debug/draw_graph.hh (revision 3073)
+++ mln/debug/draw_graph.hh (working copy)
@@ -39,7 +39,7 @@
# include <mln/core/site_set/p_edges.hh>
# include <mln/util/line_graph.hh>
# include <mln/draw/line.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
namespace mln
{
Index: mln/core/site_set/p_image.hh
--- mln/core/site_set/p_image.hh (revision 3073)
+++ mln/core/site_set/p_image.hh (working copy)
@@ -41,7 +41,7 @@
# include <mln/fun/ops.hh>
# include <mln/pw/value.hh>
# include <mln/pw/cst.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
@@ -271,7 +271,7 @@
if (! is_valid())
return; // No-op.
nsites_ = 0;
- level::fill_with_value(ima_, false);
+ data::fill_with_value(ima_, false);
}
template <typename I>
Index: mln/core/image/extension_ima.hh
--- mln/core/image/extension_ima.hh (revision 3073)
+++ mln/core/image/extension_ima.hh (working copy)
@@ -39,7 +39,7 @@
/// or value_io::read_only; then ext_io can be read_write...
# include <mln/core/internal/image_identity.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
@@ -278,7 +278,7 @@
{
mlc_equal(mln_trait_image_value_io(J),
trait::image::value_io::read_write)::check();
- level::fill_with_value(v);
+ data::fill_with_value(v);
}
// init_
Index: mln/core/w_window.hh
--- mln/core/w_window.hh (revision 3073)
+++ mln/core/w_window.hh (working copy)
@@ -347,7 +347,7 @@
ima.init_(geom::bbox(w_win));
{
- // level::fill(ima, literal::zero) is:
+ // data::fill(ima, literal::zero) is:
mln_value(I) zero = literal::zero;
mln_piter(I) p(ima.domain());
for_all(p)
@@ -373,7 +373,7 @@
// // Fill the image with zeros, as (weighted) windows are not
// // necessarily box-shaped (there might be holes corresponding to
// // null weights).
-// level::fill(ima, literal::zero);
+// data::fill(ima, literal::zero);
// P O = P::origin;
// mln_qiter(W) q(w_win, O);
// for_all(q)
Index: mln/core/routine/clone.hh
--- mln/core/routine/clone.hh (revision 3073)
+++ mln/core/routine/clone.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/routine/init.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
namespace mln
@@ -64,7 +64,7 @@
mln_concrete(I) tmp;
initialize(tmp, model);
- level::fill(tmp, model);
+ data::fill(tmp, model);
trace::exiting("core::clone");
return tmp;
Index: mln/core/concept/window.hh
--- mln/core/concept/window.hh (revision 3073)
+++ mln/core/concept/window.hh (working copy)
@@ -327,7 +327,7 @@
// Hack (below) to avoid circular dependency.
ima.init_(mln::internal::geom_bbox(win));
{
- // level::fill(ima, false) is:
+ // data::fill(ima, false) is:
mln_piter(I) p(ima.domain());
for_all(p)
ima(p) = false;
Index: mln/draw/line.hh
--- mln/draw/line.hh (revision 3073)
+++ mln/draw/line.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/site_set/p_line2d.hh>
# include <mln/core/image/safe.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/pw/image.hh>
# include <mln/pw/cst.hh>
@@ -77,7 +77,7 @@
I& ima = exact(ima_);
mln_precondition(ima.has_data());
// if (! ima.has(beg) || ! ima.has(end)) trace::warning("out");
- level::paste(pw::cst(v) | p_line2d(beg, end),
+ data::paste(pw::cst(v) | p_line2d(beg, end),
safe(ima).rw());
}
Index: mln/draw/box.hh
--- mln/draw/box.hh (revision 3073)
+++ mln/draw/box.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/alias/box2d.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/draw/line.hh>
# include <mln/pw/image.hh>
# include <mln/pw/cst.hh>
Index: mln/draw/plot.hh
--- mln/draw/plot.hh (revision 3073)
+++ mln/draw/plot.hh (working copy)
@@ -35,7 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/site_set/p_line2d.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/pw/image.hh>
# include <mln/pw/cst.hh>
@@ -78,7 +78,7 @@
mln_point(I) beg = p, end = p;
beg[i] = beg[i] - 1;
end[i] = end[i] + 1;
- level::paste(pw::cst(v) | line2d(beg, end),
+ data::paste(pw::cst(v) | line2d(beg, end),
ima);
}
}
Index: mln/all.hh
--- mln/all.hh (revision 3073)
+++ mln/all.hh (working copy)
@@ -32,6 +32,7 @@
///
/// File that includes all the headers.
+#include <mln/data/all.hh>
#include <mln/util/all.hh>
#include <mln/fun/p2v/all.hh>
#include <mln/fun/x2x/all.hh>
Index: mln/level/transform.spe.hh
--- mln/level/transform.spe.hh (revision 3073)
+++ mln/level/transform.spe.hh (working copy)
@@ -40,7 +40,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/function.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
# include <mln/value/set.hh>
# include <mln/value/lut_vec.hh>
@@ -215,7 +215,7 @@
initialize(output, input);
mln_result(F) val = f(input.val());
- fill_with_value(output, val);
+ data::fill_with_value(output, val);
trace::exiting("level::impl::transform_singleton");
return output;
Index: mln/level/all.hh
--- mln/level/all.hh (revision 3073)
+++ mln/level/all.hh (working copy)
@@ -1,4 +1,5 @@
// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,11 +29,9 @@
#ifndef MLN_LEVEL_ALL_HH
# define MLN_LEVEL_ALL_HH
-/*! \file mln/level/all.hh
- *
- * \brief File that includes all level-related routines.
- *
- */
+/// \file mln/level/all.hh
+///
+/// File that includes all level-related routines.
namespace mln
@@ -49,25 +48,21 @@
namespace generic {}
}
-
}
-
}
+
# include <mln/level/abs.hh>
# include <mln/level/apply.hh>
# include <mln/level/approx/all.hh>
-# include <mln/level/assign.hh>
# include <mln/level/compare.hh>
# include <mln/level/compute.hh>
# include <mln/level/convert.hh>
# include <mln/level/fast_median.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/level/median.hh>
-# include <mln/level/memcpy_.hh>
-# include <mln/level/memset_.hh>
# include <mln/level/naive/all.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/level/replace.hh>
# include <mln/level/saturate.hh>
# include <mln/level/sort_psites.hh>
@@ -78,5 +73,4 @@
# include <mln/level/was.median.hh>
-
#endif // ! MLN_LEVEL_ALL_HH
Index: mln/level/replace.hh
--- mln/level/replace.hh (revision 3073)
+++ mln/level/replace.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/image/image_if.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/pw/value.hh>
# include <mln/pw/cst.hh>
@@ -74,7 +74,7 @@
trace::entering("level::impl::generic::replace");
I& input = exact(input_);
- level::fill((input | (pw::value(input) == pw::cst(old_value))).rw(),
+ data::fill((input | (pw::value(input) == pw::cst(old_value))).rw(),
new_value);
trace::exiting("level::impl::generic::replace");
Index: mln/level/essential.hh
--- mln/level/essential.hh (revision 3073)
+++ mln/level/essential.hh (working copy)
@@ -1,4 +1,4 @@
-// Copyright (C) 2008 EPITA Research and Development Laboratory
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,22 +28,18 @@
#ifndef MLN_LEVEL_ESSENTIAL_HH
# define MLN_LEVEL_ESSENTIAL_HH
-/*! \file mln/level/essential.hh
- *
- * \brief File that includes essential level-related routines.
- *
- */
+/// \file mln/level/essential.hh
+///
+/// File that includes essential level-related routines.
+
# include <mln/level/abs.hh>
# include <mln/level/apply.hh>
-# include <mln/level/assign.hh>
# include <mln/level/compare.hh>
# include <mln/level/compute.hh>
# include <mln/level/convert.hh>
# include <mln/level/fast_median.hh>
-# include <mln/level/fill.hh>
# include <mln/level/median.hh>
-# include <mln/level/paste.hh>
# include <mln/level/replace.hh>
# include <mln/level/saturate.hh>
# include <mln/level/transform.hh>
@@ -53,4 +49,5 @@
# include <mln/level/approx/essential.hh>
# include <mln/level/naive/essential.hh>
+
#endif // ! MLN_LEVEL_ESSENTIAL_HH
Index: mln/data/paste.spe.hh
--- mln/data/paste.spe.hh (revision 0)
+++ mln/data/paste.spe.hh (working copy)
@@ -28,9 +28,9 @@
#ifndef MLN_LEVEL_PASTE_SPE_HH
# define MLN_LEVEL_PASTE_SPE_HH
-/*! \file mln/level/paste.spe.hh
+/*! \file mln/data/paste.spe.hh
*
- * \brief Specializations for mln::level::paste.
+ * \brief Specializations for mln::data::paste.
*
*/
@@ -39,8 +39,8 @@
# endif // ! MLN_LEVEL_PASTE_HH
# include <mln/core/pixel.hh>
-# include <mln/level/fill_with_value.hh>
-# include <mln/level/memcpy_.hh>
+# include <mln/data/fill_with_value.hh>
+# include <mln/data/memcpy_.hh>
# include <mln/core/box_runstart_piter.hh>
# include <mln/border/get.hh>
@@ -51,7 +51,7 @@
namespace mln
{
- namespace level
+ namespace data
{
namespace internal
@@ -76,12 +76,12 @@
template <typename I, typename J>
void paste_fast(const Image<I>& input_, Image<J>& output_)
{
- trace::entering("level::impl::paste_fast");
+ trace::entering("data::impl::paste_fast");
const I& input = exact(input_);
J& output = exact(output_);
- level::internal::paste_tests(input, output);
+ data::internal::paste_tests(input, output);
mln_pixter(const I) pi(input);
mln_pixter(J) po(output);
@@ -92,18 +92,18 @@
po.val() = pi.val();
po.next();
}
- trace::exiting("level::impl::paste_fast");
+ trace::exiting("data::impl::paste_fast");
}
template <typename I, typename J>
void paste_fastest(const Image<I>& input_, Image<J>& output_)
{
- trace::entering("level::impl::paste_fastest");
+ trace::entering("data::impl::paste_fastest");
const I& input = exact(input_);
J& output = exact(output_);
- level::internal::paste_tests(input, output);
+ data::internal::paste_tests(input, output);
pixel<const I> src (input);
pixel<J> dst(output);
@@ -112,19 +112,19 @@
memcpy_(dst, src, input.nelements());
- trace::exiting("level::impl::paste_fastest");
+ trace::exiting("data::impl::paste_fastest");
}
template <typename I, typename J>
inline
void paste_lines(const Image<I>& input_, Image<J>& output_)
{
- trace::entering("level::impl::paste_lines");
+ trace::entering("data::impl::paste_lines");
const I& input = exact(input_);
J& output = exact(output_);
- level::internal::paste_tests(input, output);
+ data::internal::paste_tests(input, output);
mln_box_runstart_piter(I) p(input.domain());
for_all(p)
@@ -133,19 +133,19 @@
memcpy_(dst, make::pixel(input, p), p.run_length());
}
- trace::exiting("level::impl::paste_lines");
+ trace::exiting("data::impl::paste_lines");
}
template <typename I, typename J>
void paste_singleton(const Image<I>& input_, Image<J>& output_)
{
- trace::entering("level::impl::paste_singleton");
+ trace::entering("data::impl::paste_singleton");
const I& input = exact(input_);
- level::fill_with_value((output_ | input.domain()).rw(), input.val());
+ data::fill_with_value((output_ | input.domain()).rw(), input.val());
- trace::exiting("level::impl::paste_singleton");
+ trace::exiting("data::impl::paste_singleton");
}
} // end of namespace impl.
@@ -275,9 +275,9 @@
input, output);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/paste.spe.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/fill_with_image.hh
--- mln/data/fill_with_image.hh (revision 0)
+++ mln/data/fill_with_image.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_FILL_WITH_IMAGE_HH
# define MLN_LEVEL_FILL_WITH_IMAGE_HH
-/*! \file mln/level/fill_with_image.hh
+/*! \file mln/data/fill_with_image.hh
*
* \brief Fill an image with the values from another image.
*
@@ -39,13 +39,13 @@
// Specializations are in:
-# include <mln/level/fill_with_image.spe.hh>
+# include <mln/data/fill_with_image.spe.hh>
namespace mln
{
- namespace level
+ namespace data
{
/// Fill the image \p ima with the values of the image \p data.
@@ -87,7 +87,7 @@
mln_precondition(exact(ima).domain() <= exact(data).domain());
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
namespace impl
@@ -99,22 +99,22 @@
template <typename I, typename J>
void fill_with_image(Image<I>& ima_, const Image<J>& data_)
{
- trace::entering("level::impl::generic::fill_with_image");
+ trace::entering("data::impl::generic::fill_with_image");
I& ima = exact(ima_);
const J& data = exact(data_);
- level::internal::fill_with_image_tests(ima, data);
+ data::internal::fill_with_image_tests(ima, data);
mln_piter(I) p(ima.domain());
for_all(p)
ima(p) = data(p);
- trace::exiting("level::impl::generic::fill_with_image");
+ trace::exiting("data::impl::generic::fill_with_image");
}
- } // end if namespace mln::level::impl::generic
+ } // end if namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facade.
@@ -123,16 +123,16 @@
inline
void fill_with_image(Image<I>& ima, const Image<J>& data)
{
- trace::entering("level::fill_with_image");
+ trace::entering("data::fill_with_image");
internal::fill_with_image_(ima, data);
- trace::exiting("level::fill_with_image");
+ trace::exiting("data::fill_with_image");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/fill_with_image.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/fill_with_value.spe.hh
--- mln/data/fill_with_value.spe.hh (revision 0)
+++ mln/data/fill_with_value.spe.hh (working copy)
@@ -28,15 +28,15 @@
#ifndef MLN_LEVEL_FILL_WITH_VALUE_SPE_HH
# define MLN_LEVEL_FILL_WITH_VALUE_SPE_HH
-/// \file mln/level/fill_with_value.spe.hh
-/// Specializations for mln::level::fill_with_value.
+/// \file mln/data/fill_with_value.spe.hh
+/// Specializations for mln::data::fill_with_value.
///
# ifndef MLN_LEVEL_FILL_WITH_VALUE_HH
# error "Forbidden inclusion of *.spe.hh"
# endif // ! MLN_LEVEL_FILL_WITH_VALUE_HH
-# include <mln/level/memset_.hh>
+# include <mln/data/memset_.hh>
# ifndef MLN_INCLUDE_ONLY
@@ -44,7 +44,7 @@
namespace mln
{
- namespace level
+ namespace data
{
namespace internal
@@ -75,7 +75,7 @@
inline
void fill_with_value_one_block(Image<I>& ima_, const V& val)
{
- trace::entering("level::impl::fill_with_value_one_block");
+ trace::entering("data::impl::fill_with_value_one_block");
I& ima = exact(ima_);
@@ -87,16 +87,16 @@
mlc_is(mln_trait_image_value_access(I),
trait::image::value_access::direct))::check();
- level::memset_(ima, ima.point_at_index(0), val, ima.nelements());
+ data::memset_(ima, ima.point_at_index(0), val, ima.nelements());
- trace::exiting("level::impl::fill_with_value_one_block");
+ trace::exiting("data::impl::fill_with_value_one_block");
}
template <typename I, typename V>
inline
void fill_with_value_cell_wise(Image<I>& ima_, const V& val)
{
- trace::entering("level::impl::fill_with_value_cell_wise");
+ trace::entering("data::impl::fill_with_value_cell_wise");
I& ima = exact(ima_);
@@ -106,14 +106,14 @@
for_all(v)
v.change_to(val);
- trace::exiting("level::impl::fill_with_value_cell_wise");
+ trace::exiting("data::impl::fill_with_value_cell_wise");
}
template <typename I, typename V>
inline
void fill_with_value_singleton(Image<I>& ima_, const V& val)
{
- trace::entering("level::impl::fill_with_value_singleton");
+ trace::entering("data::impl::fill_with_value_singleton");
I& ima = exact(ima_);
@@ -125,10 +125,10 @@
ima.val() = val;
- trace::exiting("level::impl::fill_with_value_singleton");
+ trace::exiting("data::impl::fill_with_value_singleton");
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -206,10 +206,10 @@
ima, val);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/fill_with_value.spe.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/fill.hh
--- mln/data/fill.hh (revision 0)
+++ mln/data/fill.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_FILL_HH
# define MLN_LEVEL_FILL_HH
-/*! \file mln/level/fill.hh
+/*! \file mln/data/fill.hh
*
* \brief Fill an image, that is, set pixel values.
*
@@ -39,14 +39,14 @@
# include <mln/pw/image.hh>
# include <mln/convert/to_fun.hh>
-# include <mln/level/fill_with_image.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_image.hh>
+# include <mln/data/fill_with_value.hh>
namespace mln
{
- namespace level
+ namespace data
{
/*! Fill the whole image \p ima with the data provided by \p aux.
@@ -94,20 +94,20 @@
template <typename I>
void fill_dispatch_overload(I& ima, const mln_value(I)& v)
{
- mln::level::fill_with_value(ima, v);
+ mln::data::fill_with_value(ima, v);
}
template <typename I, typename J>
void fill_dispatch_overload(I& ima, const Image<J>& data)
{
- mln::level::fill_with_image(ima, data);
+ mln::data::fill_with_image(ima, data);
}
template <typename I, typename F>
void fill_dispatch_overload(I& ima, const Function<F>& f)
{
mlc_converts_to(mln_result(F), mln_value(I))::check();
- mln::level::fill_with_image(ima,
+ mln::data::fill_with_image(ima,
exact(f) | ima.domain());
}
@@ -115,7 +115,7 @@
void fill_dispatch_overload(I& ima, R (*f)(A))
{
mlc_converts_to(R, mln_value(I))::check();
- mln::level::fill_with_image(ima,
+ mln::data::fill_with_image(ima,
convert::to_fun(f) | ima.domain());
}
@@ -130,7 +130,7 @@
ima(p) = arr[i++];
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
// Facade.
@@ -139,18 +139,18 @@
inline
void fill(Image<I>& ima, const D& data)
{
- trace::entering("level::fill");
+ trace::entering("data::fill");
internal::fill_tests(ima, data);
internal::fill_dispatch(ima, data);
- trace::exiting("level::fill");
+ trace::exiting("data::fill");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/fill.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/essential.hh
--- mln/data/essential.hh (revision 0)
+++ mln/data/essential.hh (revision 0)
@@ -0,0 +1,40 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_DATA_ESSENTIAL_HH
+# define MLN_DATA_ESSENTIAL_HH
+
+/// \file mln/data/essential.hh
+///
+/// File that includes essential data-related routines.
+
+
+# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
+
+
+#endif // ! MLN_DATA_ESSENTIAL_HH
Index: mln/data/all.hh
--- mln/data/all.hh (revision 0)
+++ mln/data/all.hh (revision 0)
@@ -0,0 +1,60 @@
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// 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_DATA_ALL_HH
+# define MLN_DATA_ALL_HH
+
+/// \file mln/data/all.hh
+///
+/// File that includes all data-related routines.
+
+
+namespace mln
+{
+
+ /// Namespace of image processing routines related to pixel data.
+ namespace data
+ {
+
+ /// Implementation namespace of data namespace.
+ namespace impl {
+
+ /// Generic implementation namespace of data namespace.
+ namespace generic {}
+
+ }
+ }
+}
+
+
+# include <mln/data/fill.hh>
+# include <mln/data/paste.hh>
+
+
+
+#endif // ! MLN_DATA_ALL_HH
Index: mln/data/fill_with_image.spe.hh
--- mln/data/fill_with_image.spe.hh (revision 0)
+++ mln/data/fill_with_image.spe.hh (working copy)
@@ -28,9 +28,9 @@
#ifndef MLN_LEVEL_FILL_WITH_IMAGE_SPE_HH
# define MLN_LEVEL_FILL_WITH_IMAGE_SPE_HH
-/*! \file mln/level/fill_with_image.spe.hh
+/*! \file mln/data/fill_with_image.spe.hh
*
- * \brief Specializations for mln::level::fill_with_image.
+ * \brief Specializations for mln::data::fill_with_image.
*
*/
@@ -38,8 +38,8 @@
# error "Forbidden inclusion of *.spe.hh"
# endif // ! MLN_LEVEL_FILL_WITH_IMAGE_HH
-# include <mln/level/memcpy_.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/memcpy_.hh>
+# include <mln/data/fill_with_value.hh>
# include <mln/core/pixel.hh>
# include <mln/core/box_runstart_piter.hh>
# include <mln/border/get.hh>
@@ -50,7 +50,7 @@
namespace mln
{
- namespace level
+ namespace data
{
namespace internal
@@ -60,7 +60,7 @@
inline
void fill_with_image_tests(Image<I>& ima, const Image<J>& data);
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
@@ -76,12 +76,12 @@
template <typename I, typename J>
void fill_with_image_fastest(Image<I>& ima_, const Image<J>& data_)
{
- trace::entering("level::impl::fill_with_image_fastest");
+ trace::entering("data::impl::fill_with_image_fastest");
I& ima = exact(ima_);
const J& data = exact(data_);
- level::internal::fill_with_image_tests(ima, data);
+ data::internal::fill_with_image_tests(ima, data);
pixel<const J> src (data);
pixel<I> dst(ima);
@@ -90,18 +90,18 @@
memcpy_(dst, src, ima.nelements());
- trace::exiting("level::impl::fill_with_image_fastest");
+ trace::exiting("data::impl::fill_with_image_fastest");
}
template <typename I, typename J>
void fill_with_image_fast(Image<I>& ima_, const Image<J>& data_)
{
- trace::entering("level::impl::fill_with_image_fast");
+ trace::entering("data::impl::fill_with_image_fast");
I& ima = exact(ima_);
const J& data = exact(data_);
- level::internal::fill_with_image_tests(ima, data);
+ data::internal::fill_with_image_tests(ima, data);
mln_pixter(I) pi(ima);
mln_pixter(const J) d(data);
@@ -112,19 +112,19 @@
pi.val() = d.val();
d.next();
}
- trace::exiting("level::impl::fill_with_image_fast");
+ trace::exiting("data::impl::fill_with_image_fast");
}
template <typename I, typename J>
inline
void fill_with_image_lines(Image<I>& ima_, const Image<J>& data_)
{
- trace::entering("level::impl::fill_with_image_lines");
+ trace::entering("data::impl::fill_with_image_lines");
I& ima = exact(ima_);
const J& data = exact(data_);
- level::internal::fill_with_image_tests(ima, data);
+ data::internal::fill_with_image_tests(ima, data);
mln_box_runstart_piter(I) p(ima.domain());
for_all(p)
@@ -133,24 +133,24 @@
memcpy_(dst, make::pixel(data, p), p.run_length());
}
- trace::exiting("level::impl::fill_with_image_lines");
+ trace::exiting("data::impl::fill_with_image_lines");
}
template <typename I, typename J>
void fill_with_image_singleton(Image<I>& ima_,
const Image<J>& data_)
{
- trace::entering("level::impl::fill_with_image_singleton");
+ trace::entering("data::impl::fill_with_image_singleton");
const J& data = exact(data_);
- level::internal::fill_with_image_tests(ima_, data);
+ data::internal::fill_with_image_tests(ima_, data);
- level::fill_with_value(ima_, data.val());
+ data::fill_with_value(ima_, data.val());
- trace::exiting("level::impl::fill_with_image_singleton");
+ trace::exiting("data::impl::fill_with_image_singleton");
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
@@ -275,9 +275,9 @@
ima, data);
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/fill_with_image.spe.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/memcpy_.hh
--- mln/data/memcpy_.hh (revision 0)
+++ mln/data/memcpy_.hh (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,25 +26,25 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_LEVEL_MEMCPY__HH
-# define MLN_LEVEL_MEMCPY__HH
+#ifndef MLN_DATA_MEMCPY__HH
+# define MLN_DATA_MEMCPY__HH
-/*! \file mln/level/memcpy_.hh
- *
- * \brief Same as std::memcpy but for fastest images.
- *
- * \todo Overload with images and points; Cf. memset_.
- */
+/// \file mln/data/memcpy_.hh
+///
+/// Same as std::memcpy but for fastest images.
+///
+/// \todo Overload with images and points; Cf. memset_.
# include <cstring>
# include <mln/core/concept/image.hh>
# include <mln/core/pixel.hh>
# include <mln/metal/is_not_const.hh>
+
namespace mln
{
- namespace level
+ namespace data
{
/*! Copy \p n pixels starting from pixel \p src to destination
@@ -75,7 +76,7 @@
inline
void memcpy__(Pd& dest, const Ps& src, std::size_t n)
{
- trace::entering("level::impl::memcpy__");
+ trace::entering("data::impl::memcpy__");
typedef mln_image(Pd) Id;
typedef mln_image(Ps) Is;
@@ -102,7 +103,7 @@
*p_d++ = *p_s++;
}
- trace::exiting("level::impl::memcpy__");
+ trace::exiting("data::impl::memcpy__");
}
}
@@ -113,7 +114,7 @@
const Generalized_Pixel<Ps>& src_,
std::size_t n)
{
- trace::entering("level::memcpy_");
+ trace::entering("data::memcpy_");
typedef mln_image(Pd) Id;
metal::is_not_const<Id>::check();
@@ -140,14 +141,14 @@
impl::memcpy__(dest, src, n);
- trace::exiting("level::memcpy_");
+ trace::exiting("data::memcpy_");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
-#endif // ! MLN_LEVEL_MEMCPY__HH
+#endif // ! MLN_DATA_MEMCPY__HH
Property changes on: mln/data/memcpy_.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/memset_.hh
--- mln/data/memset_.hh (revision 0)
+++ mln/data/memset_.hh (working copy)
@@ -26,13 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_LEVEL_MEMSET__HH
-# define MLN_LEVEL_MEMSET__HH
+#ifndef MLN_DATA_MEMSET__HH
+# define MLN_DATA_MEMSET__HH
-/*! \file mln/level/memset_.hh
- *
- * \brief Same as std::memset but for fastest images.
- */
+/// \file mln/data/memset_.hh
+///
+/// Same as std::memset but for fastest images.
# include <cstring>
@@ -40,10 +39,11 @@
# include <mln/core/pixel.hh>
# include <mln/metal/is_not_const.hh>
+
namespace mln
{
- namespace level
+ namespace data
{
/*! Set \p n pixels at value \p v starting from pixel \p p.
@@ -86,7 +86,7 @@
inline
void memset__(P& pix, const mln_value(P)& v, std::size_t n)
{
- trace::entering("level::impl::memset_");
+ trace::entering("data::impl::memset_");
typedef mln_image(P) I;
if (n == 0)
@@ -113,10 +113,10 @@
*ptr++ = v;
}
- trace::exiting("level::impl::memset_");
+ trace::exiting("data::impl::memset_");
}
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
template <typename P>
@@ -124,7 +124,7 @@
void memset_(Generalized_Pixel<P>& pix_,
const mln_value(P)& v, std::size_t n)
{
- trace::entering("level::memset_");
+ trace::entering("data::memset_");
typedef mln_image(P) I;
metal::is_not_const<I>::check();
@@ -137,7 +137,7 @@
impl::memset__(pix, v, n);
- trace::exiting("level::memset_");
+ trace::exiting("data::memset_");
}
template <typename I>
@@ -145,7 +145,7 @@
void memset_(I& input, const mln_psite(I)& p,
const mln_value(I)& v, std::size_t n)
{
- trace::entering("level::memset_");
+ trace::entering("data::memset_");
mlc_is(mln_trait_image_speed(I), trait::image::speed::fastest)::check();
@@ -156,14 +156,14 @@
pixel<I> pix(input, p);
impl::memset__(pix, v, n);
- trace::exiting("level::memset_");
+ trace::exiting("data::memset_");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
-#endif // ! MLN_LEVEL_MEMSET__HH
+#endif // ! MLN_DATA_MEMSET__HH
Property changes on: mln/data/memset_.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/paste.hh
--- mln/data/paste.hh (revision 0)
+++ mln/data/paste.hh (working copy)
@@ -28,7 +28,7 @@
#ifndef MLN_LEVEL_PASTE_HH
# define MLN_LEVEL_PASTE_HH
-/*! \file mln/level/paste.hh
+/*! \file mln/data/paste.hh
*
* \brief Paste the contents of an image into another one.
*
@@ -39,14 +39,14 @@
// Specializations are in:
-# include <mln/level/paste.spe.hh>
+# include <mln/data/paste.spe.hh>
namespace mln
{
- namespace level
+ namespace data
{
/// \brief Paste the contents of image \p input into the image \p
@@ -93,7 +93,7 @@
(void)output;
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
namespace impl
{
@@ -105,9 +105,9 @@
inline
void paste(const Image<I>& input_, Image<J>& output_)
{
- trace::entering("level::impl::generic::paste");
+ trace::entering("data::impl::generic::paste");
- level::internal::paste_tests(input_, output_);
+ data::internal::paste_tests(input_, output_);
const I& input = exact(input_);
J& output = exact(output_);
@@ -117,12 +117,12 @@
for_all(p)
output(p) = input(p);
- trace::exiting("level::impl::generic::paste");
+ trace::exiting("data::impl::generic::paste");
}
- } // end of namespace mln::level::impl::generic
+ } // end of namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facade.
@@ -131,18 +131,18 @@
inline
void paste(const Image<I>& input, Image<J>& output)
{
- trace::entering("level::paste");
+ trace::entering("data::paste");
internal::paste_tests(input, output);
internal::paste_(input, output);
- trace::exiting("level::paste");
+ trace::exiting("data::paste");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/paste.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/data/fill_with_value.hh
--- mln/data/fill_with_value.hh (revision 0)
+++ mln/data/fill_with_value.hh (working copy)
@@ -29,7 +29,7 @@
#ifndef MLN_LEVEL_FILL_WITH_VALUE_HH
# define MLN_LEVEL_FILL_WITH_VALUE_HH
-/// \file mln/level/fill_with_value.hh
+/// \file mln/data/fill_with_value.hh
///
/// Fill an image with a value, that is, set all pixel values to
/// the given value.
@@ -45,13 +45,13 @@
// Specializations are in:
-# include <mln/level/fill_with_value.spe.hh>
+# include <mln/data/fill_with_value.spe.hh>
namespace mln
{
- namespace level
+ namespace data
{
/// Fill the whole image \p ima with the single value \p v.
@@ -84,7 +84,7 @@
(void) ima;
}
- } // end of namespace mln::level::internal
+ } // end of namespace mln::data::internal
namespace impl
@@ -96,7 +96,7 @@
template <typename I, typename V>
void fill_with_value(Image<I>& ima_, const V& val)
{
- trace::entering("level::impl::generic::fill_with_value");
+ trace::entering("data::impl::generic::fill_with_value");
I& ima = exact(ima_);
@@ -109,12 +109,12 @@
for_all(p)
ima(p) = v;
- trace::exiting("level::impl::generic::fill_with_value");
+ trace::exiting("data::impl::generic::fill_with_value");
}
- } // end if namespace mln::level::impl::generic
+ } // end if namespace mln::data::impl::generic
- } // end of namespace mln::level::impl
+ } // end of namespace mln::data::impl
// Facade.
@@ -123,18 +123,18 @@
inline
void fill_with_value(Image<I>& ima, const V& val)
{
- trace::entering("level::fill_with_value");
+ trace::entering("data::fill_with_value");
internal::fill_with_value_tests(ima, val);
internal::fill_with_value_dispatch(ima, val);
- trace::exiting("level::fill_with_value");
+ trace::exiting("data::fill_with_value");
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::level
+ } // end of namespace mln::data
} // end of namespace mln
Property changes on: mln/data/fill_with_value.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/linear/gaussian.hh
--- mln/linear/gaussian.hh (revision 3073)
+++ mln/linear/gaussian.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/alias/point2d.hh>
-# include <mln/level/paste.hh>
+# include <mln/data/paste.hh>
# include <mln/geom/ncols.hh>
# include <mln/geom/nrows.hh>
@@ -476,7 +476,7 @@
Image<O>& out)
{
mln_ch_value(O, float) work_img(exact(in).domain());
- level::paste(in, work_img);
+ data::paste(in, work_img);
extension::adjust_fill(work_img, 4, 0);
// On tiny sigma, Derich algorithm doesn't work.
@@ -487,7 +487,7 @@
work_img, coef, i);
// We don't need to convert work_img
- level::paste(work_img, out);
+ data::paste(work_img, out);
}
template <class I, class F, class O>
@@ -501,7 +501,7 @@
int dir)
{
mln_ch_value(O, float) work_img(exact(in).domain());
- level::paste(in, work_img);
+ data::paste(in, work_img);
extension::adjust_fill(work_img, 4, 0);
// On tiny sigma, Derich algorithm doesn't work.
@@ -511,7 +511,7 @@
work_img, coef, dir);
// We don't need to convert work_img
- level::paste(work_img, out);
+ data::paste(work_img, out);
}
@@ -525,7 +525,7 @@
Image<O>& out)
{
mln_ch_value(O, float) work_img(exact(in).domain());
- level::paste(in, work_img);
+ data::paste(in, work_img);
extension::adjust_fill(work_img, 4, 0);
// On tiny sigma, Derich algorithm doesn't work.
@@ -536,7 +536,7 @@
work_img, coef, i);
// Convert work_img into result type
- level::paste(level::stretch(mln_value(I)(), work_img), out);
+ data::paste(level::stretch(mln_value(I)(), work_img), out);
}
template <class I, class F, class O>
@@ -550,7 +550,7 @@
int dir)
{
mln_ch_value(O, float) work_img(exact(in).domain());
- level::paste(in, work_img);
+ data::paste(in, work_img);
extension::adjust_fill(work_img, 4, 0);
// On tiny sigma, Derich algorithm doesn't work.
@@ -560,7 +560,7 @@
work_img, coef, dir);
// Convert work_img into result type
- level::paste(level::stretch(mln_value(I)(), work_img), out);
+ data::paste(level::stretch(mln_value(I)(), work_img), out);
}
@@ -577,7 +577,7 @@
// typedef algebra::vec<3, float> vec3f;
// mln_ch_value(O, vec3f) work_img(exact(in).domain());
// FIXME : paste does not work (rgb8 -> vec3f).
- level::paste(in, out);
+ data::paste(in, out);
// On tiny sigma, Derich algorithm doesn't work.
// It is the same thing that to convolve with a Dirac.
@@ -600,7 +600,7 @@
// typedef algebra::vec<3, float> vec3f;
// mln_ch_value(O, vec3f) work_img(exact(in).domain());
// FIXME : paste does not work (rgb8 -> vec3f).
- level::paste(in, out);
+ data::paste(in, out);
// On tiny sigma, Derich algorithm doesn't work.
// It is the same thing that to convolve with a Dirac.
Index: mln/border/resize.hh
--- mln/border/resize.hh (revision 3073)
+++ mln/border/resize.hh (working copy)
@@ -42,7 +42,7 @@
# include <mln/core/routine/clone.hh>
# include <mln/core/routine/primary.hh>
# include <mln/border/get.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
namespace mln
@@ -81,7 +81,7 @@
mln_concrete(I) memo = clone(ima);
ima.resize_(thickness);
- level::fill(ima, memo);
+ data::fill(ima, memo);
mln_postcondition(border::get(ima) == thickness);
}
Index: mln/convert/to_image.hh
--- mln/convert/to_image.hh (revision 3073)
+++ mln/convert/to_image.hh (working copy)
@@ -41,7 +41,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/geom/bbox.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/histo/data.hh>
# include <mln/core/image/image1d.hh>
@@ -94,7 +94,7 @@
const S& pset = exact(pset_);
mln_image_from_grid(mln_site(S)::grid, bool) ima;
ima.init_(geom::bbox(pset).to_larger(border));
- level::fill(ima, false);
+ data::fill(ima, false);
mln_piter(S) p(pset);
for_all(p)
ima(p) = true;
Index: mln/geom/resize.hh
--- mln/geom/resize.hh (revision 3073)
+++ mln/geom/resize.hh (working copy)
@@ -83,7 +83,7 @@
unsigned n = (unsigned)(1 / ratio);
I output (new_cols);
- level::fill(output, 0);
+ data::fill(output, 0);
for (unsigned j = 0; j < cols; ++j)
{
Index: mln/geom/chamfer.hh
--- mln/geom/chamfer.hh (revision 3073)
+++ mln/geom/chamfer.hh (working copy)
@@ -89,8 +89,8 @@
void init() { initialize(output, exact(input));
fill_output();
// Was :
- // level::fill((output | (input | pw::cst(true)).domain()).rw(), 0);
- // level::fill((output | (input | pw::cst(false)).domain()).rw(), max);
+ // data::fill((output | (input | pw::cst(true)).domain()).rw(), 0);
+ // data::fill((output | (input | pw::cst(false)).domain()).rw(), max);
}
inline
bool handles(const P& p) const { return input(p) == false; }
Index: mln/morpho/tree/compute_attribute_image.hh
--- mln/morpho/tree/compute_attribute_image.hh (revision 3073)
+++ mln/morpho/tree/compute_attribute_image.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/util/pix.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
@@ -93,7 +93,7 @@
// few accumulators, e.g., for accu::rank which has the 'k'
// attribute.
A a = exact(a_);
- level::fill(acc, a);
+ data::fill(acc, a);
}
{
// Initialize every attribute with the corresponding pixel.
@@ -122,7 +122,7 @@
typedef typename T::function I;
mln_ch_value(I, mln_result(A)) output;
initialize(output, acc);
- level::fill(output, acc);
+ data::fill(output, acc);
trace::exiting("morpho::tree::compute_attribute_image");
return output;
Index: mln/morpho/tree/compute_parent.hh
--- mln/morpho/tree/compute_parent.hh (revision 3073)
+++ mln/morpho/tree/compute_parent.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
@@ -156,7 +156,7 @@
initialize(zpar, f);
// Initialization.
- level::fill(deja_vu, false);
+ data::fill(deja_vu, false);
// Body.
mln_bkd_piter(S) p(s);
Index: mln/morpho/elementary/like_ero_set.hh
--- mln/morpho/elementary/like_ero_set.hh (revision 3073)
+++ mln/morpho/elementary/like_ero_set.hh (working copy)
@@ -83,7 +83,7 @@
else
{
initialize(output, input);
- level::fill(output, false);
+ data::fill(output, false);
}
mln_piter(I) p(input.domain());
@@ -126,7 +126,7 @@
else
{
initialize(output, input);
- level::fill(output, false);
+ data::fill(output, false);
}
mln_pixter(const I) p_in(input);
Index: mln/morpho/elementary/gradient.hh
--- mln/morpho/elementary/gradient.hh (revision 3073)
+++ mln/morpho/elementary/gradient.hh (working copy)
@@ -114,7 +114,7 @@
mln_concrete(I) output;
initialize(output, input);
- level::fill(output, false);
+ data::fill(output, false);
mln_piter(I) p(input.domain());
mln_niter(N) n(nbh, p);
Index: mln/morpho/hit_or_miss.hh
--- mln/morpho/hit_or_miss.hh (revision 3073)
+++ mln/morpho/hit_or_miss.hh (working copy)
@@ -191,7 +191,7 @@
mln_concrete(I)
ero_fg = erosion(input, win_hit),
dil_bg = dilation(input, win_miss);
- level::fill(output,
+ data::fill(output,
fun::p2v::ternary(pw::value(input) == pw::value(ero_fg)
&& pw::value(dil_bg) < pw::value(input),
fun::cast<V>(pw::value(input) - pw::value(dil_bg)),
@@ -202,21 +202,21 @@
mln_concrete(I)
ero_bg = erosion(input, win_miss),
dil_fg = dilation(input, win_hit);
- level::fill(output,
+ data::fill(output,
fun::p2v::ternary(pw::value(input) == pw::value(dil_fg)
&& pw::value(ero_bg) > pw::value(input),
fun::cast<V>(pw::value(ero_bg) - pw::value(input)),
pw::cst(zero_V)));
}
else
- level::fill(output, zero_V);
+ data::fill(output, zero_V);
}
else // Unconstrained: UHMT.
{
mln_concrete(I)
ero = erosion(input, win_hit),
dil = dilation(input, win_miss);
- level::fill(output,
+ data::fill(output,
fun::p2v::ternary(pw::value(dil) < pw::value(ero),
fun::cast<V>(pw::value(ero) - pw::value(dil)),
pw::cst(zero_V)));
Index: mln/morpho/laplacian.hh
--- mln/morpho/laplacian.hh (revision 3073)
+++ mln/morpho/laplacian.hh (working copy)
@@ -71,7 +71,7 @@
mln_concrete(I)
d_I = morpho::minus(dilation(input, win), input),
e_I = morpho::minus(input, erosion(input, win));
- level::fill(output, d_I - e_I);
+ data::fill(output, d_I - e_I);
trace::exiting("morpho::laplacian");
}
Index: mln/morpho/Rd.hh
--- mln/morpho/Rd.hh (revision 3073)
+++ mln/morpho/Rd.hh (working copy)
@@ -44,7 +44,7 @@
# include <mln/trait/value_.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/level/compare.hh>
# include <mln/util/greater_point.hh>
@@ -121,9 +121,9 @@
parent(f.domain())
{
// init
- level::fill(o, f);
+ data::fill(o, f);
S = histo_reverse_sort(g);
- level::fill(is_proc, false); // FIXME: rm
+ data::fill(is_proc, false); // FIXME: rm
// first pass
for (unsigned i = 0; i < S.size(); ++i)
Index: mln/morpho/includes.hh
--- mln/morpho/includes.hh (revision 3073)
+++ mln/morpho/includes.hh (working copy)
@@ -54,7 +54,7 @@
# include <mln/fun/v2v/saturate.hh>
# include <mln/level/compare.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/test/positive.hh>
Index: mln/morpho/skeleton_constrained.hh
--- mln/morpho/skeleton_constrained.hh (revision 3073)
+++ mln/morpho/skeleton_constrained.hh (working copy)
@@ -39,7 +39,7 @@
# include <mln/core/site_set/p_queue_fast.hh>
# include <mln/core/site_set/p_priority.hh>
# include <mln/extension/adjust_duplicate.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
namespace mln
@@ -87,7 +87,7 @@
// Initialization.
{
initialize(output, input);
- level::fill(output, input);
+ data::fill(output, input);
extension::adjust_duplicate(output, nbh);
mln_piter(I) p(input.domain());
Index: mln/morpho/meyer_wst.hh
--- mln/morpho/meyer_wst.hh (revision 3073)
+++ mln/morpho/meyer_wst.hh (working copy)
@@ -133,7 +133,7 @@
// In_queue structure to avoid processing sites several times.
mln_ch_value(I, bool) in_queue;
initialize(in_queue, input);
- level::fill(in_queue, false);
+ data::fill(in_queue, false);
// Insert every neighbor P of every marked area in a
// hierarchical queue, with a priority level corresponding to
Index: mln/canvas/distance_front.hh
--- mln/canvas/distance_front.hh (revision 3073)
+++ mln/canvas/distance_front.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/concept/weighted_window.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/accu/max.hh>
@@ -83,7 +83,7 @@
// Distance map.
mln_ch_value(I, D) dmap;
initialize(dmap, input);
- level::fill(dmap, max);
+ data::fill(dmap, max);
// Mod determination.
unsigned mod;
Index: mln/canvas/morpho/algebraic_union_find.hh
--- mln/canvas/morpho/algebraic_union_find.hh (revision 3073)
+++ mln/canvas/morpho/algebraic_union_find.hh (working copy)
@@ -29,14 +29,13 @@
#ifndef MLN_CANVAS_MORPHO_ALGEBRAIC_UNION_FIND_HH
# define MLN_CANVAS_MORPHO_ALGEBRAIC_UNION_FIND_HH
-/*! \file mln/canvas/morpho/algebraic_union_find.hh
- *
- * \brief FIXME: Doc!
- */
+/// \file mln/canvas/morpho/algebraic_union_find.hh
+///
+/// FIXME: Doc!
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/util/pix.hh>
@@ -105,7 +104,7 @@
// init
{
initialize(deja_vu, input);
- mln::level::fill(deja_vu, false);
+ mln::data::fill(deja_vu, false);
initialize(parent, input);
initialize(data, input);
f.init(); // init required.
@@ -192,7 +191,7 @@
Change 2nd pass into:
for_all(p) if (not is_root(p)) output(p) = output(parent(p));
and add in init:
- mln::level::assign(output, input);
+ mln::data::fill(output, input);
*/
trace::exiting("canvas::morpho::algebraic_union_find");
}
@@ -231,7 +230,7 @@
// init
{
initialize(deja_vu, f.input);
- mln::level::fill(deja_vu, false);
+ mln::data::fill(deja_vu, false);
initialize(parent, f.input);
initialize(data, f.input);
f.init();
@@ -265,7 +264,7 @@
Change 2nd pass into:
for_all(p) if (not is_root(p)) f.output(p) = f.output(parent(p));
and add in init:
- mln::level::assign(f.output, f.input);
+ mln::data::fill(f.output, f.input);
*/
} // end of run()
Index: mln/canvas/distance_geodesic.hh
--- mln/canvas/distance_geodesic.hh (revision 3073)
+++ mln/canvas/distance_geodesic.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/site_set/p_queue_fast.hh>
# include <mln/core/routine/clone.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
namespace mln
@@ -79,7 +79,7 @@
// Initialization.
{
functor.init(input); // <-- init
- level::fill(dmap, max);
+ data::fill(dmap, max);
mln_piter(I) p(input.domain());
mln_niter(N) n(nbh, p);
for_all(p)
Index: mln/canvas/labeling.hh
--- mln/canvas/labeling.hh (revision 3073)
+++ mln/canvas/labeling.hh (working copy)
@@ -36,7 +36,7 @@
/// \todo Make the fastest version work.
# include <mln/core/concept/image.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/literal/zero.hh>
# include <mln/convert/to_upper_window.hh>
@@ -129,12 +129,12 @@
// Initialization.
{
initialize(deja_vu, input);
- mln::level::fill(deja_vu, false);
+ mln::data::fill(deja_vu, false);
initialize(parent, input);
initialize(output, input);
- mln::level::fill(output, L(literal::zero));
+ mln::data::fill(output, L(literal::zero));
nlabels = 0;
f.init(); // Client initialization.
@@ -274,7 +274,7 @@
for (unsigned p = 0; p < parent.nelements(); ++p)
parent.element(p) = p; // make_set
initialize(output, f.input);
- mln::level::fill(output, 0); // FIXME: Use literal::zero.
+ mln::data::fill(output, 0); // FIXME: Use literal::zero.
nlabels = 0;
}
Index: mln/extension/fill.hh
--- mln/extension/fill.hh (revision 3073)
+++ mln/extension/fill.hh (working copy)
@@ -39,7 +39,7 @@
# include <mln/core/concept/image.hh>
# include <mln/trait/image/props.hh>
# include <mln/border/fill.hh>
-# include <mln/level/fill_with_value.hh>
+# include <mln/data/fill_with_value.hh>
namespace mln
Index: mln/util/tree_to_image.hh
--- mln/util/tree_to_image.hh (revision 3073)
+++ mln/util/tree_to_image.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/core/image/image2d.hh>
# include <mln/util/tree.hh>
# include <mln/core/site_set/p_set.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
namespace mln
{
@@ -162,7 +162,7 @@
const J& ima = exact(ima_);
image2d<bool> out(ima.bbox());
- level::fill(out, false);
+ data::fill(out, false);
mln_piter(p_set<P>) p(s);
for_all(p)
out(p) = true;
@@ -219,7 +219,7 @@
const J& ima = exact(ima_);
image2d<bool> output(ima.domain());
- level::fill(output, false);
+ data::fill(output, false);
impl::display_branch_rec(ima, tree_node, output);
trace::exiting("util::display_branch");
Index: mln/labeling/blobs.hh
--- mln/labeling/blobs.hh (revision 3073)
+++ mln/labeling/blobs.hh (working copy)
@@ -38,7 +38,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/core/site_set/p_queue_fast.hh>
@@ -91,7 +91,7 @@
nlabels = literal::zero;
mln_ch_value(I, L) output;
initialize(output, input);
- level::fill(output, zero);
+ data::fill(output, zero);
// Loop.
mln_piter(I) p(input.domain());
Index: mln/labeling/level.hh
--- mln/labeling/level.hh (revision 3073)
+++ mln/labeling/level.hh (working copy)
@@ -37,7 +37,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/canvas/labeling.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
// The 'fastest' specialization is in:
# include <mln/labeling/level.spe.hh>
Index: mln/labeling/regional_minima.hh
--- mln/labeling/regional_minima.hh (revision 3073)
+++ mln/labeling/regional_minima.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/canvas/labeling.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/level/sort_psites.hh>
@@ -84,7 +84,7 @@
const N& nbh;
S s;
- void init() { level::fill(attr, true); }
+ void init() { data::fill(attr, true); }
bool handles(const P&) const { return true; }
bool labels(const P& p) const { return attr(p); }
bool equiv(const P& n, const P& p) const { return input(n) ==
Index: mln/labeling/regional_maxima.hh
--- mln/labeling/regional_maxima.hh (revision 3073)
+++ mln/labeling/regional_maxima.hh (working copy)
@@ -36,7 +36,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/canvas/labeling.hh>
-# include <mln/level/fill.hh>
+# include <mln/data/fill.hh>
# include <mln/level/sort_psites.hh>
@@ -85,7 +85,7 @@
const N& nbh;
S s;
- void init() { level::fill(attr, true); }
+ void init() { data::fill(attr, true); }
bool handles(const P&) const { return true; }
bool labels(const P& p) const { return attr(p); }
bool equiv(const P& n, const P& p) const { return input(n) ==
Index: tests/debug/println_with_border.cc
--- tests/debug/println_with_border.cc (revision 3073)
+++ tests/debug/println_with_border.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/image/image1d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/debug/println_with_border.hh>
#include <mln/opt/at.hh>
Index: tests/debug/println.cc
--- tests/debug/println.cc (revision 3073)
+++ tests/debug/println.cc (working copy)
@@ -31,7 +31,7 @@
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/opt/at.hh>
Index: tests/core/other/clock_test.cc
--- tests/core/other/clock_test.cc (revision 3073)
+++ tests/core/other/clock_test.cc (working copy)
@@ -28,7 +28,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/clock_neighb2d.hh>
#include <mln/debug/println.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/labeling/level.hh>
#include <mln/core/alias/neighb2d.hh>
@@ -150,7 +150,7 @@
a5, a6, a7};
- level::fill(ima, t);
+ data::fill(ima, t);
image2d<unsigned> out = labeling::level(ima, false, c8(), n);
tmp = testc4(ima, p);
@@ -171,11 +171,11 @@
/// 0 before
- level::fill(ima, u);
+ data::fill(ima, u);
out = labeling::level(ima, false, c4(), m);
/// 1 after
- level::fill(ima, t);
+ data::fill(ima, t);
image2d<unsigned> out2 = labeling::level(ima, false, c4(), n);
int diff = n - m;
Index: tests/core/image/sub_image.cc
--- tests/core/image/sub_image.cc (revision 3073)
+++ tests/core/image/sub_image.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/image/sub_image.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
@@ -43,11 +43,11 @@
using namespace mln;
image2d<int> ima(8, 8);
- level::fill(ima, 0);
+ data::fill(ima, 0);
debug::println(ima);
- level::fill((ima | make::box2d(1,1, 3,3)).rw(), 5);
- level::fill((ima | make::box2d(4,4, 6,6)).rw(), 1);
+ data::fill((ima | make::box2d(1,1, 3,3)).rw(), 5);
+ data::fill((ima | make::box2d(4,4, 6,6)).rw(), 1);
debug::println(ima);
}
Index: tests/core/image/cast_image.cc
--- tests/core/image/cast_image.cc (revision 3073)
+++ tests/core/image/cast_image.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/fun/p2b/chess.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/core/image/cast_image.hh>
@@ -42,7 +42,7 @@
using namespace mln;
image2d<bool> ima(8, 8);
- level::fill(ima, fun::p2b::chess());
+ data::fill(ima, fun::p2b::chess());
debug::println(ima);
debug::println( cast_image<int>(ima) );
}
Index: tests/core/image/sparse_image.cc
--- tests/core/image/sparse_image.cc (revision 3073)
+++ tests/core/image/sparse_image.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
@@ -74,8 +74,8 @@
std::cout << n << ", compression ratio: " << sparse.compression()
<< std::endl;
- level::fill(cmp, literal::zero);
- level::paste(sparse, cmp);
+ data::fill(cmp, literal::zero);
+ data::paste(sparse, cmp);
mln_assertion(cmp == level::transform(labels, fold_t()));
}
Index: tests/core/image/obased_rle_image.cc
--- tests/core/image/obased_rle_image.cc (revision 3073)
+++ tests/core/image/obased_rle_image.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
@@ -73,8 +73,8 @@
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
- level::fill(cmp, literal::zero);
- level::paste(rle, cmp);
+ data::fill(cmp, literal::zero);
+ data::paste(rle, cmp);
mln_assertion(cmp == level::transform(labels, fold_t()));
}
Index: tests/core/image/value_enc_image.cc
--- tests/core/image/value_enc_image.cc (revision 3073)
+++ tests/core/image/value_enc_image.cc (working copy)
@@ -40,7 +40,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
#include <mln/core/alias/p_runs2d.hh>
@@ -146,8 +146,8 @@
value_enc_image<point2d, int_u8> val_enc =
value_encode(level::transform(labels, fold_t()));
- level::fill(cmp, literal::zero);
- level::paste(val_enc, cmp);
+ data::fill(cmp, literal::zero);
+ data::paste(val_enc, cmp);
std::cout << val_enc.values().size() << std::endl;
mln_assertion(cmp == level::transform(labels, fold_t()));
Index: tests/core/image/plain.cc
--- tests/core/image/plain.cc (revision 3073)
+++ tests/core/image/plain.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/value/int_u8.hh>
#include <mln/level/compare.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
@@ -81,20 +81,20 @@
{
image2d<int_u8> lena(12,12);
- level::fill(lena, 42);
+ data::fill(lena, 42);
point2d p1(0,0);
point2d p2(5,4);
image2d< image2d<int_u8> > ima(2,2);
- level::fill(ima, lena);
+ data::fill(ima, lena);
// The 4 pixels of ima share the same data (holded by lena).
// Then this update will affect the 4 pixels of ima.
ima(p1)(p2) = 0;
// ima(0,0)(p2) == ima(0,1)(p2) == ima(1,0)(p2) == ima(1,1)(p2) == 0
image2d< plain< image2d<int_u8> > > ima_plain(2,2);
- level::fill(ima_plain, plain< image2d<int_u8> >(lena));
+ data::fill(ima_plain, plain< image2d<int_u8> >(lena));
// The 4 pixels of ima_plain are instances of plain<
// image2d<int_u8> >. So each of them hold their own data. Then
// this update will affect just one pixel at the coordinate 0,0 of
Index: tests/core/image/bgraph_image.cc
--- tests/core/image/bgraph_image.cc (revision 3073)
+++ tests/core/image/bgraph_image.cc (working copy)
@@ -33,8 +33,8 @@
#include <mln/value/int_u8.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/image/bgraph_image.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/paste.hh>
#include <mln/debug/println.hh>
@@ -98,8 +98,8 @@
{
using value::int_u8;
image2d<int_u8> ima_(ima.bbox());
- level::fill(ima_, 0);
- level::paste(ima, ima_);
+ data::fill(ima_, 0);
+ data::paste(ima, ima_);
debug::println(ima_);
}
Index: tests/core/image/fi_adaptor.cc
--- tests/core/image/fi_adaptor.cc (revision 3073)
+++ tests/core/image/fi_adaptor.cc (working copy)
@@ -35,7 +35,7 @@
#include <mln/value/int_u8.hh>
#include <mln/value/rgb8.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/median.hh>
#include <mln/display/show.hh>
@@ -75,7 +75,7 @@
level::median(adaptor, rect, ima);
- level::paste(ima, adaptor);
+ data::paste(ima, adaptor);
display::save (adaptor);
// FIXME: Don't use display::show in batch tests.
Index: tests/core/image/mono_rle_image.cc
--- tests/core/image/mono_rle_image.cc (revision 3073)
+++ tests/core/image/mono_rle_image.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
@@ -79,8 +79,8 @@
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
- level::fill(cmp, literal::zero);
- level::paste(rle, cmp);
+ data::fill(cmp, literal::zero);
+ data::paste(rle, cmp);
mln_assertion(cmp == level::transform(labels, only_two_t()));
}
Index: tests/core/image/rle_image.cc
--- tests/core/image/rle_image.cc (revision 3073)
+++ tests/core/image/rle_image.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
@@ -73,8 +73,8 @@
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
- level::fill(cmp, literal::zero);
- level::paste(rle, cmp);
+ data::fill(cmp, literal::zero);
+ data::paste(rle, cmp);
mln_assertion(cmp == level::transform(labels, fold_t()));
}
Index: tests/core/image/mono_obased_rle_image.cc
--- tests/core/image/mono_obased_rle_image.cc (revision 3073)
+++ tests/core/image/mono_obased_rle_image.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/labeling/blobs.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
@@ -73,8 +73,8 @@
std::cout << n << ", compression ratio: " << rle.compression() << std::endl;
- level::fill(cmp, literal::zero);
- level::paste(rle, cmp);
+ data::fill(cmp, literal::zero);
+ data::paste(rle, cmp);
mln_assertion(cmp == level::transform(labels, fold_t()));
}
Index: tests/core/image/interpolated.cc
--- tests/core/image/interpolated.cc (revision 3073)
+++ tests/core/image/interpolated.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/algebra/vec.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
Index: tests/draw/graph.cc
--- tests/draw/graph.cc (revision 3073)
+++ tests/draw/graph.cc (working copy)
@@ -73,7 +73,7 @@
mln::p_vertices<G, F> pg(g, fpoints);
image2d<int> ima(nrows, ncols);
- level::fill(ima, 0);
+ data::fill(ima, 0);
debug::draw_graph(ima, pg, 2, 1);
mln_assertion(ima == ref);
}
Index: tests/draw/line.cc
--- tests/draw/line.cc (revision 3073)
+++ tests/draw/line.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/core/image/sub_image.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/level/compare.hh>
#include <mln/draw/line.hh>
#include <mln/debug/println.hh>
@@ -51,18 +51,18 @@
mln_assertion(l.nsites() == 10);
image2d<bool> ima(10,10);
- level::fill(ima, false);
+ data::fill(ima, false);
draw::line(ima, b, e, true);
image2d<bool> ima2(10,10);
- level::fill(ima2, false);
- level::paste(pw::cst(true) | l, ima2);
+ data::fill(ima2, false);
+ data::paste(pw::cst(true) | l, ima2);
mln_assertion(ima2 == ima);
image2d<bool> ima3(10,10);
- level::fill(ima3, false);
- level::fill((ima3 | l).rw(), true);
+ data::fill(ima3, false);
+ data::fill((ima3 | l).rw(), true);
mln_assertion(ima3 == ima);
}
Index: tests/opt/at.cc
--- tests/opt/at.cc (revision 3073)
+++ tests/opt/at.cc (working copy)
@@ -41,8 +41,8 @@
#include <mln/core/image/image_if.hh>
#include <mln/core/image/extension_val.hh>*/
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/opt/at.hh>
@@ -78,7 +78,7 @@
const II csub_ima(ima, make::box1d(4, 10));
point1d p(5);
- level::fill(ima, 51);
+ data::fill(ima, 51);
mln_assertion(csub_ima(p) == opt::at(csub_ima, 5));
opt::at(sub_ima, 5) = 12;
mln_assertion(sub_ima(p) == 12);
@@ -92,7 +92,7 @@
const II ccast(in);
point1d p(5);
- level::fill(in, 51);
+ data::fill(in, 51);
mln_assertion(ccast(p) == opt::at(ccast, 5));
// FIXME
//opt::at(cast, 5) = 12;
@@ -120,7 +120,7 @@
const II csub_ima(ima, make::box2d(4, 4, 10, 10));
point2d p(5, 5);
- level::fill(ima, 51);
+ data::fill(ima, 51);
mln_assertion(csub_ima(p) == opt::at(csub_ima, 5, 5));
opt::at(sub_ima, 5, 5) = 12;
mln_assertion(sub_ima(p) == 12);
@@ -134,7 +134,7 @@
const II ccast(in);
point2d p(5,5);
- level::fill(in, 51);
+ data::fill(in, 51);
mln_assertion(ccast(p) == opt::at(ccast, 5, 5));
// FIXME
//opt::at(cast, 5) = 12;
Index: tests/level/transform_full.cc
--- tests/level/transform_full.cc (revision 3073)
+++ tests/level/transform_full.cc (working copy)
@@ -48,7 +48,7 @@
#include <mln/value/int_s8.hh>
#include <mln/value/int_s16.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/level/transform.hh>
#include <mln/debug/iota.hh>
Index: tests/level/sort_psites_full.cc
--- tests/level/sort_psites_full.cc (revision 3073)
+++ tests/level/sort_psites_full.cc (working copy)
@@ -50,7 +50,7 @@
#include <mln/debug/iota.hh>
#include <mln/level/saturate.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/level/sort_psites.hh>
Index: tests/level/paste_full.cc
--- tests/level/paste_full.cc (revision 3073)
+++ tests/level/paste_full.cc (working copy)
@@ -25,9 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/paste_full.cc
+/*! \file tests/data/paste_full.cc
*
- * \brief Tests on mln::level::paste.
+ * \brief Tests on mln::data::paste.
*/
@@ -52,7 +52,7 @@
#include <mln/debug/iota.hh>
#include <mln/level/saturate.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
@@ -113,7 +113,7 @@
if (max_i > max_j)
level::saturate_inplace(input, 0, (T)max_j);
- level::paste(input, output);
+ data::paste(input, output);
mln_piter(I) p (input.domain ());
for_all(p)
@@ -274,7 +274,7 @@
unsigned rows = 4;
unsigned cols = 16;
- std::cerr << "Tests level::paste:" << std::endl;
+ std::cerr << "Tests data::paste:" << std::endl;
std::cerr << "on int:" << std::endl;
ch<int>(slis, rows, cols);
std::cerr << "on unsigned:" << std::endl;
Index: tests/level/transform.cc
--- tests/level/transform.cc (revision 3073)
+++ tests/level/transform.cc (working copy)
@@ -42,9 +42,9 @@
#include <mln/core/image/extension_val.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/core/var.hh>
@@ -101,7 +101,7 @@
{
image2d<unsigned short> ima(size, size);
- level::fill_with_value(ima, 51);
+ data::fill_with_value(ima, 51);
level::transform(ima, mysqrt());
}
@@ -126,7 +126,7 @@
make::box2d(2,2, 5,5));
image2d<short unsigned int> out(8, 8);
- level::fill(out, 0);
+ data::fill(out, 0);
out = level::transform(ima, mysqrt());
}
@@ -135,7 +135,7 @@
flat_image<short, box2d> ima(5, make::box2d(size, size));
image2d<unsigned short> out(size, size);
- level::fill_with_value(ima, 51);
+ data::fill_with_value(ima, 51);
out = level::transform(ima, mysqrt());
box2d::piter p(out.domain());
@@ -152,7 +152,7 @@
I out(size, size);
II ima_if = ima | fun::p2b::chess();
- level::fill_with_value(ima, 0);
+ data::fill_with_value(ima, 0);
debug::iota(ima);
out = level::transform(ima_if, mysqrt());
@@ -171,8 +171,8 @@
II cast(in);
III out(size, size);
- level::fill(in, 51);
- level::fill(out, 42);
+ data::fill(in, 51);
+ data::fill(out, 42);
out = level::transform(cast, mysqrt());
@@ -191,7 +191,7 @@
II sub_ima(ima, make::box2d(4,4, 10,10));
III out(size, size);
- level::fill(ima, 51);
+ data::fill(ima, 51);
out = level::transform(sub_ima, mysqrt());
II::piter p(sub_ima.domain());
@@ -209,7 +209,7 @@
II extend_ima(ima, 5);
III out(size, size);
- level::fill(ima, 51);
+ data::fill(ima, 51);
out = level::transform(extend_ima, mysqrt());
II::piter p(extend_ima.domain());
Index: tests/level/Makefile.am
--- tests/level/Makefile.am (revision 3073)
+++ tests/level/Makefile.am (working copy)
@@ -8,7 +8,6 @@
abs \
all_headers \
apply \
- assign \
compare \
compute \
convert \
@@ -20,8 +19,6 @@
median_dir \
median_fast \
median_hline2d \
- memcpy_ \
- memset_ \
paste \
saturate \
sort_psites \
@@ -34,7 +31,6 @@
abs_SOURCES = abs.cc
all_headers_SOURCES = all_headers.cc
apply_SOURCES = apply.cc
-assign_SOURCES = assign.cc
compare_SOURCES = compare.cc
compute_SOURCES = compute.cc
convert_SOURCES = convert.cc
@@ -46,8 +42,6 @@
median_dir_SOURCES = median_dir.cc
median_fast_SOURCES = median_fast.cc
median_hline2d_SOURCES = median_hline2d.cc
-memcpy__SOURCES = memcpy_.cc
-memset__SOURCES = memset_.cc
paste_SOURCES = paste.cc
saturate_SOURCES = saturate.cc
sort_psites_SOURCES = sort_psites.cc
Index: tests/data/paste.cc
--- tests/data/paste.cc (revision 0)
+++ tests/data/paste.cc (working copy)
@@ -26,9 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/paste.cc
+/// \file tests/data/paste.cc
///
-/// Tests on mln::level::paste.
+/// Tests on mln::data::paste.
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
@@ -40,8 +40,8 @@
#include <mln/core/image/sub_image.hh>
#include <mln/core/image/extension_val.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/paste.hh>
#include <mln/level/compare.hh>
#include <mln/fun/p2b/chess.hh>
@@ -69,10 +69,10 @@
image2d<int> ima3(b, 2);
- level::paste(ima, ima2); // Not so fast version...
+ data::paste(ima, ima2); // Not so fast version...
mln_assertion(ima == (ima2 | b));
- level::paste(ima, ima3); // Fast version...
+ data::paste(ima, ima3); // Fast version...
mln_assertion(ima == ima3);
}
@@ -88,10 +88,10 @@
image3d<int> ima3(b, 2);
- level::paste(ima, ima2); // Not so fast version...
+ data::paste(ima, ima2); // Not so fast version...
mln_assertion(ima == (ima2 | b));
- level::paste(ima, ima3); // Fast version...
+ data::paste(ima, ima3); // Fast version...
mln_assertion(ima == ima3);
}
@@ -101,7 +101,7 @@
image1d<unsigned short> out(size);
debug::iota(ima);
- level::paste(ima, out);
+ data::paste(ima, out);
mln_assertion(ima == out);
}
@@ -113,8 +113,8 @@
make::box2d(2,2, 5,5));
image2d<short unsigned int> out(8, 8);
- level::fill(out, 0);
- level::paste(ima, out);
+ data::fill(out, 0);
+ data::paste(ima, out);
}
// flat image test
@@ -122,8 +122,8 @@
flat_image<short, box2d> ima(5, make::box2d(size, size));
image2d<unsigned short> out(size, size);
- level::fill_with_value(ima, 51);
- level::paste(ima, out);
+ data::fill_with_value(ima, 51);
+ data::paste(ima, out);
mln_assertion(ima == out);
}
@@ -137,9 +137,9 @@
I out(size, size);
II ima_if = ima | fun::p2b::chess();
- level::fill_with_value(ima, 0);
+ data::fill_with_value(ima, 0);
debug::iota(ima);
- level::paste(ima_if, out);
+ data::paste(ima_if, out);
mln_assertion(ima_if == out);
}
@@ -154,10 +154,10 @@
II cast(in);
III out(size, size);
- level::fill(in, 51);
- level::fill(out, 42);
+ data::fill(in, 51);
+ data::fill(out, 42);
- level::paste(cast, out);
+ data::paste(cast, out);
mln_assertion(cast == out);
}
@@ -172,8 +172,8 @@
II sub_ima(ima, make::box2d(4,4, 10,10));
III out(size, size);
- level::fill(ima, 51);
- level::paste(sub_ima, out);
+ data::fill(ima, 51);
+ data::paste(sub_ima, out);
II::piter p(sub_ima.domain());
for_all(p)
@@ -190,8 +190,8 @@
II extend_ima(ima, 5);
III out(size, size);
- level::fill(ima, 51);
- level::paste(extend_ima, out);
+ data::fill(ima, 51);
+ data::paste(extend_ima, out);
II::piter p(extend_ima.domain());
for_all(p)
Property changes on: tests/data/paste.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/data/fill_with_value.cc
--- tests/data/fill_with_value.cc (revision 0)
+++ tests/data/fill_with_value.cc (working copy)
@@ -26,12 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/fill_with_value.cc
+/// \file tests/data/fill_with_value.cc
///
-/// Tests on mln::level::fill_with_value
+/// Tests on mln::data::fill_with_value
-#include <mln/level/fill_with_value.hh>
+#include <mln/data/fill_with_value.hh>
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
@@ -54,7 +54,7 @@
{
typedef image1d<unsigned char> I;
I ima(size);
- level::fill_with_value(ima, 51);
+ data::fill_with_value(ima, 51);
mln_piter_(I) p(ima.domain());
for_all(p)
mln_assertion(ima(p) == 51);
@@ -64,7 +64,7 @@
{
typedef image2d<unsigned char> I;
I ima(size, size);
- level::fill_with_value(ima, 51);
+ data::fill_with_value(ima, 51);
mln_piter_(I) p(ima.domain());
for_all(p)
mln_assertion(ima(p) == 51);
@@ -73,7 +73,7 @@
{
typedef image3d<value::rgb8> I;
I ima(size, size, size);
- level::fill_with_value(ima, value::rgb8(255, 0, 255));
+ data::fill_with_value(ima, value::rgb8(255, 0, 255));
mln_piter_(I) p(ima.domain());
for_all(p)
mln_assertion(ima(p) == value::rgb8(255, 0, 255));
@@ -82,7 +82,7 @@
{
flat_image<short, box2d> ima(5, make::box2d(2, 3));
- level::fill_with_value(ima, 51);
+ data::fill_with_value(ima, 51);
box2d::piter p(ima.domain());
for_all(p)
mln_assertion(ima(p) == 51);
@@ -94,10 +94,10 @@
typedef image_if<I, fun::p2b::chess> II;
I ima(size, size);
- level::fill_with_value(ima, 51);
+ data::fill_with_value(ima, 51);
II ima_if = ima | fun::p2b::chess();
- level::fill_with_value(ima_if, 42);
+ data::fill_with_value(ima_if, 42);
II::piter p(ima_if.domain());
for_all(p)
@@ -110,7 +110,7 @@
I ima(size, size);
II sub_ima(ima, make::box2d(4,4, 10,10));
- level::fill_with_value(sub_ima, 5);
+ data::fill_with_value(sub_ima, 5);
II::piter p(sub_ima.domain());
for_all(p)
@@ -123,7 +123,7 @@
I ima(size, size);
II extend_ima(ima, 5);
- level::fill_with_value(extend_ima, 51);
+ data::fill_with_value(extend_ima, 51);
II::piter p(extend_ima.domain());
for_all(p)
Property changes on: tests/data/fill_with_value.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/data/fill_with_image.cc
--- tests/data/fill_with_image.cc (revision 0)
+++ tests/data/fill_with_image.cc (working copy)
@@ -26,12 +26,12 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/level/fill_with_value.cc
+/// \file tests/data/fill_with_value.cc
///
-/// Tests on mln::level::fill_with_value
+/// Tests on mln::data::fill_with_value
-#include <mln/level/fill_with_value.hh>
-#include <mln/level/fill_with_image.hh>
+#include <mln/data/fill_with_value.hh>
+#include <mln/data/fill_with_image.hh>
#include <mln/level/compare.hh>
#include <mln/core/image/image1d.hh>
@@ -67,7 +67,7 @@
image2d<int> ima2(b2, 0);
debug::iota(ima2);
- level::fill_with_image(ima, ima2); // Not so fast version...
+ data::fill_with_image(ima, ima2); // Not so fast version...
mln_assertion(ima == (ima2 | b));
}
@@ -78,7 +78,7 @@
image2d<unsigned int> ima2(size, size);
debug::iota(ima2);
- level::fill_with_image(ima, ima2);
+ data::fill_with_image(ima, ima2);
mln_assertion(ima == ima2);
}
@@ -90,7 +90,7 @@
image2d<int> ima2(b2, 0);
debug::iota(ima2);
- level::fill_with_image(ima, ima2);
+ data::fill_with_image(ima, ima2);
mln_assertion(ima == (ima2 | b));
}
@@ -100,11 +100,11 @@
I ima(size, size);
I ima2(size, size);
- level::fill_with_value(ima, 51);
- level::fill_with_value(ima2, 42);
+ data::fill_with_value(ima, 51);
+ data::fill_with_value(ima2, 42);
II ima_if = ima | fun::p2b::chess();
- level::fill_with_image(ima_if, ima2);
+ data::fill_with_image(ima_if, ima2);
II::piter p(ima_if.domain());
for_all(p)
@@ -124,10 +124,10 @@
image3d<int> ima3(b, 2);
- level::fill_with_image(ima, ima2); // Not so fast version...
+ data::fill_with_image(ima, ima2); // Not so fast version...
mln_assertion(ima == (ima2 | b));
- level::fill_with_image(ima3, ima); // Fast version...
+ data::fill_with_image(ima3, ima); // Fast version...
mln_assertion(ima == ima3);
}
@@ -137,7 +137,7 @@
image1d<unsigned short> out(size);
debug::iota(ima);
- level::fill_with_image(out, ima);
+ data::fill_with_image(out, ima);
mln_assertion(ima == out);
}
@@ -149,8 +149,8 @@
make::box2d(-2,-2, 15,15));
image2d<short unsigned int> out(8, 8);
- level::fill(out, 0);
- level::fill_with_image(out, ima);
+ data::fill(out, 0);
+ data::fill_with_image(out, ima);
}
// flat image test
@@ -158,8 +158,8 @@
flat_image<short, box2d> ima(5, make::box2d(size, size));
image2d<unsigned short> out(size, size);
- level::fill_with_value(ima, 51);
- level::fill_with_image(out, ima);
+ data::fill_with_value(ima, 51);
+ data::fill_with_image(out, ima);
mln_assertion(ima == out);
}
@@ -173,9 +173,9 @@
I out(size, size);
II ima_if = ima | fun::p2b::chess();
- level::fill_with_value(ima, 42);
- level::fill_with_value(out, 0);
- level::fill_with_image(ima_if, ima);
+ data::fill_with_value(ima, 42);
+ data::fill_with_value(out, 0);
+ data::fill_with_image(ima_if, ima);
mln_piter_(II) p(ima_if.domain());
for_all(p)
@@ -191,10 +191,10 @@
II cast(in);
I out(size, size);
- level::fill(in, 51);
- level::fill(out, 42);
+ data::fill(in, 51);
+ data::fill(out, 42);
- level::fill_with_image(out, cast);
+ data::fill_with_image(out, cast);
mln_assertion(cast == out);
}
@@ -209,9 +209,9 @@
II sub_ima(ima, make::box2d(4,4, 10,10));
- level::fill(ima, 51);
- level::fill(out, 0);
- level::fill_with_image(sub_ima, ima);
+ data::fill(ima, 51);
+ data::fill(out, 0);
+ data::fill_with_image(sub_ima, ima);
II::piter p(sub_ima.domain());
for_all(p)
@@ -228,8 +228,8 @@
II extend_ima(ima, 5);
III out(size, size);
- level::fill(ima, 51);
- level::fill_with_image(out, extend_ima);
+ data::fill(ima, 51);
+ data::fill_with_image(out, extend_ima);
mln_assertion(out == extend_ima);
}
Property changes on: tests/data/fill_with_image.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/data/Makefile.am
--- tests/data/Makefile.am (revision 0)
+++ tests/data/Makefile.am (revision 0)
@@ -0,0 +1,23 @@
+## Process this file through Automake to create Makefile.in -*- Makefile -*-
+
+include $(top_srcdir)/milena/tests/tests.mk
+
+check_PROGRAMS = \
+ fill \
+ fill_with_value \
+ fill_with_image \
+ memcpy_ \
+ memset_ \
+ paste
+
+fill_SOURCES = fill.cc
+fill_with_value_SOURCES = fill_with_value.cc
+fill_with_image_SOURCES = fill_with_image.cc
+memcpy__SOURCES = memcpy_.cc
+memset__SOURCES = memset_.cc
+paste_SOURCES = paste.cc
+
+# Lengthy tests.
+fill_full_SOURCES = fill_full.cc
+
+TESTS = $(check_PROGRAMS)
Index: tests/data/fill.cc
--- tests/data/fill.cc (revision 0)
+++ tests/data/fill.cc (working copy)
@@ -25,13 +25,13 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/fill.cc
+/*! \file tests/data/fill.cc
*
- * \brief Tests on mln::level::fill
+ * \brief Tests on mln::data::fill
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
int main()
{
@@ -45,7 +45,7 @@
{
const unsigned size = 3;
image2d<unsigned> ima(size, size);
- level::fill(ima, u);
+ data::fill(ima, u);
box_fwd_piter_<point2d> p(ima.domain());
for_all (p)
mln_assertion (ima(p) == u);
Property changes on: tests/data/fill.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/data/fill_full.cc
--- tests/data/fill_full.cc (revision 0)
+++ tests/data/fill_full.cc (working copy)
@@ -25,9 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/fill_full.cc
+/*! \file tests/data/fill_full.cc
*
- * \brief Tests on mln::level::fill
+ * \brief Tests on mln::data::fill
*/
@@ -53,7 +53,7 @@
#include <mln/debug/iota.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/fun/p2v/iota.hh>
@@ -111,7 +111,7 @@
{
I& ima = exact(ima_);
- level::fill(ima, v);
+ data::fill(ima, v);
{
mln_piter(I) p (ima.domain ());
@@ -359,7 +359,7 @@
{
using namespace mln;
- std::cerr << "Tests level::fill:" << std::endl;
+ std::cerr << "Tests data::fill:" << std::endl;
std::cerr << "on int:" << std::endl;
chk<int>(1000);
std::cerr << "on unsigned:" << std::endl;
Property changes on: tests/data/fill_full.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/data/memcpy_.cc
--- tests/data/memcpy_.cc (revision 0)
+++ tests/data/memcpy_.cc (working copy)
@@ -1,4 +1,5 @@
// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,17 +26,16 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/memcpy_.cc
- *
- * \brief Tests on mln::level::memcpy_.
- *
- * \todo Make this test not dummy!
- */
+/// \file tests/data/memcpy_.cc
+///
+/// Tests on mln::data::memcpy_.
+///
+/// \todo Make this test not dummy!
#include <mln/core/image/image2d.hh>
#include <mln/debug/iota.hh>
-#include <mln/level/memcpy_.hh>
+#include <mln/data/memcpy_.hh>
int main()
@@ -51,7 +51,7 @@
dest = point2d(1, 2);
pixel<I> pix = make::pixel(ima, dest);
- level::memcpy_(pix,
+ data::memcpy_(pix,
make::pixel(ima, src),
2 + 2 * ima.border());
Property changes on: tests/data/memcpy_.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/data/memset_.cc
--- tests/data/memset_.cc (revision 0)
+++ tests/data/memset_.cc (working copy)
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,15 +26,14 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/level/memset_.cc
- *
- * \brief Tests on mln::level::memset_.
- */
+/// \file tests/data/memset_.cc
+///
+/// Tests on mln::data::memset_.
#include <mln/core/image/image2d.hh>
#include <mln/geom/ncols.hh>
-#include <mln/level/fill.hh>
-#include <mln/level/memset_.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/memset_.hh>
#include <mln/opt/at.hh>
@@ -42,13 +42,13 @@
using namespace mln;
image2d<int> ima(3, 3);
- level::fill(ima, 0);
+ data::fill(ima, 0);
int X = 9;
- level::memset_(ima, point2d(0,0),
+ data::memset_(ima, point2d(0,0),
X,
geom::ncols(ima) + 2 * ima.border() + 1);
// ^
// |
- mln_assertion(opt::at(ima, 1,0) == X); // <----------------+
+ mln_assertion(opt::at(ima, 1,0) == X); // <---------+
mln_assertion(opt::at(ima, 1,1) != X);
}
Property changes on: tests/data/memset_.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/linear/gaussian.cc
--- tests/linear/gaussian.cc (revision 3073)
+++ tests/linear/gaussian.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/level/transform.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/math/round.hh>
#include <mln/linear/gaussian.hh>
@@ -61,7 +61,7 @@
image2d<float> lenaf(lena.domain());
- level::paste(lena, lenaf);
+ data::paste(lena, lenaf);
image2d<float> outf = linear::gaussian(lenaf, 5.1f);
}
Index: tests/transform/distance_geodesic.cc
--- tests/transform/distance_geodesic.cc (revision 3073)
+++ tests/transform/distance_geodesic.cc (working copy)
@@ -32,7 +32,7 @@
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/opt/at.hh>
@@ -45,7 +45,7 @@
using value::int_u8;
image2d<bool> input(9, 9);
- level::fill(input, false);
+ data::fill(input, false);
opt::at(input, 4, 4) = true;
image2d<int_u8> output = transform::distance_geodesic(input, c4(), int_u8(4));
Index: tests/transform/distance_front.cc
--- tests/transform/distance_front.cc (revision 3073)
+++ tests/transform/distance_front.cc (working copy)
@@ -33,7 +33,7 @@
#include <mln/core/alias/neighb2d.hh>
#include <mln/make/w_window2d_int.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/opt/at.hh>
@@ -46,7 +46,7 @@
using value::int_u8;
image2d<bool> input(9, 9);
- level::fill(input, false);
+ data::fill(input, false);
opt::at(input, 4, 4) = true;
int ws[] = { 0, 9, 0, 9, 0,
Index: tests/border/fill_full.cc
--- tests/border/fill_full.cc (revision 3073)
+++ tests/border/fill_full.cc (working copy)
@@ -33,7 +33,7 @@
/// \todo Rewrite this non-sense test file!!!
#include <mln/border/fill.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/core/image/image1d.hh>
#include <mln/core/image/image2d.hh>
#include <mln/core/image/image3d.hh>
@@ -55,7 +55,7 @@
check1d(unsigned row, unsigned border, T& value, T& v)
{
image1d<T> ima(row, border);
- level::fill (ima, v);
+ data::fill (ima, v);
border::fill (ima, value);
unsigned i = 0;
@@ -74,7 +74,7 @@
check2d(unsigned row, unsigned col, unsigned border, T& value, T& v)
{
image2d<T> ima(row, col, border);
- level::fill (ima, v);
+ data::fill (ima, v);
border::fill (ima, value);
unsigned c = col + 2 * border;
@@ -104,7 +104,7 @@
check3d(unsigned sli, unsigned row, unsigned col, unsigned border, T& value, T& v)
{
image3d<T> ima(sli, row, col, border);
- level::fill (ima, v);
+ data::fill (ima, v);
border::fill (ima, value);
unsigned c = col + 2 * border;
Index: tests/border/resize_image3d_1.cc
--- tests/border/resize_image3d_1.cc (revision 3073)
+++ tests/border/resize_image3d_1.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/border/resize.hh>
#include <mln/debug/println_with_border.hh>
#include <mln/border/fill.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
using namespace mln;
@@ -52,7 +52,7 @@
<< std::endl
<< std::endl;
image3d<value::int_u8> ima(3, 1, 2, border);
- level::fill (ima, 2);
+ data::fill (ima, 2);
border::fill(ima, 8);
std::cout << "before resize ("
Index: tests/border/resize_image3d_2.cc
--- tests/border/resize_image3d_2.cc (revision 3073)
+++ tests/border/resize_image3d_2.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/border/resize.hh>
#include <mln/debug/println_with_border.hh>
#include <mln/border/fill.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
using namespace mln;
@@ -52,7 +52,7 @@
<< std::endl
<< std::endl;
image3d<int> ima(2, 3, 2, border);
- level::fill (ima, 2);
+ data::fill (ima, 2);
border::fill(ima, 8);
std::cout << "before resize ("
Index: tests/border/resize_image3d_3.cc
--- tests/border/resize_image3d_3.cc (revision 3073)
+++ tests/border/resize_image3d_3.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/border/resize.hh>
#include <mln/debug/println_with_border.hh>
#include <mln/border/fill.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
using namespace mln;
@@ -47,7 +47,7 @@
unsigned new_border = 1;
image3d<value::int_u8> ima(1, 3, 2, border);
- level::fill (ima, 2);
+ data::fill (ima, 2);
border::fill(ima, 8);
mln_assertion(ima.has(point3d(-3, -3, -3)) == true);
Index: tests/test/positive.cc
--- tests/test/positive.cc (revision 3073)
+++ tests/test/positive.cc (working copy)
@@ -31,7 +31,7 @@
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/test/positive.hh>
@@ -55,7 +55,7 @@
typedef image2d<int> I;
I ima(1,1);
- level::fill(ima, 0);
+ data::fill(ima, 0);
test_v2b(fun::v2v::id<mln_value_(I)>() >= pw::cst(0));
Index: tests/convert/to_p_set.cc
--- tests/convert/to_p_set.cc (revision 3073)
+++ tests/convert/to_p_set.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/core/alias/neighb2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/convert/to_p_set.hh>
#include <mln/util/ord.hh>
@@ -74,8 +74,8 @@
// Image :
image2d<bool> ima(make::box2d(-6, -6, 6, 6));
- level::fill(ima, false);
- level::fill((ima | ref).rw(), true);
+ data::fill(ima, false);
+ data::fill((ima | ref).rw(), true);
p_set<point2d> test_ima = convert::to_p_set(ima);
test(ref, test_ima);
Index: tests/convert/to_window.cc
--- tests/convert/to_window.cc (revision 3073)
+++ tests/convert/to_window.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/core/alias/neighb2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/convert/to_window.hh>
#include <mln/convert/to_p_set.hh>
@@ -76,8 +76,8 @@
// Image :
image2d<bool> ima(make::box2d(-6, -6, 6, 6));
- level::fill(ima, false);
- level::fill((ima | convert::to_p_set(ref)).rw(), true);
+ data::fill(ima, false);
+ data::fill((ima | convert::to_p_set(ref)).rw(), true);
window2d test_ima = convert::to_window(ima);
test(ref, test_ima);
Index: tests/pw/value.cc
--- tests/pw/value.cc (revision 3073)
+++ tests/pw/value.cc (working copy)
@@ -31,7 +31,7 @@
*/
#include <mln/core/image/image2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/pw/all.hh>
@@ -40,7 +40,7 @@
using namespace mln;
image2d<int> ima(3, 3);
- level::fill(ima, 0);
+ data::fill(ima, 0);
point2d p(1, 1);
ima(p) = 51;
Index: tests/binarization/threshold.cc
--- tests/binarization/threshold.cc (revision 3073)
+++ tests/binarization/threshold.cc (working copy)
@@ -56,7 +56,7 @@
image2d<int> lena(l.domain(), 0);
- level::paste(l, lena);
+ data::paste(l, lena);
io::pbm::save(binarization::threshold(lena, 50), "out2.pgm");
}
Index: tests/morpho/artificial_line_graph_image_wst.cc
--- tests/morpho/artificial_line_graph_image_wst.cc (revision 3073)
+++ tests/morpho/artificial_line_graph_image_wst.cc (working copy)
@@ -146,7 +146,7 @@
point2d output_pmax(input.domain().pmax()[0] * 2,
input.domain().pmax()[1] * 2);
output_t output(box2d(output_pmin, output_pmax));
- level::fill(output, literal::black);
+ data::fill(output, literal::black);
mln_fwd_piter_(image2d<input_val_t>) p(input.domain());
for_all(p)
{
Index: tests/morpho/dilation.cc
--- tests/morpho/dilation.cc (revision 3073)
+++ tests/morpho/dilation.cc (working copy)
@@ -42,7 +42,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/morpho/dilation.hh>
#include <mln/pw/value.hh>
@@ -86,7 +86,7 @@
{
image2d<bool> bin(lena.domain());
- level::fill(bin, pw::value(lena) > pw::cst(127u));
+ data::fill(bin, pw::value(lena) > pw::cst(127u));
image2d<bool> out = morpho::dilation(bin, rec);
image2d<int_u8> test(lena.domain());
Index: tests/morpho/tree/data.cc
--- tests/morpho/tree/data.cc (revision 3073)
+++ tests/morpho/tree/data.cc (working copy)
@@ -72,7 +72,7 @@
{
image2d<unsigned> area(ima.domain());
- level::fill(area, 1);
+ data::fill(area, 1);
tree_t::piter p(t.domain());
for_all(p)
if (! t.is_root(p))
Index: tests/morpho/skeleton_constrained.cc
--- tests/morpho/skeleton_constrained.cc (revision 3073)
+++ tests/morpho/skeleton_constrained.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/debug/println_with_border.hh>
@@ -98,7 +98,7 @@
image2d<bool> K(pic.domain());
- level::fill(K, false);
+ data::fill(K, false);
image2d<int_u8> dmap = transform::distance_geodesic(logical::not_(pic),
Index: tests/morpho/elementary/gradient.cc
--- tests/morpho/elementary/gradient.cc (revision 3073)
+++ tests/morpho/elementary/gradient.cc (working copy)
@@ -62,7 +62,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
mln_VAR(gra,
Index: tests/morpho/elementary/closing.cc
--- tests/morpho/elementary/closing.cc (revision 3073)
+++ tests/morpho/elementary/closing.cc (working copy)
@@ -57,7 +57,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
image2d<bool> clo = morpho::elementary::closing(msk, c4());
Index: tests/morpho/elementary/erosion.cc
--- tests/morpho/elementary/erosion.cc (revision 3073)
+++ tests/morpho/elementary/erosion.cc (working copy)
@@ -57,7 +57,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
image2d<bool> ero = morpho::elementary::erosion(msk, c4());
Index: tests/morpho/elementary/top_hat.cc
--- tests/morpho/elementary/top_hat.cc (revision 3073)
+++ tests/morpho/elementary/top_hat.cc (working copy)
@@ -56,7 +56,7 @@
debug::println( morpho::elementary::top_hat_self_complementary(ima, c4()) );
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
debug::println( morpho::elementary::top_hat_white(msk, c4()) );
Index: tests/morpho/elementary/gradient_external.cc
--- tests/morpho/elementary/gradient_external.cc (revision 3073)
+++ tests/morpho/elementary/gradient_external.cc (working copy)
@@ -62,7 +62,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
mln_VAR(gra,
Index: tests/morpho/elementary/opening.cc
--- tests/morpho/elementary/opening.cc (revision 3073)
+++ tests/morpho/elementary/opening.cc (working copy)
@@ -57,7 +57,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
image2d<bool> ope = morpho::elementary::opening(msk, c4());
Index: tests/morpho/elementary/dilation.cc
--- tests/morpho/elementary/dilation.cc (revision 3073)
+++ tests/morpho/elementary/dilation.cc (working copy)
@@ -57,7 +57,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
image2d<bool> dil = morpho::elementary::dilation(msk, c4());
Index: tests/morpho/elementary/gradient_internal.cc
--- tests/morpho/elementary/gradient_internal.cc (revision 3073)
+++ tests/morpho/elementary/gradient_internal.cc (working copy)
@@ -62,7 +62,7 @@
}
image2d<bool> msk(3, 3, 0);
- level::fill(msk, pw::value(ima) >= pw::cst(5u));
+ data::fill(msk, pw::value(ima) >= pw::cst(5u));
debug::println(msk);
{
mln_VAR(gra,
Index: tests/morpho/lena_line_graph_image_wst1.cc
--- tests/morpho/lena_line_graph_image_wst1.cc (revision 3073)
+++ tests/morpho/lena_line_graph_image_wst1.cc (working copy)
@@ -183,7 +183,7 @@
point2d output_pmax(input.domain().pmax()[0] * 2,
input.domain().pmax()[1] * 2);
output_t output(box2d(output_pmin, output_pmax));
- level::fill(output, literal::black);
+ data::fill(output, literal::black);
// Reuse the piter on INPUT.
for_all(p)
{
Index: tests/morpho/rank_filter.cc
--- tests/morpho/rank_filter.cc (revision 3073)
+++ tests/morpho/rank_filter.cc (working copy)
@@ -37,7 +37,7 @@
#include <mln/io/pgm/save.hh>
#include <mln/value/int_u8.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/level/compare.hh>
#include <mln/level/median.hh>
#include <mln/morpho/rank_filter.hh>
Index: tests/morpho/complex_image_wst.cc
--- tests/morpho/complex_image_wst.cc (revision 3073)
+++ tests/morpho/complex_image_wst.cc (working copy)
@@ -47,7 +47,7 @@
#include <mln/core/image/complex_neighborhoods.hh>
#include <mln/core/image/complex_neighborhood_piter.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/norm/l2.hh>
@@ -149,7 +149,7 @@
// Create and initialize an image based on PC.
dist_ima_t dist_ima(pc);
- level::fill(dist_ima, 0u);
+ data::fill(dist_ima, 0u);
/*--------------------------------.
| Complex-based image iterators. |
Index: tests/morpho/hit_or_miss.cc
--- tests/morpho/hit_or_miss.cc (revision 3073)
+++ tests/morpho/hit_or_miss.cc (working copy)
@@ -41,7 +41,7 @@
#include <mln/io/pbm/load.hh>
#include <mln/io/pbm/save.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/morpho/hit_or_miss.hh>
Index: tests/morpho/combined.cc
--- tests/morpho/combined.cc (revision 3073)
+++ tests/morpho/combined.cc (working copy)
@@ -31,7 +31,7 @@
#include <cmath>
#include <mln/core/image/image2d.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/core/alias/window2d.hh>
@@ -76,7 +76,7 @@
// {
// image2d<int> ima(b);
-// level::fill(ima, 51);
+// data::fill(ima, 51);
// debug::println(ima);
// std::cout << win << std::endl;
@@ -90,7 +90,7 @@
// {
// image2d<int> ima(b);
-// level::fill(ima, cos_sin);
+// data::fill(ima, cos_sin);
// debug::println(ima);
// std::cout << std::endl;
Index: tests/morpho/lena_line_graph_image_wst2.cc
--- tests/morpho/lena_line_graph_image_wst2.cc (revision 3073)
+++ tests/morpho/lena_line_graph_image_wst2.cc (working copy)
@@ -140,7 +140,7 @@
point2d output_pmax(input.domain().pmax()[0] * 2,
input.domain().pmax()[1] * 2);
output_t output(box2d(output_pmin, output_pmax));
- level::fill(output, literal::black);
+ data::fill(output, literal::black);
mln_fwd_piter_(image2d<input_val_t>) p(input.domain());
for_all(p)
{
Index: tests/Makefile.am
--- tests/Makefile.am (revision 3073)
+++ tests/Makefile.am (working copy)
@@ -11,6 +11,7 @@
canvas \
convert \
core \
+ data \
debug \
display \
draw \
Index: tests/canvas/chamfer.cc
--- tests/canvas/chamfer.cc (revision 3073)
+++ tests/canvas/chamfer.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/image/sub_image.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
#include <mln/core/alias/w_window2d_int.hh>
#include <mln/core/alias/w_window2d_float.hh>
@@ -54,7 +54,7 @@
image2d<bool> ima(9, 9);
{
- level::fill(ima, false);
+ data::fill(ima, false);
opt::at(ima, 4,4) = true;
const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2, 0> ();
image2d<unsigned> out = geom::chamfer(ima, w_win, max);
@@ -76,7 +76,7 @@
}
{
- level::fill(ima, false);
+ data::fill(ima, false);
opt::at(ima, 4,4) = true;
const w_window2d_int& w_win = make::mk_chamfer_3x3_int<2, 3> ();
image2d<unsigned> out = geom::chamfer(ima, w_win, max);
@@ -99,7 +99,7 @@
}
{
- level::fill(ima, false);
+ data::fill(ima, false);
opt::at(ima, 4,4) = true;
const w_window2d_int& w_win = make::mk_chamfer_5x5_int<4, 6, 9> ();
image2d<unsigned> out = geom::chamfer(ima, w_win, max);
Index: tests/canvas/browsing/hyper_directional.cc
--- tests/canvas/browsing/hyper_directional.cc (revision 3073)
+++ tests/canvas/browsing/hyper_directional.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/canvas/browsing/hyper_directional.hh>
#include <mln/fun/p2v/iota.hh>
#include <mln/debug/println.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
template <typename I_, typename F>
@@ -95,24 +95,24 @@
image2d<unsigned> ima2(3, 3);
image3d<unsigned> ima3(3, 3, 3);
- level::fill(ima2, 0);
+ data::fill(ima2, 0);
my_test(ima2, fun::p2v::iota(), canvas::browsing::hyper_directional, 0);
debug::println(ima2);
- level::fill(ima2, 0);
+ data::fill(ima2, 0);
my_test(ima2, fun::p2v::iota(), canvas::browsing::hyper_directional, 1);
debug::println(ima2);
- level::fill(ima3, 0);
+ data::fill(ima3, 0);
my_test(ima3, fun::p2v::iota(), canvas::browsing::hyper_directional, 0);
debug::println(ima3);
- level::fill(ima3, 0);
+ data::fill(ima3, 0);
my_test(ima3, fun::p2v::iota(), canvas::browsing::hyper_directional, 1);
debug::println(ima3);
- level::fill(ima3, 0);
+ data::fill(ima3, 0);
my_test(ima3, fun::p2v::iota(), canvas::browsing::hyper_directional, 2);
debug::println(ima3);
}
Index: tests/extension/fill.cc
--- tests/extension/fill.cc (revision 3073)
+++ tests/extension/fill.cc (working copy)
@@ -34,7 +34,7 @@
#include <mln/core/image/extended.hh>
#include <mln/extension/fill.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/debug/println.hh>
@@ -46,7 +46,7 @@
image2d<unsigned> ima(3, 3, border);
- level::fill(ima, 0);
+ data::fill(ima, 0);
extension::fill(ima, 9);
box2d b = ima.bbox();
Index: tests/util/tree_to_image.cc
--- tests/util/tree_to_image.cc (revision 3073)
+++ tests/util/tree_to_image.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/core/site_set/p_set.hh>
#include <mln/value/int_u8.hh>
#include <mln/level/stretch.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
#include <vector>
@@ -62,7 +62,7 @@
typedef fllt_node<point2d , int_u8> I;
image2d<int_u8> output (16, 16);
- level::fill(output, 0);
+ data::fill(output, 0);
I s1;
I s2;
Index: tests/util/tree_fast_to_image.cc
--- tests/util/tree_fast_to_image.cc (revision 3073)
+++ tests/util/tree_fast_to_image.cc (working copy)
@@ -36,7 +36,7 @@
#include <mln/core/site_set/p_set.hh>
#include <mln/value/int_u8.hh>
#include <mln/level/stretch.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
#include <mln/level/compare.hh>
#include <mln/io/pgm/save.hh>
#include <vector>
@@ -105,7 +105,7 @@
tree.add_child(tree.root_, s6);
tree.add_parent(s7);
image2d<int_u8> output (16, 16);
- level::fill(output, 0);
+ data::fill(output, 0);
util::tree_fast_to_image(tree, output);
int_u8 vs[16][16] = {
Index: tests/labeling/level.cc
--- tests/labeling/level.cc (revision 3073)
+++ tests/labeling/level.cc (working copy)
@@ -38,7 +38,7 @@
#include <mln/accu/count.hh>
#include <mln/accu/compute.hh>
#include <mln/labeling/level.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
#include <mln/pw/all.hh>
#include <mln/core/image/image_if.hh>
Index: tests/unit_test/mln_data_paste.cc
--- tests/unit_test/mln_data_paste.cc (revision 3073)
+++ tests/unit_test/mln_data_paste.cc (working copy)
@@ -1,9 +1,9 @@
-// Unit test for mln/level/paste.hh.
+// Unit test for mln/data/paste.hh.
// Generated by ./build_unit_test.sh, do not modify.
// Include the file twice, so we detect missing inclusion guards.
-#include <mln/level/paste.hh>
-#include <mln/level/paste.hh>
+#include <mln/data/paste.hh>
+#include <mln/data/paste.hh>
int main()
{
Property changes on: tests/unit_test/mln_data_paste.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/unit_test/mln_data_memset_.cc
--- tests/unit_test/mln_data_memset_.cc (revision 3073)
+++ tests/unit_test/mln_data_memset_.cc (working copy)
@@ -1,9 +1,9 @@
-// Unit test for mln/level/memset_.hh.
+// Unit test for mln/data/memset_.hh.
// Generated by ./build_unit_test.sh, do not modify.
// Include the file twice, so we detect missing inclusion guards.
-#include <mln/level/memset_.hh>
-#include <mln/level/memset_.hh>
+#include <mln/data/memset_.hh>
+#include <mln/data/memset_.hh>
int main()
{
Property changes on: tests/unit_test/mln_data_memset_.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/unit_test/mln_data_fill_with_image.cc
--- tests/unit_test/mln_data_fill_with_image.cc (revision 3073)
+++ tests/unit_test/mln_data_fill_with_image.cc (working copy)
@@ -1,9 +1,9 @@
-// Unit test for mln/level/fill_with_image.hh.
+// Unit test for mln/data/fill_with_image.hh.
// Generated by ./build_unit_test.sh, do not modify.
// Include the file twice, so we detect missing inclusion guards.
-#include <mln/level/fill_with_image.hh>
-#include <mln/level/fill_with_image.hh>
+#include <mln/data/fill_with_image.hh>
+#include <mln/data/fill_with_image.hh>
int main()
{
Property changes on: tests/unit_test/mln_data_fill_with_image.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/unit_test/mln_data_fill_with_value.cc
--- tests/unit_test/mln_data_fill_with_value.cc (revision 3073)
+++ tests/unit_test/mln_data_fill_with_value.cc (working copy)
@@ -1,9 +1,9 @@
-// Unit test for mln/level/fill_with_value.hh.
+// Unit test for mln/data/fill_with_value.hh.
// Generated by ./build_unit_test.sh, do not modify.
// Include the file twice, so we detect missing inclusion guards.
-#include <mln/level/fill_with_value.hh>
-#include <mln/level/fill_with_value.hh>
+#include <mln/data/fill_with_value.hh>
+#include <mln/data/fill_with_value.hh>
int main()
{
Property changes on: tests/unit_test/mln_data_fill_with_value.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/unit_test/mln_data_memcpy_.cc
--- tests/unit_test/mln_data_memcpy_.cc (revision 3073)
+++ tests/unit_test/mln_data_memcpy_.cc (working copy)
@@ -1,9 +1,9 @@
-// Unit test for mln/level/memcpy_.hh.
+// Unit test for mln/data/memcpy_.hh.
// Generated by ./build_unit_test.sh, do not modify.
// Include the file twice, so we detect missing inclusion guards.
-#include <mln/level/memcpy_.hh>
-#include <mln/level/memcpy_.hh>
+#include <mln/data/memcpy_.hh>
+#include <mln/data/memcpy_.hh>
int main()
{
Property changes on: tests/unit_test/mln_data_memcpy_.cc
___________________________________________________________________
Added: svn:mergeinfo
Index: tests/unit_test/mln_data_fill.cc
--- tests/unit_test/mln_data_fill.cc (revision 3073)
+++ tests/unit_test/mln_data_fill.cc (working copy)
@@ -1,9 +1,9 @@
-// Unit test for mln/level/fill.hh.
+// Unit test for mln/data/fill.hh.
// Generated by ./build_unit_test.sh, do not modify.
// Include the file twice, so we detect missing inclusion guards.
-#include <mln/level/fill.hh>
-#include <mln/level/fill.hh>
+#include <mln/data/fill.hh>
+#include <mln/data/fill.hh>
int main()
{
Property changes on: tests/unit_test/mln_data_fill.cc
___________________________________________________________________
Added: svn:mergeinfo
1
0
Guillaume Lazzara wrote:
> +that gives the best optimization/conformance tradeoff. However, note
> +that passing `-DNDEBUG' disable many sanity checks, while providing
> +only a poor performance improvement.
!!!
2
1
19 Dec '08
* doc/Doxygen.in: add trash to `Exclude'.
---
milena/ChangeLog | 6 ++++++
milena/doc/Doxyfile.in | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index a8c7a51..9683972 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Do not parse trash directory during doc generation.
+
+ * doc/Doxygen.in: add trash to `Exclude'.
+
2008-12-19 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Have site sets comparisons work again.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 6209339..3a79395 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -84,6 +84,7 @@ FILE_PATTERNS = *.cc \
RECURSIVE = YES
EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/mln/core/concept/proxy.hxx \
+ @top_srcdir@/milena/trash \
@top_srcdir@/milena/doc/tutorial/samples
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
--
1.5.6.5
1
0
https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Have site sets comparisons work again.
* mln/core/site_set/box.hh: Layout.
* mln/core/site_set/operators.hh: Have it work.
* mln/core/concept/box.hh (is_empty): New.
* mln/core/concept/site_set.hh: Layout.
* mln/geom/nsites.hh (nistes): Rename site set overload as...
* mln/set/card.hh (card): ...this...
...in this new file.
* mln/set/sym_diff.hh: Add fwd decl.
* mln/set/unique.hh: New.
* mln/set/all.hh: Update.
* tests/core/site_set/operators.cc: Revamp.
* tests/geom/nsites.cc: New.
* tests/geom/Makefile.am: Update.
* tests/set/uni.cc: Fix include.
* tests/set/sym_diff.cc: Likewise.
* tests/set/inter.cc: Likewise.
* tests/set/unique.cc: New.
* tests/set/card.cc: New.
* tests/set/Makefile.am: Update.
mln/core/concept/box.hh | 44 ++--
mln/core/concept/site_set.hh | 1
mln/core/site_set/box.hh | 3
mln/core/site_set/operators.hh | 368 ++++++++++++++++++++++++++++++++++-----
mln/geom/nsites.hh | 107 -----------
mln/set/all.hh | 5
mln/set/card.hh | 81 +++-----
mln/set/sym_diff.hh | 3
mln/set/unique.hh | 84 ++++++++
tests/core/site_set/operators.cc | 67 +++----
tests/geom/Makefile.am | 4
tests/geom/nsites.cc | 44 ++++
tests/set/Makefile.am | 6
tests/set/card.cc | 49 +++++
tests/set/inter.cc | 3
tests/set/sym_diff.cc | 6
tests/set/uni.cc | 2
tests/set/unique.cc | 50 +++++
18 files changed, 667 insertions(+), 260 deletions(-)
Index: mln/core/site_set/box.hh
--- mln/core/site_set/box.hh (revision 3071)
+++ mln/core/site_set/box.hh (working copy)
@@ -174,7 +174,6 @@
template <typename P>
std::ostream& operator<<(std::ostream& ostr, const box<P>& b);
- // Procedures
/// Return the minimum box including box \p a and box \p b
template <typename P>
@@ -182,6 +181,8 @@
box<P>
larger_than(const box<P> a, const box<P> b);
+
+
# ifndef MLN_INCLUDE_ONLY
template <typename P>
Index: mln/core/site_set/operators.hh
--- mln/core/site_set/operators.hh (revision 3071)
+++ mln/core/site_set/operators.hh (working copy)
@@ -36,7 +36,9 @@
/// \todo Re-vamp this file now!
+# include <algorithm>
# include <mln/core/concept/site_set.hh>
+# include <mln/set/card.hh>
# include <mln/util/yes.hh> // Temporary include.
@@ -45,10 +47,12 @@
namespace mln
{
+ template <typename E> struct Box;
template <typename Sl, typename Sr>
- Sl& operator+=(Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
+ Sl&
+ operator+=(Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
/// Equality test between site sets \p lhs and \p rhs.
@@ -59,7 +63,8 @@
/// \relates mln::Site_Set
///
template <typename Sl, typename Sr>
- bool operator==(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
+ bool
+ operator==(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
@@ -71,7 +76,8 @@
/// \relates mln::Site_Set
///
template <typename Sl, typename Sr>
- bool operator<=(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
+ bool
+ operator<=(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
@@ -84,7 +90,8 @@
/// \relates mln::Site_Set
///
template <typename Sl, typename Sr>
- bool operator<(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
+ bool
+ operator<(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs);
@@ -99,13 +106,314 @@
/// \relates mln::Site_Set
///
template <typename S>
- std::ostream& operator<<(std::ostream& ostr, const Site_Set<S>& set);
+ std::ostream&
+ operator<<(std::ostream& ostr, const Site_Set<S>& set);
# ifndef MLN_INCLUDE_ONLY
+ namespace internal
+ {
+
+ template <typename Sl, typename Sr>
+ inline
+ std::set< mln_site(Sl), util::ord<mln_site(Sl)> >
+ sym_diff_std_set(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
+ {
+ typedef mln_site(Sl) P;
+ mlc_converts_to(mln_psite(Sr), P)::check();
+ std::set< P, util::ord<P> > sl, sr, sd;
+ convert::from_to(lhs, sl);
+ convert::from_to(rhs, sr);
+ std::set_symmetric_difference(sl.begin(), sl.end(),
+ sr.begin(), sr.end(),
+ std::inserter(sd, sd.begin()),
+ util::ord<P>());
+ return sd;
+ }
+
+ template <typename S>
+ inline
+ std::set< mln_site(S), util::ord<mln_site(S)> >
+ to_std_set(const Site_Set<S>& s)
+ {
+ std::set< mln_site(S), util::ord<mln_site(S)> > std_s;
+ convert::from_to(s, std_s);
+ return std_s;
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ leq_std_set(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
+ {
+ typedef mln_site(Sl) P;
+ mlc_converts_to(mln_psite(Sr), P)::check();
+ std::set< P, util::ord<P> > sl, sr;
+ convert::from_to(lhs, sl);
+ convert::from_to(rhs, sr);
+ return std::includes(sr.begin(), sr.end(),
+ sl.begin(), sl.end(),
+ util::ord<P>());
+ }
+
+ } // end of namespace mln::internal
+
+
+ namespace impl
+ {
+
+ // Implementations for "operator ==" between site sets.
+
+ template <typename Bl, typename Br>
+ inline
+ bool
+ operator_equal_boxes(const Box<Bl>& lhs_, const Box<Br>& rhs_)
+ {
+ const Bl& lhs = exact(lhs_);
+ const Br& rhs = exact(rhs_);
+ if (lhs.is_empty() != rhs.is_empty())
+ return false;
+ if (lhs.is_empty() && rhs.is_empty())
+ return true;
+ return lhs.pmin() == rhs.pmin() && lhs.pmax() == rhs.pmax();
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_uniques(const Site_Set<Sl>& lhs,
+ const Site_Set<Sr>& rhs)
+ {
+ if (set::card(lhs) != set::card(rhs))
+ return false;
+ return mln::internal::sym_diff_std_set(lhs, rhs).empty();
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_unique_multiple(const Site_Set<Sl>& lhs,
+ const Site_Set<Sr>& rhs)
+ {
+ if (set::card(lhs) != set::card(rhs))
+ return false;
+ return mln::internal::to_std_set(lhs) == mln::internal::to_std_set(rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_multiples(const Site_Set<Sl>& lhs,
+ const Site_Set<Sr>& rhs)
+ {
+ // FIXME: Approximate code...
+ if (set::card(lhs) != set::card(rhs))
+ return false;
+ return mln::internal::to_std_set(lhs) == mln::internal::to_std_set(rhs);
+ }
+
+
+ // Implementations for "operator <" between site sets.
+
+ template <typename Bl, typename Br>
+ inline
+ bool
+ operator_less_boxes(const Box<Bl>& lhs_, const Box<Br>& rhs_)
+ {
+ const Bl& lhs = exact(lhs_);
+ const Br& rhs = exact(rhs_);
+ if (rhs.is_empty())
+ return false; // We cannot have "lhs < empty_set".
+ // From this line, rhs is not empty.
+ if (lhs.is_empty())
+ return true; // We have "empty set < a non empty set".
+ // From here, both lhs and rhs are not empty.
+ if (set::card(lhs) >= set::card(rhs))
+ return false;
+ return lhs.crop_wrt(rhs) == lhs;
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_uniques(const Site_Set<Sl>& lhs,
+ const Site_Set<Sr>& rhs)
+ {
+ if (set::card(lhs) >= set::card(rhs))
+ return false;
+ return mln::internal::leq_std_set(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_unique_multiple(const Site_Set<Sl>& lhs,
+ const Site_Set<Sr>& rhs)
+ {
+ if (set::card(lhs) >= set::card(rhs))
+ return false;
+ return mln::internal::leq_std_set(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_multiples(const Site_Set<Sl>& lhs,
+ const Site_Set<Sr>& rhs)
+ {
+ // FIXME: Approximate code...
+ if (set::card(lhs) >= set::card(rhs))
+ return false;
+ return mln::internal::leq_std_set(lhs, rhs);
+ }
+
+ } // end of namespace mln::impl
+
+
+
+
+ namespace internal
+ {
+
+ // Dispatch for "operator ==" between site sets.
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_dispatch(trait::site_set::arity::unique,
+ const Box<Sl>& lhs,
+ trait::site_set::arity::unique,
+ const Box<Sr>& rhs)
+ {
+ return impl::operator_equal_boxes(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_dispatch(trait::site_set::arity::unique,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::unique,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_equal_uniques(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_dispatch(trait::site_set::arity::unique,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::multiple,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_equal_unique_multiple(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_dispatch(trait::site_set::arity::multiple,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::unique,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_equal_unique_multiple(rhs, lhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_dispatch(trait::site_set::arity::multiple,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::multiple,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_equal_multiples(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_equal_dispatch(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
+ {
+ return operator_equal_dispatch(mln_trait_site_set_arity(Sl)(), exact(lhs),
+ mln_trait_site_set_arity(Sr)(), exact(rhs));
+ }
+
+
+ // Dispatch for "operator <" between site sets.
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_dispatch(trait::site_set::arity::unique,
+ const Box<Sl>& lhs,
+ trait::site_set::arity::unique,
+ const Box<Sr>& rhs)
+ {
+ return impl::operator_less_boxes(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_dispatch(trait::site_set::arity::unique,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::unique,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_less_uniques(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_dispatch(trait::site_set::arity::unique,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::multiple,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_less_unique_multiple(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_dispatch(trait::site_set::arity::multiple,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::unique,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_less_unique_multiple(rhs, lhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_dispatch(trait::site_set::arity::multiple,
+ const Site_Set<Sl>& lhs,
+ trait::site_set::arity::multiple,
+ const Site_Set<Sr>& rhs)
+ {
+ return impl::operator_less_multiples(lhs, rhs);
+ }
+
+ template <typename Sl, typename Sr>
+ inline
+ bool
+ operator_less_dispatch(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
+ {
+ return operator_less_dispatch(mln_trait_site_set_arity(Sl)(), exact(lhs),
+ mln_trait_site_set_arity(Sr)(), exact(rhs));
+ }
+
+ } // end of namespace mln::internal
+
+
// Operator +=.
template <typename Sl, typename Sr>
@@ -129,60 +437,36 @@
template <typename Sl, typename Sr>
inline
bool
- operator==(const Site_Set<Sl>&, const Site_Set<Sr>&)
+ operator==(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
{
-// // FIXME: Same grid!
-// const Sl& lhs = exact(lhs_);
-// const Sr& rhs = exact(rhs_);
-
-// // exhaustive test:
-// mln_fwd_piter(Sl) pl(lhs);
-// mln_fwd_piter(Sr) pr(rhs);
-// for (pl.start(), pr.start();
-// pl.is_valid() && pr.is_valid();
-// pl.next(), pr.next())
-// if (pl != pr)
-// return false; // difference found
-
-// // both sets are equal only if both browsings are completed
-// // at the same time:
-// return ! pl.is_valid() && ! pr.is_valid();
- return util::yes(true);
+ mlc_equal(mln_site(Sl), mln_site(Sr))::check();
+ return internal::operator_equal_dispatch(lhs, rhs);
}
- // Operator <=.
+ // Operator <.
template <typename Sl, typename Sr>
inline
bool
- operator<=(const Site_Set<Sl>&, const Site_Set<Sr>&)
+ operator<(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
{
-// // FIXME: Same grid!
-// const Sl& lhs = exact(lhs_);
-// const Sr& rhs = exact(rhs_);
-
-// // exhaustive test:
-// mln_piter(Sl) pl(lhs);
-// for_all(pl)
-// if (! rhs.has(pl))
-// return false;
- return util::yes(true);
+ mlc_equal(mln_site(Sl), mln_site(Sr))::check();
+ return internal::operator_less_dispatch(lhs, rhs);
}
- // Operator <.
+ // Operator <=.
template <typename Sl, typename Sr>
inline
bool
- operator<(const Site_Set<Sl>&, const Site_Set<Sr>&)
+ operator<=(const Site_Set<Sl>& lhs, const Site_Set<Sr>& rhs)
{
-// // FIXME: Same grid!
-// const Sl& lhs = exact(lhs_);
-// const Sr& rhs = exact(rhs_);
-// return lhs <= rhs && lhs != rhs;
- return util::yes(true);
+ mlc_equal(mln_site(Sl), mln_site(Sr))::check();
+ if (set::card(lhs) > set::card(rhs))
+ return false;
+ return lhs < rhs || lhs == rhs;
}
Index: mln/core/concept/box.hh
--- mln/core/concept/box.hh (revision 3071)
+++ mln/core/concept/box.hh (working copy)
@@ -1,4 +1,5 @@
// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -28,10 +29,9 @@
#ifndef MLN_CORE_CONCEPT_BOX_HH
# define MLN_CORE_CONCEPT_BOX_HH
-/*! \file mln/core/concept/box.hh
- *
- * \brief Definition of the concept of mln::Box.
- */
+/// \file mln/core/concept/box.hh
+///
+/// Definition of the concept of mln::Box.
# include <mln/core/concept/site_set.hh>
@@ -84,23 +84,15 @@
*/
unsigned nsites() const;
+ /// Test if this box is empty.
+ bool is_empty() const;
+
protected:
Box();
};
- /*! \brief Equality test between boxes \p lhs and \p rhs.
- *
- * \param[in] lhs A box.
- * \param[in] rhs Another box.
- *
- * \relates mln::Box
- */
- template <typename Bl, typename Br>
- bool operator==(const Box<Bl>& lhs, const Box<Br>& rhs);
-
-
/*! \brief Inclusion test between boxes \p lhs and \p rhs.
*
@@ -141,7 +133,10 @@
inline
unsigned Box<E>::len(unsigned i) const
{
- return 1 + exact(this)->pmax()[i] - exact(this)->pmin()[i];
+ return
+ exact(this)->is_valid()
+ ? 1 + exact(this)->pmax()[i] - exact(this)->pmin()[i]
+ : 0u;
}
template <typename E>
@@ -169,19 +164,18 @@
return count;
}
-
- // Operators.
-
- template <typename Bl, typename Br>
+ template <typename E>
inline
- bool operator==(const Box<Bl>& lhs_, const Box<Br>& rhs_)
+ bool
+ Box<E>::is_empty() const
{
- // FIXME: Same grid!
- const Bl& lhs = exact(lhs_);
- const Br& rhs = exact(rhs_);
- return lhs.pmin() == rhs.pmin() && lhs.pmax() == rhs.pmax();
+ // A non-valid box is empty.
+ return ! exact(this)->is_valid();
}
+
+ // Operators.
+
template <typename Bl, typename Br>
inline
bool operator<=(const Box<Bl>& lhs_, const Box<Br>& rhs_)
Index: mln/core/concept/site_set.hh
--- mln/core/concept/site_set.hh (revision 3071)
+++ mln/core/concept/site_set.hh (working copy)
@@ -128,6 +128,7 @@
# ifndef MLN_INCLUDE_ONLY
+
namespace convert
{
Index: mln/geom/nsites.hh
--- mln/geom/nsites.hh (revision 3071)
+++ mln/geom/nsites.hh (working copy)
@@ -29,10 +29,11 @@
# define MLN_GEOM_NSITES_HH
/// \file mln/geom/nsites.hh
+///
/// Compute the number of sites of an image or a site set.
-# include <mln/core/concept/site_set.hh>
# include <mln/core/concept/image.hh>
+# include <mln/set/card.hh>
namespace mln
@@ -41,10 +42,6 @@
namespace geom
{
- /// Compute the number of sites of the site set \p input.
- template <typename S>
- unsigned nsites(const Site_Set<S>& s);
-
/// Compute the number of sites of the image \p input.
template <typename I>
unsigned nsites(const Image<I>& input);
@@ -52,102 +49,6 @@
# ifndef MLN_INCLUDE_ONLY
-
- // Implementations.
-
- namespace impl
- {
-
- // Generic version.
-
- namespace generic
- {
-
- template <typename S>
- unsigned nsites(const Site_Set<S>& s_)
- {
- trace::entering("geom::impl::generic::nsites");
- const S& s = exact(s_);
- mln_precondition(s.is_valid());
-
- unsigned n = 0;
- mln_piter(S) p(s);
- for_all(p)
- ++n;
-
- trace::exiting("geom::impl::generic::nsites");
- return n;
- }
-
- } // end of namespace mln::geom::impl::generic
-
-
- // A single specialization.
-
- template <typename S>
- inline
- unsigned nsites_method(const Site_Set<S>& s)
- {
- trace::entering("geom::impl::nsites_method");
- unsigned n = exact(s).nsites();
- trace::exiting("geom::impl::nsites_method");
- return n;
- }
-
- } // end of namespace mln::geom::impl
-
-
-
- // Dispatch.
-
- namespace internal
- {
-
- template <typename S>
- inline
- unsigned nsites_dispatch(mln::trait::site_set::nsites::any,
- const Site_Set<S>& s)
- {
- return impl::generic::nsites(s);
- }
-
- template <typename S>
- inline
- unsigned nsites_dispatch(mln::trait::site_set::nsites::known,
- const Site_Set<S>& s)
- {
- return impl::nsites_method(s);
- }
-
- // Dispatch facade.
-
- template <typename S>
- inline
- unsigned nsites_dispatch(const Site_Set<S>& s)
- {
- return nsites_dispatch(mln_trait_site_set_nsites(S)(),
- s);
- }
-
- } // end of namespace mln::geom::internal
-
-
-
- // Facades.
-
- template <typename S>
- inline
- unsigned nsites(const Site_Set<S>& s)
- {
- trace::entering("geom::nsites");
- mln_precondition(exact(s).is_valid());
-
- unsigned n = internal::nsites_dispatch(s);
-
- trace::exiting("geom::nsites");
- return n;
- }
-
template <typename I>
inline
unsigned nsites(const Image<I>& input_)
@@ -158,8 +59,8 @@
mln_precondition(input.has_data());
mln_precondition(input.domain().is_valid());
- // Relies on the nsites routines on a site set.
- unsigned n = internal::nsites_dispatch(input.domain());
+ // Relies on the card routine on a site set.
+ unsigned n = mln::set::internal::card_dispatch(input.domain());
trace::exiting("geom::nsites");
return n;
Index: mln/set/unique.hh
--- mln/set/unique.hh (revision 0)
+++ mln/set/unique.hh (revision 0)
@@ -0,0 +1,84 @@
+// Copyright (C) 2008 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+#ifndef MLN_SET_UNIQUE_HH
+# define MLN_SET_UNIQUE_HH
+
+/// \file mln/set/unique.hh
+///
+/// Give the unique set.
+
+# include <algorithm>
+# include <iterator>
+
+# include <mln/core/site_set/p_set.hh>
+# include <mln/convert/from_to.hh>
+# include <mln/util/ord.hh>
+
+
+namespace mln
+{
+
+ namespace set
+ {
+
+ /// Give the unique set of \p s.
+ ///
+ /// \relates mln::Site_Set
+ ///
+ template <typename S>
+ p_set<mln_site(S)>
+ unique(const Site_Set<S>& s);
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ template <typename S>
+ inline
+ p_set<mln_site(S)>
+ unique(const Site_Set<S>& s)
+ {
+ trace::entering("set::unique");
+
+ typedef mln_site(S) P;
+ std::set< P, util::ord<P> > s_;
+ convert::from_to(s, s_);
+ p_set<P> su;
+ convert::from_to(s_, su);
+
+ trace::exiting("set::unique");
+ return su;
+ }
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::set
+
+} // end of namespace mln
+
+
+#endif // ! MLN_SET_UNIQUE_HH
Index: mln/set/all.hh
--- mln/set/all.hh (revision 3071)
+++ mln/set/all.hh (working copy)
@@ -32,7 +32,8 @@
/// \file mln/set/all.hh
///
/// File that includes all set-related routines.
-
+///
+/// \todo Move geom::sites here (set::nsites).
namespace mln
{
@@ -43,6 +44,7 @@
}
+# include <mln/set/card.hh>
# include <mln/set/compute.hh>
# include <mln/set/diff.hh>
# include <mln/set/inter.hh>
@@ -50,6 +52,7 @@
# include <mln/set/has.hh>
# include <mln/set/sym_diff.hh>
# include <mln/set/uni.hh>
+# include <mln/set/unique.hh>
#endif // ! MLN_SET_ALL_HH
Index: mln/set/card.hh
--- mln/set/card.hh (revision 3064)
+++ mln/set/card.hh (working copy)
@@ -25,29 +25,25 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_GEOM_NSITES_HH
-# define MLN_GEOM_NSITES_HH
+#ifndef MLN_SET_CARD_HH
+# define MLN_SET_CARD_HH
-/// \file mln/geom/nsites.hh
-/// Compute the number of sites of an image or a site set.
+/// \file mln/set/card.hh
+///
+/// Compute the cardinality of a site set.
# include <mln/core/concept/site_set.hh>
-# include <mln/core/concept/image.hh>
namespace mln
{
- namespace geom
+ namespace set
{
- /// Compute the number of sites of the site set \p input.
+ /// Compute the cardinality of the site set \p s.
template <typename S>
- unsigned nsites(const Site_Set<S>& s);
-
- /// Compute the number of sites of the image \p input.
- template <typename I>
- unsigned nsites(const Image<I>& input);
+ unsigned card(const Site_Set<S>& s);
# ifndef MLN_INCLUDE_ONLY
@@ -64,9 +60,9 @@
{
template <typename S>
- unsigned nsites(const Site_Set<S>& s_)
+ unsigned card(const Site_Set<S>& s_)
{
- trace::entering("geom::impl::generic::nsites");
+ trace::entering("set::impl::generic::card");
const S& s = exact(s_);
mln_precondition(s.is_valid());
@@ -75,26 +71,26 @@
for_all(p)
++n;
- trace::exiting("geom::impl::generic::nsites");
+ trace::exiting("set::impl::generic::card");
return n;
}
- } // end of namespace mln::geom::impl::generic
+ } // end of namespace mln::set::impl::generic
// A single specialization.
template <typename S>
inline
- unsigned nsites_method(const Site_Set<S>& s)
+ unsigned card_from_method(const Site_Set<S>& s)
{
- trace::entering("geom::impl::nsites_method");
+ trace::entering("set::impl::card_from_method");
unsigned n = exact(s).nsites();
- trace::exiting("geom::impl::nsites_method");
+ trace::exiting("set::impl::card_from_method");
return n;
}
- } // end of namespace mln::geom::impl
+ } // end of namespace mln::set::impl
@@ -105,71 +101,54 @@
template <typename S>
inline
- unsigned nsites_dispatch(mln::trait::site_set::nsites::any,
+ unsigned card_dispatch(mln::trait::site_set::nsites::any,
const Site_Set<S>& s)
{
- return impl::generic::nsites(s);
+ return impl::generic::card(s);
}
template <typename S>
inline
- unsigned nsites_dispatch(mln::trait::site_set::nsites::known,
+ unsigned card_dispatch(mln::trait::site_set::nsites::known,
const Site_Set<S>& s)
{
- return impl::nsites_method(s);
+ return impl::card_from_method(s);
}
// Dispatch facade.
template <typename S>
inline
- unsigned nsites_dispatch(const Site_Set<S>& s)
+ unsigned card_dispatch(const Site_Set<S>& s)
{
- return nsites_dispatch(mln_trait_site_set_nsites(S)(),
+ return card_dispatch(mln_trait_site_set_nsites(S)(),
s);
}
- } // end of namespace mln::geom::internal
+ } // end of namespace mln::set::internal
- // Facades.
+ // Facade.
template <typename S>
inline
- unsigned nsites(const Site_Set<S>& s)
+ unsigned card(const Site_Set<S>& s)
{
- trace::entering("geom::nsites");
+ trace::entering("set::card");
mln_precondition(exact(s).is_valid());
- unsigned n = internal::nsites_dispatch(s);
-
- trace::exiting("geom::nsites");
- return n;
- }
-
- template <typename I>
- inline
- unsigned nsites(const Image<I>& input_)
- {
- trace::entering("geom::nsites");
- const I& input = exact(input_);
-
- mln_precondition(input.has_data());
- mln_precondition(input.domain().is_valid());
-
- // Relies on the nsites routines on a site set.
- unsigned n = internal::nsites_dispatch(input.domain());
+ unsigned n = internal::card_dispatch(s);
- trace::exiting("geom::nsites");
+ trace::exiting("set::card");
return n;
}
# endif // ! MLN_INCLUDE_ONLY
- } // end of namespace mln::geom
+ } // end of namespace mln::set
} // end of namespace mln
-#endif // ! MLN_GEOM_NSITES_HH
+#endif // ! MLN_SET_CARD_HH
Property changes on: mln/set/card.hh
___________________________________________________________________
Added: svn:mergeinfo
Index: mln/set/sym_diff.hh
--- mln/set/sym_diff.hh (revision 3071)
+++ mln/set/sym_diff.hh (working copy)
@@ -45,6 +45,9 @@
namespace mln
{
+ template <typename P> class p_set;
+
+
namespace set
{
Index: tests/core/site_set/operators.cc
--- tests/core/site_set/operators.cc (revision 3071)
+++ tests/core/site_set/operators.cc (working copy)
@@ -31,42 +31,49 @@
/// Tests of operators on mln::Site_Set.
#include <mln/core/site_set/p_set.hh>
+#include <mln/core/routine/ops.hh>
#include <mln/core/alias/point2d.hh>
+#include <mln/core/alias/box2d.hh>
int main()
{
using namespace mln;
- p_set<point2d> pst1, pst2, pst3, pst4;
- pst1.insert(point2d( 2, 7));
- pst1.insert(point2d( 2, 1));
- pst1.insert(point2d(-4, 0));
- pst1.insert(point2d( 0, 0));
- pst1.insert(point2d( 1, 1));
- pst1.insert(point2d( 6, 5));
- pst2.insert(point2d( 2, 7));
- pst2.insert(point2d(-2, 1));
- pst2.insert(point2d(-4, 0));
- pst2.insert(point2d( 1,-1));
- pst2.insert(point2d( 6, 5));
- pst3.insert(point2d( 2, 7));
- pst3.insert(point2d( 2, 1));
- pst3.insert(point2d(-4, 0));
- pst3.insert(point2d( 0, 0));
- pst3.insert(point2d( 1, 1));
- pst3.insert(point2d( 6, 5));
- pst3.insert(point2d(-2, 1));
- pst3.insert(point2d( 1,-1));
-
- mln_assertion(pst1 <= pst3);
- mln_assertion(pst2 <= pst3);
- mln_assertion(pst3 <= pst3);
- mln_assertion(pst4 <= pst1);
- mln_assertion(pst4 <= pst2);
- mln_assertion(pst4 <= pst3);
- mln_assertion(pst4 <= pst4);
+ point2d a(0,0), b(1,1), c(2,2);
-// mln_assertion(! (pst3 <= pst1));
-// mln_assertion(! (pst3 <= pst2));
+ {
+ p_set<point2d> s1, s2;
+ s1.insert(a);
+ s2.insert(b);
+ mln_assertion(s1 != s2);
+ mln_assertion(! (s1 == s2));
+ mln_assertion(! (s1 < s2));
+ mln_assertion(! (s1 <= s2));
+ mln_assertion(! (s1 > s2));
+ mln_assertion(! (s1 >= s2));
+ }
+
+ {
+ p_set<point2d> s1, s2;
+ s1.insert(a);
+ s2.insert(b);
+ s2.insert(a);
+ mln_assertion(s1 != s2);
+ mln_assertion(s1 < s2);
+ mln_assertion(s1 <= s2);
+ mln_assertion(s2 > s1);
+ mln_assertion(! (s1 == s2));
+ mln_assertion(! (s1 > s2));
+ mln_assertion(! (s1 >= s2));
+ }
+
+ {
+ box2d
+ b1 = make::box2d(0,0, 1,1),
+ b2 = make::box2d(0,0, 1,2);
+ mln_assertion(b1 < b2);
+ mln_assertion(! (b1 < b1));
+ mln_assertion(! (b2 < b1));
+ }
}
Index: tests/geom/nsites.cc
--- tests/geom/nsites.cc (revision 0)
+++ tests/geom/nsites.cc (revision 0)
@@ -0,0 +1,44 @@
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/geom/nsites.cc
+///
+/// Tests on mln::geom::nsites.
+
+#include <mln/core/image/image2d.hh>
+#include <mln/geom/nsites.hh>
+
+
+int main()
+{
+ using namespace mln;
+
+ // trace::quiet = false;
+ image2d<int> ima(make::box2d(-1,-4, 2,6));
+ mln_assertion(geom::nsites(ima) == ((2 - (-1) + 1) * (6 - (-4) + 1)));
+}
Index: tests/geom/Makefile.am
--- tests/geom/Makefile.am (revision 3071)
+++ tests/geom/Makefile.am (working copy)
@@ -15,12 +15,14 @@
ncols \
ninds \
nrows \
+nsites \
nslis \
pmin_pmax \
resize \
seed2tiling \
seed2tiling_roundness
+
bbox_SOURCES = bbox.cc
max_col_SOURCES = max_col.cc
max_ind_SOURCES = max_ind.cc
@@ -33,10 +35,12 @@
ncols_SOURCES = ncols.cc
ninds_SOURCES = ninds.cc
nrows_SOURCES = nrows.cc
+nsites_SOURCES = nsites.cc
nslis_SOURCES = nslis.cc
pmin_pmax_SOURCES = pmin_pmax.cc
resize_SOURCES = resize.cc
seed2tiling_SOURCES = seed2tiling.cc
seed2tiling_roundness_SOURCES = seed2tiling_roundness.cc
+
TESTS = $(check_PROGRAMS)
Index: tests/set/uni.cc
--- tests/set/uni.cc (revision 3071)
+++ tests/set/uni.cc (working copy)
@@ -31,7 +31,7 @@
/// Tests on mln::set::uni.
#include <mln/set/uni.hh>
-#include <mln/core/alias/dpoint2d.hh>
+#include <mln/core/alias/point2d.hh>
int main()
Index: tests/set/sym_diff.cc
--- tests/set/sym_diff.cc (revision 3071)
+++ tests/set/sym_diff.cc (working copy)
@@ -31,7 +31,7 @@
/// Tests on mln::set::sym_diff.
#include <mln/set/sym_diff.hh>
-#include <mln/core/alias/dpoint2d.hh>
+#include <mln/core/alias/point2d.hh>
int main()
@@ -56,9 +56,9 @@
mln_assertion(pst3.has(point2d( 2, 1)));
mln_assertion(pst3.has(point2d( 0, 0)));
mln_assertion(pst3.has(point2d( 1, 1)));
- mln_assertion(!pst3.has(point2d( 2, 7)));
mln_assertion(pst3.has(point2d(-2, 1)));
- mln_assertion(!pst3.has(point2d(-4, 0)));
mln_assertion(pst3.has(point2d( 1,-1)));
+ mln_assertion(! pst3.has(point2d( 2, 7)));
+ mln_assertion(! pst3.has(point2d(-4, 0)));
mln_assertion(!pst3.has(point2d( 6, 5)));
}
Index: tests/set/inter.cc
--- tests/set/inter.cc (revision 3071)
+++ tests/set/inter.cc (working copy)
@@ -31,8 +31,7 @@
/// Tests on mln::set::inter.
#include <mln/set/inter.hh>
-#include <mln/core/alias/dpoint2d.hh>
-#include <mln/core/alias/window2d.hh>
+#include <mln/core/alias/point2d.hh>
int main()
Index: tests/set/Makefile.am
--- tests/set/Makefile.am (revision 3071)
+++ tests/set/Makefile.am (working copy)
@@ -3,16 +3,20 @@
include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
+ card \
compute \
diff \
inter \
sym_diff \
- uni
+ uni \
+ unique
+card_SOURCES = card.cc
compute_SOURCES = compute.cc
diff_SOURCES = diff.cc
inter_SOURCES = inter.cc
sym_diff_SOURCES = sym_diff.cc
uni_SOURCES = uni.cc
+unique_SOURCES = unique.cc
TESTS = $(check_PROGRAMS)
Index: tests/set/unique.cc
--- tests/set/unique.cc (revision 0)
+++ tests/set/unique.cc (revision 0)
@@ -0,0 +1,50 @@
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/set/unique.cc
+///
+/// Tests on mln::set::unique.
+
+#include <mln/set/unique.hh>
+#include <mln/core/site_set/p_array.hh>
+#include <mln/core/alias/point2d.hh>
+
+
+int main()
+{
+ using namespace mln;
+
+ p_array<point2d> a;
+ a.insert(point2d(1, 1));
+ a.insert(point2d(0, 0));
+ a.insert(point2d(0, 0));
+ a.insert(point2d(1, 1));
+ a.insert(point2d(1, 1));
+ mln_assertion(a.nsites() == 5);
+ mln_assertion(set::unique(a).nsites() == 2);
+}
Index: tests/set/card.cc
--- tests/set/card.cc (revision 0)
+++ tests/set/card.cc (revision 0)
@@ -0,0 +1,49 @@
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
+//
+// This file is part of the Olena Library. This library is free
+// software; you can redistribute it and/or modify it under the terms
+// of the GNU General Public License version 2 as published by the
+// Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; see the file COPYING. If not, write to
+// the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+// Boston, MA 02111-1307, USA.
+//
+// As a special exception, you may use this file as part of a free
+// software library without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to
+// produce an executable, this file does not by itself cause the
+// resulting executable to be covered by the GNU General Public
+// License. This exception does not however invalidate any other
+// reasons why the executable file might be covered by the GNU General
+// Public License.
+
+/// \file tests/set/card.cc
+///
+/// Tests on mln::set::card.
+
+#include <mln/core/site_set/p_array.hh>
+#include <mln/core/alias/point2d.hh>
+#include <mln/set/card.hh>
+
+
+int main()
+{
+ using namespace mln;
+
+ p_array<point2d> a;
+ a.insert(point2d(1, 1));
+ a.insert(point2d(0, 0));
+ a.insert(point2d(0, 0));
+ a.insert(point2d(1, 1));
+ a.insert(point2d(1, 1));
+ mln_assertion(set::card(a) == a.nsites());
+}
1
0
* configure.ac: set the proper variables.
* Makefile.am: add doc target.
---
ChangeLog | 8 ++++++++
Makefile.am | 4 ++++
configure.ac | 13 ++++++++++++-
3 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 8613740..25aeb2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Enable the generation of version.hh.
+
+ * configure.ac: set the proper variables.
+
+ * Makefile.am: add doc target.
+
2008-12-18 Guillaume Lazzara <z(a)lrde.epita.fr>
Add missing INSTALL and README.
diff --git a/Makefile.am b/Makefile.am
index 161918a..175def0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,10 @@ ACLOCAL_AMFLAGS = -I build-aux
SUBDIRS = build-aux external milena
+.PHONY: doc
+doc:
+ $(MAKE) -C milena doc
+
if ENABLE_SWILENA
SUBDIRS += swilena
endif ENABLE_SWILENA
diff --git a/configure.ac b/configure.ac
index ee54879..1d5ca57 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,18 @@ AC_CONFIG_FILES([build-aux/Makefile])
# Automake.
AM_INIT_AUTOMAKE([1.10 foreign check-news dist-bzip2 nostdinc -Wall])
-AC_CONFIG_HEADERS([config.h] [milena/mln/version.hh])
+AC_CONFIG_HEADERS([config.h:config.hin] [milena/mln/version.hh])
+
+# Misc. variables.
+AC_DEFINE_UNQUOTED([MLN_PACKAGE_NAME], ["$PACKAGE_NAME"],
+ [Package Full name.])
+AC_DEFINE_UNQUOTED([MLN_PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"],
+ [Bug report address.])
+AC_DEFINE_UNQUOTED([MLN_PACKAGE_STRING], ["$PACKAGE_STRING"],
+ [Full name and version.])
+AC_DEFINE_UNQUOTED([MLN_PACKAGE_VERSION], ["$PACKAGE_VERSION"],
+ [Package Version.])
+
## --------------------- ##
## C++ compiler set up. ##
--
1.5.6.5
1
0
* headers.mk,
* generate_dist_headers.sh: make version.hh part of the distribution.
* mln/version.hh.in: base file used by autotools to generate
version.hh.
---
milena/ChangeLog | 16 +++++++++++++---
milena/generate_dist_headers.sh | 3 ++-
milena/headers.mk | 1 +
milena/mln/version.hh.in | 11 +++++++++++
4 files changed, 27 insertions(+), 4 deletions(-)
create mode 100644 milena/mln/version.hh.in
diff --git a/milena/ChangeLog b/milena/ChangeLog
index dcf963a..19ae6b7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,14 +1,24 @@
2008-12-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Add version.hh.
+
+ * headers.mk,
+ * generate_dist_headers.sh: make version.hh part of the distribution.
+
+ * mln/version.hh.in: base file used by autotools to generate
+ version.hh.
+
+2008-12-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Make the doc part of the distribution.
* doc/Doxyfile.in: make the user doc lighter.
* doc/Makefile.am: add the doc as extra dist.
- * mln/core/internal/graph_window_base.hh
- * mln/core/site_set/box.hh
- * mln/core/site_set/p_complex.hh
+ * mln/core/internal/graph_window_base.hh,
+ * mln/core/site_set/box.hh,
+ * mln/core/site_set/p_complex.hh,
* tests/morpho/complex_image_wst.cc,
* tests/morpho/tree/data.cc,
* trash/display_color_pretty.cc,
diff --git a/milena/generate_dist_headers.sh b/milena/generate_dist_headers.sh
index bb5bb30..7b9fb6a 100755
--- a/milena/generate_dist_headers.sh
+++ b/milena/generate_dist_headers.sh
@@ -7,9 +7,10 @@
echo "## Generated by ./generate_dist_headers, do not modify ##" > headers.mk
echo "" >> headers.mk
echo "nobase_include_HEADERS = \\" >> headers.mk
+echo "mln/version.hh \\" >> headers.mk
echo "generating headers.mk"
-find mln -type f | grep -v "\.svn" | sed -e 's/$/ \\/g' >> headers.mk
+find mln -type f | grep -v "\.svn" | sed -e 's/$/ \\/g' | grep -v "version.hh.in" >> headers.mk
last_line=`tail -n 1 headers.mk | sed -e 's/\\\//g'` # remove '\' in last line
sed '$d' < headers.mk > headers.mk.tmp # remove last line
diff --git a/milena/headers.mk b/milena/headers.mk
index 895ce0e..39fb190 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -1,6 +1,7 @@
## Generated by ./generate_dist_headers, do not modify ##
nobase_include_HEADERS = \
+mln/version.hh \
mln/histo/all.hh \
mln/histo/data.hh \
mln/histo/compute.hh \
diff --git a/milena/mln/version.hh.in b/milena/mln/version.hh.in
new file mode 100644
index 0000000..1b0cf19
--- /dev/null
+++ b/milena/mln/version.hh.in
@@ -0,0 +1,11 @@
+/** The address where bug reports should be sent. */
+#undef MLN_PACKAGE_BUGREPORT
+
+/** The full name of this package. */
+#undef MLN_PACKAGE_NAME
+
+/** The full name and version of this package. */
+#undef MLN_PACKAGE_STRING
+
+/** The version of this package. */
+#undef MLN_PACKAGE_VERSION
--
1.5.6.5
1
0
* doc/Doxyfile.in: make the user doc lighter.
* doc/Makefile.am: add the doc as extra dist.
* mln/core/internal/graph_window_base.hh
* mln/core/site_set/box.hh
* mln/core/site_set/p_complex.hh
* tests/morpho/complex_image_wst.cc,
* tests/morpho/tree/data.cc,
* trash/display_color_pretty.cc,
* doc/benchmark/canvas.cc,
* doc/examples/erosion.cc: fix doxygen warnings.
* doc/tutorial/samples/Makefile.am: do not install sample programs.
* mln/fun/l2l/relabel.hh: fix wrong guards.
---
milena/ChangeLog | 21 +++++++++++++++++++
milena/doc/Doxyfile.in | 27 +++++++++++++-----------
milena/doc/Makefile.am | 7 +++--
milena/doc/benchmark/canvas.cc | 2 +-
milena/doc/examples/erosion.cc | 2 +-
milena/doc/tutorial/samples/Makefile.am | 6 ++--
milena/mln/core/internal/graph_window_base.hh | 2 +-
milena/mln/core/site_set/box.hh | 2 +-
milena/mln/core/site_set/p_complex.hh | 14 +++++++-----
milena/mln/fun/l2l/relabel.hh | 8 +++---
milena/tests/morpho/complex_image_wst.cc | 2 +-
milena/tests/morpho/tree/data.cc | 4 +-
milena/trash/display_color_pretty.cc | 7 ++---
13 files changed, 65 insertions(+), 39 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 35b9b75..dcf963a 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,24 @@
+2008-12-19 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Make the doc part of the distribution.
+
+ * doc/Doxyfile.in: make the user doc lighter.
+
+ * doc/Makefile.am: add the doc as extra dist.
+
+ * mln/core/internal/graph_window_base.hh
+ * mln/core/site_set/box.hh
+ * mln/core/site_set/p_complex.hh
+ * tests/morpho/complex_image_wst.cc,
+ * tests/morpho/tree/data.cc,
+ * trash/display_color_pretty.cc,
+ * doc/benchmark/canvas.cc,
+ * doc/examples/erosion.cc: fix doxygen warnings.
+
+ * doc/tutorial/samples/Makefile.am: do not install sample programs.
+
+ * mln/fun/l2l/relabel.hh: fix wrong guards.
+
2008-12-18 Guillaume Lazzara <z(a)lrde.epita.fr>
Make the tutorial part of the distribution.
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index 64fd5b8..6209339 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -28,6 +28,7 @@ ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = YES
+IDL_PROPERTY_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES
#---------------------------------------------------------------------------
@@ -48,16 +49,18 @@ HIDE_SCOPE_NAMES = NO
SHOW_INCLUDE_FILES = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
+SORT_BRIEF_DOCS = YES
+SORT_BY_SCOPE_NAME = YES
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
GENERATE_DEPRECATEDLIST= YES
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
+SHOW_USED_FILES = NO # Disabled for light doc
+SHOW_DIRECTORIES = NO # Disabled for light doc
+SHOW_FILES = NO # Disabled for light doc
+SHOW_NAMESPACES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
@@ -84,7 +87,7 @@ EXCLUDE = @top_srcdir@/milena/sandbox \
@top_srcdir@/milena/doc/tutorial/samples
EXCLUDE_SYMLINKS = YES
EXCLUDE_PATTERNS = *spe.hh
-EXCLUDE_SYMBOLS =
+EXCLUDE_SYMBOLS =
EXAMPLE_PATH = @top_srcdir@/milena/doc/tutorial/samples \
@top_builddir@/milena/doc/tutorial/samples \
@top_builddir@/milena/doc/tutorial/outputs \
@@ -105,7 +108,7 @@ INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
-REFERENCES_LINK_SOURCE = YES
+REFERENCES_LINK_SOURCE = NO
USE_HTAGS = NO
VERBATIM_HEADERS = YES
#---------------------------------------------------------------------------
@@ -300,23 +303,23 @@ CLASS_DIAGRAMS = YES
HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES
CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
+COLLABORATION_GRAPH = NO # Disabled for light doc
+GROUP_GRAPHS = NO # Disabled for light doc
UML_LOOK = NO
TEMPLATE_RELATIONS = YES
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
+INCLUDE_GRAPH = NO # Disabled for light doc
+INCLUDED_BY_GRAPH = NO # Disabled for light doc
CALL_GRAPH = NO
CALLER_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
+DIRECTORY_GRAPH = NO # Disabled for light doc
DOT_IMAGE_FORMAT = png
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_DEPTH = 1000
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
+GENERATE_LEGEND = NO # Disabled for light doc
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::additions related to the search engine
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 39b52fd..aa1b30c 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -51,12 +51,13 @@ edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY
-e 's,INTERNAL_DOCS = YES,INTERNAL_DOCS = NO,g' \
-e 's,GENERATE_TODOLIST = YES,GENERATE_TODOLIST = NO,g' \
-e 's,PROJECT_NUMBER = \",PROJECT_NUMBER = \"User documentation ,g' \
- -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal*,g'
+ -e 's,EXCLUDE_SYMBOLS =,EXCLUDE_SYMBOLS = *::internal* *_ mln::trait::*,g'
-EXTRA_DIST = \
-Doxyfile.in
+EXTRA_DIST = \
+Doxyfile.in \
+$(top_builddir)/milena/doc/user
CLEANFILES = \
Doxyfile_complete \
diff --git a/milena/doc/benchmark/canvas.cc b/milena/doc/benchmark/canvas.cc
index 5b6b294..b40a6c3 100644
--- a/milena/doc/benchmark/canvas.cc
+++ b/milena/doc/benchmark/canvas.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file doc/bench/canvas.cc
+/// \file doc/benchmark/canvas.cc
///
/// Test on mln::labeling::level.
diff --git a/milena/doc/examples/erosion.cc b/milena/doc/examples/erosion.cc
index b11d574..8d0d51c 100644
--- a/milena/doc/examples/erosion.cc
+++ b/milena/doc/examples/erosion.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file doc/examples/my_test.cc
+/// \file doc/examples/erosion.cc
///
/// Test on mln::morpho::hit_or_miss.
diff --git a/milena/doc/tutorial/samples/Makefile.am b/milena/doc/tutorial/samples/Makefile.am
index 6e61992..c15db7c 100644
--- a/milena/doc/tutorial/samples/Makefile.am
+++ b/milena/doc/tutorial/samples/Makefile.am
@@ -2,7 +2,7 @@
include $(top_srcdir)/milena/doc/doc.mk
-bin_PROGRAMS = \
+noinst_PROGRAMS = \
accu-right-instanciation \
borderthickness \
box2d-bbox \
@@ -44,7 +44,7 @@ bin_PROGRAMS = \
win-create-1 \
win-create-2
-bin_PROGRAMS += \
+noinst_PROGRAMS += \
tuto1_first_image
accu_right_instanciation_SOURCES = accu-right-instanciation.cc
@@ -96,7 +96,7 @@ all: clean-figures
run-samples: all
@failcom='exit 1'; \
- list='$(bin_PROGRAMS)'; for bin in $$list; do \
+ list='$(noinst_PROGRAMS)'; for bin in $$list; do \
echo "Running $$bin"; \
./$$bin > $(OUTPUTS_BUILDDIR)/$$bin.txt || eval $$failcom; \
done
diff --git a/milena/mln/core/internal/graph_window_base.hh b/milena/mln/core/internal/graph_window_base.hh
index d2ecfd5..a72472c 100644
--- a/milena/mln/core/internal/graph_window_base.hh
+++ b/milena/mln/core/internal/graph_window_base.hh
@@ -30,7 +30,7 @@
# include <mln/core/concept/window.hh>
-/// \file mln/internal/graph_window_base.hh
+/// \file mln/core/internal/graph_window_base.hh
///
/// FIXME: doc
diff --git a/milena/mln/core/site_set/box.hh b/milena/mln/core/site_set/box.hh
index 93973fe..469655c 100644
--- a/milena/mln/core/site_set/box.hh
+++ b/milena/mln/core/site_set/box.hh
@@ -176,7 +176,7 @@ namespace mln
// Procedures
- /// Return the minimum box including box \p a and box \b
+ /// Return the minimum box including box \p a and box \p b
template <typename P>
inline
box<P>
diff --git a/milena/mln/core/site_set/p_complex.hh b/milena/mln/core/site_set/p_complex.hh
index 3fcb7da..f071f6a 100644
--- a/milena/mln/core/site_set/p_complex.hh
+++ b/milena/mln/core/site_set/p_complex.hh
@@ -29,7 +29,8 @@
# define MLN_CORE_SITE_SET_P_COMPLEX_HH
/// \file mln/core/site_set/p_complex.hh
-/// \brief Definition of a point set based on a complex.
+///
+/// Definition of a point set based on a complex.
# include <mln/core/internal/site_set_base.hh>
@@ -103,7 +104,7 @@ namespace mln
/* FIXME: Aggregate site data (location). */
- /** \brief A complex psite set based on the N-faces of a complex
+ /** A complex psite set based on the N-faces of a complex
of dimension \tparam D (a \p D-complex).
\arg \p D The dimension of the complex.
@@ -118,9 +119,10 @@ namespace mln
typedef internal::site_set_base_< complex_psite<D, G>, self_ > super_;
public:
- /// \brief Construct a complex psite set from a complex.
+ /// Construct a complex psite set from a complex.
///
/// \param cplx The complex upon which the complex psite set is built.
+ /// \param geom FIXME
p_complex(const topo::complex<D>& cplx, const G& geom);
/// Associated types.
@@ -141,7 +143,7 @@ namespace mln
typedef fwd_piter piter;
/// \}
- /// \brief Return The number of sites of the set, i.e., the number
+ /// Return The number of sites of the set, i.e., the number
/// of \em faces.
///
/// (Required by the mln::Site_Set concept, since the property
@@ -201,7 +203,7 @@ namespace mln
};
- /// \brief Comparison between two mln::p_complex's.
+ /// Comparison between two mln::p_complex's.
///
/// Two mln::p_complex's are considered equal if they share the
/// same complex.
@@ -209,7 +211,7 @@ namespace mln
bool
operator==(const p_complex<D, G>& lhs, const p_complex<D, G>& rhs);
- /// \brief Inclusion of a mln::p_complex in another one.
+ /// Inclusion of a mln::p_complex in another one.
///
/// This inclusion relation is very strict for the moment, since our
/// infrastrure for complexs is simple: a mln::p_complex is included
diff --git a/milena/mln/fun/l2l/relabel.hh b/milena/mln/fun/l2l/relabel.hh
index 8435e1e..6e8eb9b 100644
--- a/milena/mln/fun/l2l/relabel.hh
+++ b/milena/mln/fun/l2l/relabel.hh
@@ -25,10 +25,10 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-#ifndef MLN_FUN_L2L_ARRAY_HH
-# define MLN_FUN_L2L_ARRAY_HH
+#ifndef MLN_FUN_L2L_RELABEL_HH
+# define MLN_FUN_L2L_RELABEL_HH
-/// \file mln/fun/l2l/array.hh
+/// \file mln/fun/l2l/relabel.hh
///
/// Function mapping a label to a new one.
/// \sa mln::labeling::relabel
@@ -204,4 +204,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_FUN_L2L_ARRAY_HH
+#endif // ! MLN_FUN_L2L_RELABEL_HH
diff --git a/milena/tests/morpho/complex_image_wst.cc b/milena/tests/morpho/complex_image_wst.cc
index a1e7cf6..3d53982 100644
--- a/milena/tests/morpho/complex_image_wst.cc
+++ b/milena/tests/morpho/complex_image_wst.cc
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/morpho/complex_image_swt.cc
+/// \file tests/morpho/complex_image_wst.cc
///
/// Testing Meyer's Watershed Transform on mln::complex_image.
diff --git a/milena/tests/morpho/tree/data.cc b/milena/tests/morpho/tree/data.cc
index 6fccab0..e341423 100644
--- a/milena/tests/morpho/tree/data.cc
+++ b/milena/tests/morpho/tree/data.cc
@@ -25,9 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/// \file tests/morpho/tree/parent.cc
+/// \file tests/morpho/tree/data.cc
///
-/// Tests on mln::morpho::tree::parent.
+/// Tests on mln::morpho::tree::data.
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
diff --git a/milena/trash/display_color_pretty.cc b/milena/trash/display_color_pretty.cc
index b9de1ca..d41ee2a 100644
--- a/milena/trash/display_color_pretty.cc
+++ b/milena/trash/display_color_pretty.cc
@@ -25,10 +25,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/display/color_pretty.cc
- *
- * \brief Tests on mln::display::color::pretty.
- */
+/// \file tests/display/color_pretty.cc
+///
+/// Tests on mln::display::color::pretty.
# include <mln/core/image/image2d.hh>
# include <mln/value/int_u8.hh>
--
1.5.6.5
1
0
* milena/Makefile.am: add target `tutorial'.
* milena/doc/Doxyfile.in: Use short file names.
* milena/doc/Makefile.am,
* milena/doc/tutorial/Makefile.am: add documentation to EXTRA_DIST.
---
milena/ChangeLog | 11 ++
milena/Makefile.am | 5 +-
milena/doc/Doxyfile.in | 4 +-
milena/doc/Makefile.am | 18 ++-
milena/doc/tutorial/Makefile.am | 268 ++++++++++++++++++++-------------------
5 files changed, 162 insertions(+), 144 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 43bf51d..35b9b75 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,16 @@
2008-12-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Make the tutorial part of the distribution.
+
+ * milena/Makefile.am: add target `tutorial'.
+
+ * milena/doc/Doxyfile.in: Use short file names.
+
+ * milena/doc/Makefile.am,
+ * milena/doc/tutorial/Makefile.am: add documentation to EXTRA_DIST.
+
+2008-12-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix few tests.
* doc/tutorial/tutorial.tex: add copyright and improve input code
diff --git a/milena/Makefile.am b/milena/Makefile.am
index 485c4bd..8e71f41 100644
--- a/milena/Makefile.am
+++ b/milena/Makefile.am
@@ -8,10 +8,13 @@ SUBDIRS = \
tools
# apps
-.PHONY: doc
+.PHONY: doc tutorial
doc:
$(MAKE) -C doc doc
+tutorial:
+ $(MAKE) -C doc tutorial
+
include $(top_srcdir)/milena/headers.mk
EXTRA_DIST = \
diff --git a/milena/doc/Doxyfile.in b/milena/doc/Doxyfile.in
index bc28c77..64fd5b8 100644
--- a/milena/doc/Doxyfile.in
+++ b/milena/doc/Doxyfile.in
@@ -13,11 +13,11 @@ REPEAT_BRIEF = YES
ABBREVIATE_BRIEF =
ALWAYS_DETAILED_SEC = YES
INLINE_INHERITED_MEMB = YES
-FULL_PATH_NAMES = YES
+FULL_PATH_NAMES = NO
STRIP_FROM_PATH = @top_srcdir@/milena \
@top_builddir@/milena
STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
+SHORT_NAMES = YES
JAVADOC_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = NO
DETAILS_AT_TOP = NO
diff --git a/milena/doc/Makefile.am b/milena/doc/Makefile.am
index 91a9700..39b52fd 100644
--- a/milena/doc/Makefile.am
+++ b/milena/doc/Makefile.am
@@ -6,13 +6,13 @@ SUBDIRS = tutorial
DOXYGEN = doxygen
-.PHONY: doc user-doc complete-doc html_complete html_user tuto
+.PHONY: doc user-doc complete-doc html_complete html_user tutorial
-doc: complete-doc
+doc: user-doc
complete-doc: html_complete
-user-doc: html_user tuto
+user-doc: html_user
html_complete: Doxyfile tuto_html
$(DOXYGEN) Doxyfile_complete
@@ -23,8 +23,8 @@ html_user: Doxyfile tuto_html
tuto_html:
$(MAKE) -C tutorial tuto_html
-tuto: all
- $(MAKE) -C tutorial tuto
+tutorial: all
+ $(MAKE) -C tutorial tutorial
fix-refdata:
$(MAKE) -C tutorial fix-refdata
@@ -55,10 +55,12 @@ edit_user = sed -e 's,OUTPUT_DIRECTORY = ./complete/,OUTPUT_DIRECTORY
-EXTRA_DIST = Doxyfile.in
+EXTRA_DIST = \
+Doxyfile.in
-CLEANFILES = Doxyfile_complete \
- Doxyfile_user
+CLEANFILES = \
+Doxyfile_complete \
+Doxyfile_user
# Sed is used to generate Doxyfile from Doxyfile.in instead of
# configure, because the former is way faster than the latter.
diff --git a/milena/doc/tutorial/Makefile.am b/milena/doc/tutorial/Makefile.am
index 1ce13a1..ba26fe4 100644
--- a/milena/doc/tutorial/Makefile.am
+++ b/milena/doc/tutorial/Makefile.am
@@ -1,11 +1,11 @@
SUBDIRS = samples
-.PHONY: tuto tuto_html
+.PHONY: tutorial tuto_html
include $(top_srcdir)/milena/doc/doc.mk
TEXINPUTS = $(TUTORIAL_SRCDIR):$(TUTORIAL_BUILDDIR):$(OUTPUTS_SRCDIR):
-tuto: data fig-convert
+tutorial: data fig-convert
TEXINPUTS=$(TEXINPUTS) pdflatex $(TUTORIAL_SRCDIR)/tutorial.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(TUTORIAL_SRCDIR)/tutorial.tex
TEXINPUTS=$(TEXINPUTS) pdflatex $(TUTORIAL_SRCDIR)/tutorial.tex
@@ -36,146 +36,148 @@ clean-local:
rm -f tutorial.pdf
rm -f *.haux *.hh *.html *.htoc
-EXTRA_DIST = tutorial.tex
+EXTRA_DIST = \
+tutorial.tex \
+tutorial.pdf
-EXTRA_DIST += \
-examples/cpp_issue.cc \
-examples/sub_image.cc \
-examples/sub_image_if.cc \
-examples/p_vaccess.cc \
-examples/win_multiple.cc \
-examples/image2d.cc \
-examples/image_plain.cc \
-examples/p_run.cc \
-examples/proxy.cc \
-examples/p_array.2.cc \
-examples/for_Z.cc \
-examples/image_if.cc \
-examples/p_key.cc \
-examples/p_mutable_array_of.cc \
-examples/p_queue.cc \
-examples/image_flat.cc \
-examples/p_image.cc \
-examples/box.cc \
-examples/p_line2d.cc \
-examples/p_array.cc \
-examples/accu.cc \
-examples/p_key.2.cc \
-examples/window.cc \
-examples/image_safe.cc \
+EXTRA_DIST += \
+examples/cpp_issue.cc \
+examples/sub_image.cc \
+examples/sub_image_if.cc \
+examples/p_vaccess.cc \
+examples/win_multiple.cc \
+examples/image2d.cc \
+examples/image_plain.cc \
+examples/p_run.cc \
+examples/proxy.cc \
+examples/p_array.2.cc \
+examples/for_Z.cc \
+examples/image_if.cc \
+examples/p_key.cc \
+examples/p_mutable_array_of.cc \
+examples/p_queue.cc \
+examples/image_flat.cc \
+examples/p_image.cc \
+examples/box.cc \
+examples/p_line2d.cc \
+examples/p_array.cc \
+examples/accu.cc \
+examples/p_key.2.cc \
+examples/window.cc \
+examples/image_safe.cc \
examples/vec.cc
-EXTRA_DIST += \
-figures/ima2d-rot-2.ppm \
-figures/logical-not-2.pbm \
-figures/fill-subdomain-2.ppm \
-figures/labeling-compute-2.ppm \
-figures/ima2d-rot-1.ppm \
-figures/fill-subdomain-3.ppm \
-figures/logical-not-1.pbm \
-figures/ima_save.pbm \
+EXTRA_DIST += \
+figures/ima2d-rot-2.ppm \
+figures/logical-not-2.pbm \
+figures/fill-subdomain-2.ppm \
+figures/labeling-compute-2.ppm \
+figures/ima2d-rot-1.ppm \
+figures/fill-subdomain-3.ppm \
+figures/logical-not-1.pbm \
+figures/ima_save.pbm \
figures/fill-subimage-cfun-1.ppm \
-figures/fill-subdomain-4.ppm \
-figures/logical-not-3.pbm \
-figures/labeling-compute-1.pbm \
+figures/fill-subdomain-4.ppm \
+figures/logical-not-3.pbm \
+figures/labeling-compute-1.pbm \
figures/fill-subdomain-1.pbm
-EXTRA_DIST += \
-outputs/win-create-1-display.txt \
-outputs/win-create-2.txt \
-outputs/accu-right-instanciation.txt \
-outputs/ima2d-1.txt \
-outputs/borderthickness.txt \
-outputs/ima-save.txt \
-outputs/fill-subimage-cfun.txt \
-outputs/labeling-compute.txt \
-outputs/parray-display-1.txt \
-outputs/fill-subdomain-shorter.txt \
-outputs/dpoint-1.txt \
-outputs/forall-piter.txt \
-outputs/predicate-1.txt \
-outputs/box2d-bbox.txt \
-outputs/graph-iter.txt \
-outputs/graph-output-1.txt \
-outputs/fill-call-1.txt \
-outputs/ima2d-rot.txt \
-outputs/paste-call-1.txt \
-outputs/fun-p2v-1.txt \
-outputs/estim-sites.txt \
-outputs/parray-append.txt \
-outputs/fill-subdomain.txt \
-outputs/ima-size.txt \
-outputs/logical-not.txt \
-outputs/ima2d-display-output-2.txt \
-outputs/ima2d-decl-2.txt \
-outputs/paste.txt \
-outputs/ima2d-6-clone.txt \
-outputs/ima2d-7.txt \
-outputs/parray-bbox.txt \
-outputs/domain-display.txt \
-outputs/ima2d-display-1.txt \
-outputs/win-create-1.txt \
-outputs/ima2d-display-2.txt \
-outputs/ima2d-display-output-1.txt \
-outputs/fill-part-image.txt \
-outputs/ima2d-3-output.txt \
-outputs/ima-has.txt \
-outputs/ima2d-5.txt \
-outputs/ima2d-4.txt \
-outputs/mln_var.txt \
-outputs/fill.txt \
-outputs/point-1.txt \
-outputs/extension-ignore.txt \
-outputs/graph-data.txt \
-outputs/ima2d-2.txt \
+EXTRA_DIST += \
+outputs/win-create-1-display.txt \
+outputs/win-create-2.txt \
+outputs/accu-right-instanciation.txt \
+outputs/ima2d-1.txt \
+outputs/borderthickness.txt \
+outputs/ima-save.txt \
+outputs/fill-subimage-cfun.txt \
+outputs/labeling-compute.txt \
+outputs/parray-display-1.txt \
+outputs/fill-subdomain-shorter.txt \
+outputs/dpoint-1.txt \
+outputs/forall-piter.txt \
+outputs/predicate-1.txt \
+outputs/box2d-bbox.txt \
+outputs/graph-iter.txt \
+outputs/graph-output-1.txt \
+outputs/fill-call-1.txt \
+outputs/ima2d-rot.txt \
+outputs/paste-call-1.txt \
+outputs/fun-p2v-1.txt \
+outputs/estim-sites.txt \
+outputs/parray-append.txt \
+outputs/fill-subdomain.txt \
+outputs/ima-size.txt \
+outputs/logical-not.txt \
+outputs/ima2d-display-output-2.txt \
+outputs/ima2d-decl-2.txt \
+outputs/paste.txt \
+outputs/ima2d-6-clone.txt \
+outputs/ima2d-7.txt \
+outputs/parray-bbox.txt \
+outputs/domain-display.txt \
+outputs/ima2d-display-1.txt \
+outputs/win-create-1.txt \
+outputs/ima2d-display-2.txt \
+outputs/ima2d-display-output-1.txt \
+outputs/fill-part-image.txt \
+outputs/ima2d-3-output.txt \
+outputs/ima-has.txt \
+outputs/ima2d-5.txt \
+outputs/ima2d-4.txt \
+outputs/mln_var.txt \
+outputs/fill.txt \
+outputs/point-1.txt \
+outputs/extension-ignore.txt \
+outputs/graph-data.txt \
+outputs/ima2d-2.txt \
outputs/ima2d-3.txt
-EXTRA_DIST += \
-samples/paste-call-1.cc \
-samples/dpoint-1.cc \
-samples/parray-append.cc \
-samples/ima-load.cc.raw \
-samples/ima2d-restricted-1.cc.raw \
-samples/graph-iter.cc \
-samples/labeling-compute.cc \
-samples/ima2d-7.cc \
-samples/ima2d-restricted-2.cc.raw \
-samples/fill-subimage-cfun.cc \
-samples/ima-save.cc \
-samples/point-1.cc \
-samples/box2d-bbox.cc \
-samples/forall-piter.cc \
-samples/ima-size.cc \
-samples/borderthickness.cc \
-samples/Makefile.in \
-samples/ima-has.cc \
-samples/win-create-1.cc \
+EXTRA_DIST += \
+samples/paste-call-1.cc \
+samples/dpoint-1.cc \
+samples/parray-append.cc \
+samples/ima-load.cc.raw \
+samples/ima2d-restricted-1.cc.raw \
+samples/graph-iter.cc \
+samples/labeling-compute.cc \
+samples/ima2d-7.cc \
+samples/ima2d-restricted-2.cc.raw \
+samples/fill-subimage-cfun.cc \
+samples/ima-save.cc \
+samples/point-1.cc \
+samples/box2d-bbox.cc \
+samples/forall-piter.cc \
+samples/ima-size.cc \
+samples/borderthickness.cc \
+samples/Makefile.in \
+samples/ima-has.cc \
+samples/win-create-1.cc \
samples/accu-wrong-instanciation.cc.raw \
-samples/accu-right-instanciation.cc \
-samples/ima2d-5.cc \
-samples/fill-subdomain.cc \
-samples/fill-subdomain-shorter.cc \
-samples/ima2d-2.cc \
-samples/extension-ignore.cc \
-samples/Makefile.am \
-samples/parray-bbox.cc \
-samples/graph-data.cc \
-samples/mln_var.cc \
-samples/ima2d-4.cc \
-samples/predicate-1.cc \
-samples/ima2d-3.cc \
-samples/ima2d-1.cc \
-samples/estim-sites.cc \
-samples/ima2d-6-clone.cc \
-samples/ima2d-restricted-3.cc.raw \
-samples/logical-not.cc \
-samples/fun-p2v-1.cc \
-samples/ima2d-rot.cc \
-samples/fill-part-image.cc \
-samples/domain-display.cc \
-samples/paste.cc \
-samples/fill.cc \
-samples/fill-call-1.cc \
+samples/accu-right-instanciation.cc \
+samples/ima2d-5.cc \
+samples/fill-subdomain.cc \
+samples/fill-subdomain-shorter.cc \
+samples/ima2d-2.cc \
+samples/extension-ignore.cc \
+samples/Makefile.am \
+samples/parray-bbox.cc \
+samples/graph-data.cc \
+samples/mln_var.cc \
+samples/ima2d-4.cc \
+samples/predicate-1.cc \
+samples/ima2d-3.cc \
+samples/ima2d-1.cc \
+samples/estim-sites.cc \
+samples/ima2d-6-clone.cc \
+samples/ima2d-restricted-3.cc.raw \
+samples/logical-not.cc \
+samples/fun-p2v-1.cc \
+samples/ima2d-rot.cc \
+samples/fill-part-image.cc \
+samples/domain-display.cc \
+samples/paste.cc \
+samples/fill.cc \
+samples/fill-call-1.cc \
samples/win-create-2.cc
EXTRA_DIST += \
--
1.5.6.5
1
0
* doc/tutorial/tutorial.tex: add copyright and improve input code
style.
* tests/Makefile.am: enable registration test.
* tests/core/routine/clone.cc,
* tests/geom/seed2tiling_roundness.cc: update comments.
* tests/draw/graph.cc,
* tests/registration/registration.cc: fix test.
* headers.mk: add new includes in distributed headers.
* tests/unit_test/Makefile.am,
* tests/unit_test/mln_core_concept_meta_fun.cc,
* tests/unit_test/mln_core_image_violent_cast_image.cc,
* tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc,
* tests/unit_test/mln_math_acos.cc,
* tests/unit_test/mln_math_cos.cc,
* tests/unit_test/mln_opt_at.cc,
* tests/unit_test/mln_value_hsl.cc,
* tests/unit_test/mln_value_mixin.cc,
* tests/unit_test/mln_value_shell.cc: add new unit tests.
* tests/value/Makefile.am: disable graylevel and float related tests.
* tests/core/image/Makefile.am: disable tr_image test.
---
milena/ChangeLog | 32 ++++++++++++
milena/doc/tutorial/tutorial.tex | 53 ++++++++++++++------
milena/headers.mk | 10 ++++
milena/tests/Makefile.am | 1 +
milena/tests/core/image/Makefile.am | 6 +-
milena/tests/core/routine/clone.cc | 10 ++--
milena/tests/draw/graph.cc | 9 ++--
milena/tests/geom/seed2tiling_roundness.cc | 10 ++--
milena/tests/registration/registration.cc | 15 +++---
milena/tests/unit_test/Makefile.am | 18 +++++++
.../tests/unit_test/mln_core_concept_meta_fun.cc | 11 ++++
.../unit_test/mln_core_image_violent_cast_image.cc | 11 ++++
milena/tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc | 11 ++++
milena/tests/unit_test/mln_math_acos.cc | 11 ++++
milena/tests/unit_test/mln_math_cos.cc | 11 ++++
milena/tests/unit_test/mln_opt_at.cc | 11 ++++
milena/tests/unit_test/mln_value_hsl.cc | 11 ++++
milena/tests/unit_test/mln_value_mixin.cc | 11 ++++
milena/tests/unit_test/mln_value_shell.cc | 11 ++++
milena/tests/value/Makefile.am | 21 ++++----
20 files changed, 234 insertions(+), 50 deletions(-)
create mode 100644 milena/tests/unit_test/mln_core_concept_meta_fun.cc
create mode 100644 milena/tests/unit_test/mln_core_image_violent_cast_image.cc
create mode 100644 milena/tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc
create mode 100644 milena/tests/unit_test/mln_math_acos.cc
create mode 100644 milena/tests/unit_test/mln_math_cos.cc
create mode 100644 milena/tests/unit_test/mln_opt_at.cc
create mode 100644 milena/tests/unit_test/mln_value_hsl.cc
create mode 100644 milena/tests/unit_test/mln_value_mixin.cc
create mode 100644 milena/tests/unit_test/mln_value_shell.cc
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 0b310e2..43bf51d 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,35 @@
+2008-12-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix few tests.
+
+ * doc/tutorial/tutorial.tex: add copyright and improve input code
+ style.
+
+ * tests/Makefile.am: enable registration test.
+
+ * tests/core/routine/clone.cc,
+ * tests/geom/seed2tiling_roundness.cc: update comments.
+
+ * tests/draw/graph.cc,
+ * tests/registration/registration.cc: fix test.
+
+ * headers.mk: add new includes in distributed headers.
+
+ * tests/unit_test/Makefile.am,
+ * tests/unit_test/mln_core_concept_meta_fun.cc,
+ * tests/unit_test/mln_core_image_violent_cast_image.cc,
+ * tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc,
+ * tests/unit_test/mln_math_acos.cc,
+ * tests/unit_test/mln_math_cos.cc,
+ * tests/unit_test/mln_opt_at.cc,
+ * tests/unit_test/mln_value_hsl.cc,
+ * tests/unit_test/mln_value_mixin.cc,
+ * tests/unit_test/mln_value_shell.cc: add new unit tests.
+
+ * tests/value/Makefile.am: disable graylevel and float related tests.
+
+ * tests/core/image/Makefile.am: disable tr_image test.
+
2008-12-18 Nicolas Ballas <ballas(a)lrde.epita.fr>
Replace some remaining .at by opt::at.
diff --git a/milena/doc/tutorial/tutorial.tex b/milena/doc/tutorial/tutorial.tex
index 5e36f28..f8e758b 100644
--- a/milena/doc/tutorial/tutorial.tex
+++ b/milena/doc/tutorial/tutorial.tex
@@ -17,9 +17,10 @@
\end{figure}
}
-\title{Olena - Quick Reference Guide}
+\title{Olena -- Quick Reference Guide}
\author{LRDE}
\date{}
+\makeindex
\definecolor{ccomment}{rgb}{0.5,0,0}
\definecolor{cstring}{rgb}{0,0.32,0.5}
@@ -27,18 +28,22 @@
\definecolor{cbg}{rgb}{0.95,0.95,0.95}
%%%LISTINGS SETTINGS
-%begin{latexonly}
+%\begin{latexonly}
\lstset{frameround=fttt}
-\lstloadlanguages{C++}
-\lstset{language=C++}
-
-\lstset{backgroundcolor=\color{cbg},
-basicstyle=\bfseries\color{black},
-identifierstyle=\color{black},
-stringstyle=\color{cstring},
-commentstyle=\color{ccomment},
-showstringspaces=false,linewidth=14cm}
-%end{latexonly}
+\lstloadlanguages{[ISO]C++}
+\lstset{language=[ISO]C++,
+ captionpos=b,
+ basicstyle={\small\sffamily}, % normal small footnotesize scriptsize tiny
+ commentstyle=\itshape,
+ showstringspaces=false,
+ numberstyle=\tiny,
+ morekeywords={where, auto, concept, concept_map, axiom, late_check, final, abstract},
+ morecomment=[s]{/*}{*/},
+ backgroundcolor=\color{cbg},
+ identifierstyle=\color{black},
+ stringstyle=\color{cstring}
+}
+%\end{latexonly}
% #1 : sub page name
% #2 : sub page title
@@ -112,7 +117,9 @@ showstringspaces=false,linewidth=14cm}
}
\newcommand{\tutotoc}[2]{%
-\longleftarrow ~Go to \doxyref{#1} Go to \doxyref{#2}~ \longrightarrow%
+\begin{center}%
+ \longleftarrow ~Go to \doxyref{#1} \hspace{1cm} | \hspace{1cm} Go to \doxyref{#2}~ \longrightarrow%
+\end{center}%
}
\newenvironment{doxymath}
@@ -312,9 +319,23 @@ $$
\end{htmlonly}
\begin{latexonly}
+\maketitle
+
+\section*{Copying this document}
+Copyright \copyright{} 2006 LRDE.
+
+Permission is granted to copy, distribute and/or modify this document under
+the terms of the GNU Free Documentation License, Version 1.2 or any later
+version published by the Free Software Foundation; with the Invariant Sections
+being just ``Copying this document'', no Front-Cover Texts, and no Back-Cover
+Texts.
+
+A copy of the license is provided in the file COPYING.DOC.
+
\tableofcontents
\end{latexonly}
+\begin{htmlonly}
%====================================
\doxychapter{tutoforeword}{Step 0: Foreword}
@@ -380,6 +401,8 @@ The supported file formats are listed in section \doxyref{imaio}.
%====================================
\doxychapter{tutograph}{Step 6: Handle graphes with an image}
+\end{htmlonly}
+
%====================================
\doxychapter{installation}{Installation}
@@ -502,11 +525,11 @@ Intersection == point 2d == milieu d'un pixel \\
%FIXME: Find a way to get that figure in HTML output.
\begin{latexonly}
-\begin{tikzpicture}[scale=2]
+\begin{tikzpicture}[scale=1]
\draw[blue!20, thick] (-2, -2) grid [right=0.5cm,above=0.5cm,step=1cm] (3, 3);
\draw[line width=1mm] (-1, -1) grid [step=1cm] (3, 3);
-\draw[black,line width=2mm,->] (0, -2) node {y} -- (0, 4);
+\draw[black,line width=2mm,<-] (0, -2) node {y} -- (0, 4);
\draw[black,line width=2mm,->] (-2, 3) node {x} -- (4, 3);
\foreach \x in {-0.5, 0.5, 1.5, 2.5}
diff --git a/milena/headers.mk b/milena/headers.mk
index 146e616..895ce0e 100644
--- a/milena/headers.mk
+++ b/milena/headers.mk
@@ -199,6 +199,7 @@ mln/fun/v2v/inc.hh \
mln/fun/v2v/all.hh \
mln/fun/v2v/dec.hh \
mln/fun/v2v/abs.hh \
+mln/fun/v2v/rgb_to_hsl.hh \
mln/fun/v2v/cast.hh \
mln/fun/v2v/ch_function_value.hh \
mln/fun/v2v/rgb_to_hsi.hh \
@@ -254,6 +255,7 @@ mln/convert/to_p_array.hh \
mln/convert/from_to.hxx \
mln/convert/to_rgb.hh \
mln/convert/essential.hh \
+mln/value/shell.hh \
mln/value/float01_f.hh \
mln/value/float01_16.hh \
mln/value/lut_vec.hh \
@@ -279,6 +281,7 @@ mln/value/internal/gray_.hh \
mln/value/internal/essential.hh \
mln/value/proxy.hh \
mln/value/viter.hh \
+mln/value/hsl.hh \
mln/value/graylevel.hh \
mln/value/all.hh \
mln/value/super_value.hh \
@@ -301,6 +304,7 @@ mln/value/int_s8.hh \
mln/value/int_s16.hh \
mln/value/int_u16.hh \
mln/value/label.hh \
+mln/value/mixin.hh \
mln/value/rgb.hh \
mln/value/stack.hh \
mln/value/concept/integer.hh \
@@ -406,12 +410,15 @@ mln/math/sqr.hh \
mln/math/all.hh \
mln/math/sign.hh \
mln/math/abs.hh \
+mln/math/cos.hh \
mln/math/diff_abs.hh \
mln/math/round.hh \
mln/math/min.hh \
mln/math/sqrt.hh \
mln/math/essential.hh \
+mln/math/acos.hh \
mln/math/round_sat.hh \
+mln/opt/at.hh \
mln/binarization/includes.hh \
mln/binarization/all.hh \
mln/binarization/binarization.hh \
@@ -758,6 +765,7 @@ mln/core/routine/all.hh \
mln/core/routine/clone.hh \
mln/core/routine/exact.hh \
mln/core/routine/extend.hh \
+mln/core/routine/init.hxx \
mln/core/routine/essential.hh \
mln/core/trait/op_mult.hh \
mln/core/trait/all.hh \
@@ -849,6 +857,7 @@ mln/core/concept/accumulator.hh \
mln/core/concept/site_set.hh \
mln/core/concept/proxy.hxx \
mln/core/concept/object.hh \
+mln/core/concept/meta_fun.hh \
mln/core/concept/delta_point_site.hh \
mln/core/concept/status.txt \
mln/core/concept/neighborhood.hh \
@@ -902,6 +911,7 @@ mln/core/image/image2d_h.hh \
mln/core/image/image2d.hh \
mln/core/image/ch_piter.hh \
mln/core/image/complex_windows.hh \
+mln/core/image/violent_cast_image.hh \
mln/core/image/mono_obased_rle_encode.hh \
mln/core/image/status.txt \
mln/core/image/value_encode.hh \
diff --git a/milena/tests/Makefile.am b/milena/tests/Makefile.am
index 0c9a02a..6c69c7e 100644
--- a/milena/tests/Makefile.am
+++ b/milena/tests/Makefile.am
@@ -32,6 +32,7 @@ SUBDIRS = \
norm \
opt \
pw \
+ registration \
set \
subsampling \
tag \
diff --git a/milena/tests/core/image/Makefile.am b/milena/tests/core/image/Makefile.am
index a28dc4e..cfbba60 100644
--- a/milena/tests/core/image/Makefile.am
+++ b/milena/tests/core/image/Makefile.am
@@ -26,8 +26,8 @@ check_PROGRAMS = \
safe_image \
## sparse_image \
sub_image \
- t_image \
- tr_image
+ t_image
+## tr_image
## value_enc_image
##bgraph_image_SOURCES = bgraph_image.cc
@@ -53,7 +53,7 @@ safe_image_SOURCES = safe_image.cc
##sparse_image_SOURCES = sparse_image.cc
sub_image_SOURCES = sub_image.cc
t_image_SOURCES = t_image.cc
-tr_image_SOURCES = tr_image.cc
+##tr_image_SOURCES = tr_image.cc
##value_enc_image_SOURCES = value_enc_image.cc
# Tests depending on the FreeImagePlus library.
diff --git a/milena/tests/core/routine/clone.cc b/milena/tests/core/routine/clone.cc
index 63734a4..5390e04 100644
--- a/milena/tests/core/routine/clone.cc
+++ b/milena/tests/core/routine/clone.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/core/routine/clone.cc
- *
- * \brief Tests on mln::clone.
- */
+/// \file tests/core/routine/clone.cc
+///
+/// Tests on mln::clone.
#include <mln/core/image/image2d.hh>
#include <mln/core/image/sub_image.hh>
diff --git a/milena/tests/draw/graph.cc b/milena/tests/draw/graph.cc
index ec13158..97410a0 100644
--- a/milena/tests/draw/graph.cc
+++ b/milena/tests/draw/graph.cc
@@ -54,9 +54,8 @@ using namespace mln;
// FIXME: We might want to extract NROWS and NCOLS from REF instead of
// getting them from the caller.
-void
-test(points_type& points, const edges_type& edges,
- unsigned nrows, unsigned ncols, const mln::image2d<int>& ref)
+void do_test(points_type& points, const edges_type& edges,
+ unsigned nrows, unsigned ncols, const mln::image2d<int>& ref)
{
// Graph.
typedef util::graph G;
@@ -104,7 +103,7 @@ main()
edges_type edges;
edges.push_back(std::make_pair(0, 1));
- test(points, edges, 3, 3, ref);
+ do_test(points, edges, 3, 3, ref);
}
@@ -138,6 +137,6 @@ main()
edges.push_back(std::make_pair(3, 4));
edges.push_back(std::make_pair(4, 2));
- test(points, edges, 5, 5, ref);
+ do_test(points, edges, 5, 5, ref);
}
}
diff --git a/milena/tests/geom/seed2tiling_roundness.cc b/milena/tests/geom/seed2tiling_roundness.cc
index 2c1a776..29f8b2e 100644
--- a/milena/tests/geom/seed2tiling_roundness.cc
+++ b/milena/tests/geom/seed2tiling_roundness.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -25,10 +26,9 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/geom/seed2tiling_roundness.cc
- *
- * \brief Tests on mln::geom::seed2tiling_roundness.
- */
+/// \file tests/geom/seed2tiling_roundness.cc
+///
+/// Tests on mln::geom::seed2tiling_roundness.
# include <mln/core/image/image2d.hh>
# include <mln/core/alias/neighb2d.hh>
diff --git a/milena/tests/registration/registration.cc b/milena/tests/registration/registration.cc
index d7e8de4..e7de850 100644
--- a/milena/tests/registration/registration.cc
+++ b/milena/tests/registration/registration.cc
@@ -25,15 +25,16 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/registration/registration.cc
- *
- * \brief Test on mln::registration::registration.cc
- */
+/// \file tests/registration/registration.cc
+///
+/// Test on mln::registration::registration.cc
+///
+#include "tests/data.hh"
#include <mln/io/pbm/all.hh>
#include <mln/registration/registration.hh>
-int main(int argc, char **argv)
+int main()
{
using namespace mln;
@@ -41,8 +42,8 @@ int main(int argc, char **argv)
image2d< bool > img2;
//load images
- io::pbm::load(img1, MLN_IMG_DIR "/lena.pbm");
- io::pbm::load(img2, MLN_IMG_DIR "/lena.pbm");
+ io::pbm::load(img1, MLN_IMG_DIR "/tiny.pbm");
+ io::pbm::load(img2, MLN_IMG_DIR "/tiny.pbm");
registration::registration(img1,img2);
//FIXME: Auto test result
diff --git a/milena/tests/unit_test/Makefile.am b/milena/tests/unit_test/Makefile.am
index a740cc1..d77cdde 100644
--- a/milena/tests/unit_test/Makefile.am
+++ b/milena/tests/unit_test/Makefile.am
@@ -200,6 +200,7 @@ mln_fun_v2v_inc \
mln_fun_v2v_all \
mln_fun_v2v_dec \
mln_fun_v2v_abs \
+mln_fun_v2v_rgb_to_hsl \
mln_fun_v2v_cast \
mln_fun_v2v_ch_function_value \
mln_fun_v2v_rgb_to_hsi \
@@ -254,6 +255,7 @@ mln_convert_to_dpoint \
mln_convert_to_p_array \
mln_convert_to_rgb \
mln_convert_essential \
+mln_value_shell \
mln_value_float01_f \
mln_value_float01_16 \
mln_value_lut_vec \
@@ -279,6 +281,7 @@ mln_value_internal_gray_ \
mln_value_internal_essential \
mln_value_proxy \
mln_value_viter \
+mln_value_hsl \
mln_value_graylevel \
mln_value_all \
mln_value_super_value \
@@ -301,6 +304,7 @@ mln_value_int_s8 \
mln_value_int_s16 \
mln_value_int_u16 \
mln_value_label \
+mln_value_mixin \
mln_value_rgb \
mln_value_stack \
mln_value_concept_integer \
@@ -400,12 +404,15 @@ mln_math_sqr \
mln_math_all \
mln_math_sign \
mln_math_abs \
+mln_math_cos \
mln_math_diff_abs \
mln_math_round \
mln_math_min \
mln_math_sqrt \
mln_math_essential \
+mln_math_acos \
mln_math_round_sat \
+mln_opt_at \
mln_binarization_includes \
mln_binarization_all \
mln_binarization_binarization \
@@ -822,6 +829,7 @@ mln_core_concept_value \
mln_core_concept_accumulator \
mln_core_concept_site_set \
mln_core_concept_object \
+mln_core_concept_meta_fun \
mln_core_concept_delta_point_site \
mln_core_concept_neighborhood \
mln_core_concept_browsing \
@@ -874,6 +882,7 @@ mln_core_image_image2d_h \
mln_core_image_image2d \
mln_core_image_ch_piter \
mln_core_image_complex_windows \
+mln_core_image_violent_cast_image \
mln_core_image_mono_obased_rle_encode \
mln_core_image_value_encode \
mln_core_image_essential \
@@ -1192,6 +1201,7 @@ mln_fun_v2v_inc_SOURCES = mln_fun_v2v_inc.cc
mln_fun_v2v_all_SOURCES = mln_fun_v2v_all.cc
mln_fun_v2v_dec_SOURCES = mln_fun_v2v_dec.cc
mln_fun_v2v_abs_SOURCES = mln_fun_v2v_abs.cc
+mln_fun_v2v_rgb_to_hsl_SOURCES = mln_fun_v2v_rgb_to_hsl.cc
mln_fun_v2v_cast_SOURCES = mln_fun_v2v_cast.cc
mln_fun_v2v_ch_function_value_SOURCES = mln_fun_v2v_ch_function_value.cc
mln_fun_v2v_rgb_to_hsi_SOURCES = mln_fun_v2v_rgb_to_hsi.cc
@@ -1246,6 +1256,7 @@ mln_convert_to_dpoint_SOURCES = mln_convert_to_dpoint.cc
mln_convert_to_p_array_SOURCES = mln_convert_to_p_array.cc
mln_convert_to_rgb_SOURCES = mln_convert_to_rgb.cc
mln_convert_essential_SOURCES = mln_convert_essential.cc
+mln_value_shell_SOURCES = mln_value_shell.cc
mln_value_float01_f_SOURCES = mln_value_float01_f.cc
mln_value_float01_16_SOURCES = mln_value_float01_16.cc
mln_value_lut_vec_SOURCES = mln_value_lut_vec.cc
@@ -1271,6 +1282,7 @@ mln_value_internal_gray__SOURCES = mln_value_internal_gray_.cc
mln_value_internal_essential_SOURCES = mln_value_internal_essential.cc
mln_value_proxy_SOURCES = mln_value_proxy.cc
mln_value_viter_SOURCES = mln_value_viter.cc
+mln_value_hsl_SOURCES = mln_value_hsl.cc
mln_value_graylevel_SOURCES = mln_value_graylevel.cc
mln_value_all_SOURCES = mln_value_all.cc
mln_value_super_value_SOURCES = mln_value_super_value.cc
@@ -1293,6 +1305,7 @@ mln_value_int_s8_SOURCES = mln_value_int_s8.cc
mln_value_int_s16_SOURCES = mln_value_int_s16.cc
mln_value_int_u16_SOURCES = mln_value_int_u16.cc
mln_value_label_SOURCES = mln_value_label.cc
+mln_value_mixin_SOURCES = mln_value_mixin.cc
mln_value_rgb_SOURCES = mln_value_rgb.cc
mln_value_stack_SOURCES = mln_value_stack.cc
mln_value_concept_integer_SOURCES = mln_value_concept_integer.cc
@@ -1392,12 +1405,15 @@ mln_math_sqr_SOURCES = mln_math_sqr.cc
mln_math_all_SOURCES = mln_math_all.cc
mln_math_sign_SOURCES = mln_math_sign.cc
mln_math_abs_SOURCES = mln_math_abs.cc
+mln_math_cos_SOURCES = mln_math_cos.cc
mln_math_diff_abs_SOURCES = mln_math_diff_abs.cc
mln_math_round_SOURCES = mln_math_round.cc
mln_math_min_SOURCES = mln_math_min.cc
mln_math_sqrt_SOURCES = mln_math_sqrt.cc
mln_math_essential_SOURCES = mln_math_essential.cc
+mln_math_acos_SOURCES = mln_math_acos.cc
mln_math_round_sat_SOURCES = mln_math_round_sat.cc
+mln_opt_at_SOURCES = mln_opt_at.cc
mln_binarization_includes_SOURCES = mln_binarization_includes.cc
mln_binarization_all_SOURCES = mln_binarization_all.cc
mln_binarization_binarization_SOURCES = mln_binarization_binarization.cc
@@ -1814,6 +1830,7 @@ 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_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
mln_core_concept_neighborhood_SOURCES = mln_core_concept_neighborhood.cc
mln_core_concept_browsing_SOURCES = mln_core_concept_browsing.cc
@@ -1866,6 +1883,7 @@ mln_core_image_image2d_h_SOURCES = mln_core_image_image2d_h.cc
mln_core_image_image2d_SOURCES = mln_core_image_image2d.cc
mln_core_image_ch_piter_SOURCES = mln_core_image_ch_piter.cc
mln_core_image_complex_windows_SOURCES = mln_core_image_complex_windows.cc
+mln_core_image_violent_cast_image_SOURCES = mln_core_image_violent_cast_image.cc
mln_core_image_mono_obased_rle_encode_SOURCES = mln_core_image_mono_obased_rle_encode.cc
mln_core_image_value_encode_SOURCES = mln_core_image_value_encode.cc
mln_core_image_essential_SOURCES = mln_core_image_essential.cc
diff --git a/milena/tests/unit_test/mln_core_concept_meta_fun.cc b/milena/tests/unit_test/mln_core_concept_meta_fun.cc
new file mode 100644
index 0000000..54201d8
--- /dev/null
+++ b/milena/tests/unit_test/mln_core_concept_meta_fun.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/core/concept/meta_fun.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/core/concept/meta_fun.hh>
+#include <mln/core/concept/meta_fun.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_core_image_violent_cast_image.cc b/milena/tests/unit_test/mln_core_image_violent_cast_image.cc
new file mode 100644
index 0000000..f271a6a
--- /dev/null
+++ b/milena/tests/unit_test/mln_core_image_violent_cast_image.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/core/image/violent_cast_image.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/core/image/violent_cast_image.hh>
+#include <mln/core/image/violent_cast_image.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc b/milena/tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc
new file mode 100644
index 0000000..dc517ac
--- /dev/null
+++ b/milena/tests/unit_test/mln_fun_v2v_rgb_to_hsl.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/fun/v2v/rgb_to_hsl.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/fun/v2v/rgb_to_hsl.hh>
+#include <mln/fun/v2v/rgb_to_hsl.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_math_acos.cc b/milena/tests/unit_test/mln_math_acos.cc
new file mode 100644
index 0000000..41d41fd
--- /dev/null
+++ b/milena/tests/unit_test/mln_math_acos.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/math/acos.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/math/acos.hh>
+#include <mln/math/acos.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_math_cos.cc b/milena/tests/unit_test/mln_math_cos.cc
new file mode 100644
index 0000000..d77093a
--- /dev/null
+++ b/milena/tests/unit_test/mln_math_cos.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/math/cos.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/math/cos.hh>
+#include <mln/math/cos.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_opt_at.cc b/milena/tests/unit_test/mln_opt_at.cc
new file mode 100644
index 0000000..840e371
--- /dev/null
+++ b/milena/tests/unit_test/mln_opt_at.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/opt/at.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/opt/at.hh>
+#include <mln/opt/at.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_value_hsl.cc b/milena/tests/unit_test/mln_value_hsl.cc
new file mode 100644
index 0000000..d3134aa
--- /dev/null
+++ b/milena/tests/unit_test/mln_value_hsl.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/value/hsl.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/value/hsl.hh>
+#include <mln/value/hsl.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_value_mixin.cc b/milena/tests/unit_test/mln_value_mixin.cc
new file mode 100644
index 0000000..9ce90c5
--- /dev/null
+++ b/milena/tests/unit_test/mln_value_mixin.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/value/mixin.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/value/mixin.hh>
+#include <mln/value/mixin.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/unit_test/mln_value_shell.cc b/milena/tests/unit_test/mln_value_shell.cc
new file mode 100644
index 0000000..ae01f9b
--- /dev/null
+++ b/milena/tests/unit_test/mln_value_shell.cc
@@ -0,0 +1,11 @@
+// Unit test for mln/value/shell.hh.
+// Generated by ./build_unit_test.sh, do not modify.
+
+// Include the file twice, so we detect missing inclusion guards.
+#include <mln/value/shell.hh>
+#include <mln/value/shell.hh>
+
+int main()
+{
+ // Nothing.
+}
diff --git a/milena/tests/value/Makefile.am b/milena/tests/value/Makefile.am
index 4fa0d36..f96a17d 100644
--- a/milena/tests/value/Makefile.am
+++ b/milena/tests/value/Makefile.am
@@ -10,14 +10,10 @@ SUBDIRS = \
builtin \
concept
+#FIXME: re-enable all the tests.
check_PROGRAMS = \
bool \
equiv \
- float01 \
- float01_bis \
- float01_f \
- graylevel \
- graylevel_f \
int_s \
int_s16 \
int_u8 \
@@ -29,6 +25,11 @@ check_PROGRAMS = \
set \
sign \
stack
+# float01
+# float01_bis
+# float01_f
+# graylevel
+# graylevel_f
# FIXME: Enable when make check_full works.
# check_full_PROGRAMS = \
@@ -38,11 +39,11 @@ check_PROGRAMS = \
bool_SOURCES = bool.cc
equiv_SOURCES = equiv.cc
-float01_SOURCES = float01.cc
-float01_bis_SOURCES = float01_bis.cc
-float01_f_SOURCES = float01_f.cc
-graylevel_SOURCES = graylevel.cc
-graylevel_f_SOURCES = graylevel_f.cc
+#float01_SOURCES = float01.cc
+#float01_bis_SOURCES = float01_bis.cc
+#float01_f_SOURCES = float01_f.cc
+#graylevel_SOURCES = graylevel.cc
+#graylevel_f_SOURCES = graylevel_f.cc
interop_SOURCES = interop.cc
int_s_SOURCES = int_s.cc
int_s16_SOURCES = int_s16.cc
--
1.5.6.5
1
0
* configure.ac: add missing Makefile entry.
* INSTALL,
* README: new files.
---
ChangeLog | 9 ++
INSTALL | 243 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NEWS | 2 +-
README | 83 ++++++++++++++++++++
configure.ac | 9 ++-
5 files changed, 342 insertions(+), 4 deletions(-)
create mode 100644 INSTALL
create mode 100644 README
diff --git a/ChangeLog b/ChangeLog
index f10f343..8613740 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-12-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Add missing INSTALL and README.
+
+ * configure.ac: add missing Makefile entry.
+
+ * INSTALL,
+ * README: new files.
+
2008-12-18 Nicolas Ballas <ballas(a)lrde.epita.fr>
Add milena/tests/opt/Makefile in configure.ac.
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..354f7c0
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,243 @@
+This file contains information about the installation process of Olena.
+
+ You can read the `README' file for general information about Olena.
+
+1.1 Required software
+=====================
+
+Here is a non-exhaustive list of required software required to build
+Olena successfully.
+
+ * to compile the user examples:
+ - a POSIX shell, like Bash
+
+ - a decent C++ compiler, like GNU C++
+
+ - a `make' utility, like GNU or BSD `make'
+
+Optional:
+
+ * to compile the documentation:
+ - a LaTeX distribution
+
+ - the `listings' TeX package
+
+ - the utility `convert' from ImageMagick
+
+ - GNU Autogen
+
+ - `hevea', a TeX to HTML conversion tool
+
+ - the `texinfo' utilities from GNU
+
+ * to develop _in_ Olena:
+ - GNU Autotools (Autoconf 2.54, Automake 1.7)
+
+
+1.2 Configuration
+=================
+
+In order to prepare the build process, you need to configure the source
+tree.
+
+ Assuming your Olena distribution is uncompressed in directory
+`olena-1.0', follow these steps:
+
+ $ mkdir ../build
+ $ cd ../build && ../olena-1.0/configure CXXFLAGS=''
+
+ *Note:* take care to set `CXXFLAGS' always when running `configure',
+for the default value computed by `configure' may yield to compilation
+issues (conflicts between optimization and debugging).
+
+ The build process can be altered by a number of options you can pass
+to the `configure' script. The following sections describe them.
+
+ Additionally, if you are an Olena maintainer (a person who runs
+`make distcheck'), _prefer setting `CXXFLAGS' as an environment
+variable_: the flags given on the commandline to `configure' are not
+propagated to recursive runs by `make distcheck'.
+
+
+1.2.1 Installation path
+-----------------------
+
+By default, Olena is installed in the standard "local" directory of
+your system. This is usually `/usr/local' under Unix.
+
+ You can change this path with the following flag:
+
+ --prefix=<installation prefix>
+
+
+1.2.2 Compiler selection and compilation flags
+----------------------------------------------
+
+By default, `configure' will try to use the first C++ compiler it
+encounters on your system. If `CXX' is not set, it will look, in order,
+for:
+
+ - the value of the `CCC' environment variable,
+
+ - the GNU C++ compiler (`g++'),
+
+ - the `c++' or `gpp' commands on your system,
+
+ - `aCC', the HP-UX standard C++ compiler,
+
+ - the `CC', `cxx', `cc++' or `cl' commands on your system,
+
+ - KAI's C++ compiler (`KCC'),
+
+ - `RCC', `xlC_r' or `xlC'.
+
+ You can override the detection system by passing your favorite
+compiler name to `configure', as follows:
+
+ $ .../configure CXX=<your-favorite-C++-compiler>
+
+ As an alternative, you can also set the environment variable `CXX'.
+
+
+
+ For most compilers, `configure' will select debugging and minimal
+optimization (`-g -O2' with g++), which is wrong. You should override
+the default C++ flags by giving `configure' your selection of flags:
+
+ $ .../configure CXXFLAGS="<your-favorite-flags>"
+
+ This is especially useful to solve a number of problems, described
+in the following section.
+
+
+1.3 Using `CXXFLAGS' to solve compilation problems
+==================================================
+
+1.3.1 Olena needs C99
+---------------------
+
+While Olena is written in C++, it uses a number of features (math
+functions) from ISO C99. However most C++ compilers do not enable these
+features by default. If your compilation fails with (e.g.) undefined
+references to `roundf', but you know what flags can activate these
+functions, add them to `CXXFLAGS'.
+
+ In case your system does not provide some math functions necessary
+for Olena, you can force the use of a local, overloaded, implementation,
+by using macros of the form `-DOLN_NEED_xxx', where `xxx' stands for
+the name of the missing function, in uppercase. For example, on Darwin
+(MacOS X), the flag `-DOLN_NEED_SQRTF' is needed (but `configure'
+should add it anyway).
+
+
+1.3.2 Olena needs deep template recursion
+-----------------------------------------
+
+The C++ design patterns used in Olena use deep template nesting and
+recursion. However, the C++ standard specifies that C++ compiler need
+only handle template recursion up to 19 levels, which is insufficient
+for Olena. This is a problem for GCC 2.95 and probably other compilers.
+
+ Hopefully, `configure' tries to fix this automatically by adding
+`-ftemplate-depth-NN' when necessary, but other compilers than GCC may
+need other flags. If you know these flags, add them to `CXXFLAGS'.
+
+
+1.3.3 Debugging flags make Olena slow
+-------------------------------------
+
+Because Olena depends on C++ optimizations to provide the best
+performance, and enabling debugging flags often disable optimizations,
+you are advised to override the `CXXFLAGS_OPTIMIZE' with any options
+that gives the best optimization/conformance tradeoff. However, note
+that passing `-DNDEBUG' disable many sanity checks, while providing
+only a poor performance improvement.
+
+
+
+1.3.4 Speeding up the compilation
+---------------------------------
+
+When using GCC, by default separate phases of the compilation of each
+file are run sequentially (compilation then assembly). Using `-pipe' in
+`CXXFLAGS' allows GCC to fork processes and run compilation phases in
+parallel, which brings a compilation speedup on multiprocessor machines
+or machines with slow storage access (when using `-pipe', no
+intermediary data is saved).
+
+
+1.4 Speeding up the configuration process
+=========================================
+
+`configure' can manage a cache of autodetected features and values.
+This cache speeds up `configure' runs and can be activated with the
+`-C' option.
+
+ _NOTE_: the effects of many of the flags passed to `configure' are
+stored in the cache. If you decide to re-run `configure' with other
+flags, delete the `config.cache' file first.
+
+
+1.5 Elidable components
+=======================
+
+Several build targets can be disabled, in case you are only interested
+in "parts" of the full Olena distribution.
+
+ The elidable parts are so-called "components", and you can obtain a
+list of them by running:
+
+ $ .../configure --help
+
+
+1.6 Building
+============
+
+Once your build directory is `configure'd, you can run
+
+ $ make
+
+ to recursively build all selected components.
+
+
+ Additionally, you can build and run the testsuite and demonstration
+programs with:
+
+ $ make check
+
+ However, this process is very time- and memory- consuming.
+
+
+1.7 Compiler notes
+==================
+
+Olena has been tested on the following configurations :
+
+System Compiler
+Linux g++ 4.0, 4.1, 4.2
+MacOS X g++ 4.0.1
+
+
+2.1 Installing
+==============
+
+To install the Olena headers and additional files on your system, run:
+
+ $ make install
+
+ from the build directory.
+
+ If not overridden with `--prefix' (see the BUILD file) , this will
+install:
+
+ * the headers in `/usr/local/include/mln',
+
+ * sample images in `/usr/local/share/milena',
+
+
+ You can later remove Olena from your system by running
+
+ $ make uninstall
+
+ from the build directory.
+
diff --git a/NEWS b/NEWS
index 81ecb85..766cbac 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-Olena 1.0
+Olena 1.0beta
* Rewritten from scratch.
* First release of the Olena Platform with Milena as the
diff --git a/README b/README
new file mode 100644
index 0000000..d9a09cb
--- /dev/null
+++ b/README
@@ -0,0 +1,83 @@
+Abstract
+********
+
+This is a public testing version of Olena, a generic image processing
+library in C++.
+
+ Please read the files INSTALL for information about building and
+installing Olena.
+
+ Olena is a project developed by the EPITA Research and Development
+Laboratory (<http://www.lrde.epita.fr>) since 1997. We did numerous
+prototypes and throwaway experiments before settling into the kind of
+programming paradigm which is finally here.
+
+ The documentation does not cover the whole project yet. In the `doc/'
+directory you will find the first draft of a reference manual. It
+includes a quick reference guide and a tutorial. This is a good start.
+In `milena/tools', `milena/doc/tutorial/samples' and `milena/doc/examples'
+few sample programs are available. Most of them are already used to
+illustrate the tutorial.
+For the rest, we're afraid you will have to dig the code or e-mail us.
+
+ Please direct any question or comments to <olena(a)lrde.epita.fr>, or
+<olena-bugs(a)lrde.epita.fr>.
+
+ Olena also has a web page, located at
+<http://www.lrde.epita.fr/Olena>.
+
+Bibliography
+============
+
+Further information about Olena can be found into the following related
+papers:
+
+ * Thierry Géraud, Yoann Fabre, Dimitri Papadopoulos-Orfanos, and
+ Jean-François Mangin. `Vers une réutilisabilité totale des
+ algorithmes de traitement d'images'. In the Proceedings of the
+ 17th Symposium GRETSI on Signal and Image Processing, vol. 2,
+ pages 331-334, Vannes, France, September 1999. In French
+ (available in English as Technical Report 9902: `Towards a Total
+ Reusability of Image Processing Algorithms').
+
+ * Thierry Géraud, Yoann Fabre, Alexandre Duret-Lutz, Dimitri
+ Papadopoulos-Orfanos, and Jean-François Mangin. `Obtaining
+ Genericity for Image Processing and Pattern Recognition
+ Algorithms'. In the Proceedings of the 15th International
+ Conference on Pattern Recognition (ICPR'2000), IEEE Computer
+ Society, vol. 4, pages 816-819, Barcelona, Spain, September 2000.
+
+ * Alexandre Duret-Lutz. `Olena: a Component-Based Platform for
+ Image Processing, mixing Generic, Generative and OO
+ Programming'. In the Proceedings of the 2nd International
+ Symposium on Generative and Component-Based Software Engineering
+ (GCSE 2000), Young Researchers Workshop (published in
+ "Net.ObjectDays2000"; ISBN 3-89683-932-2), pages 653-659,
+ Erfurt, Germany, October 2000.
+
+ * Alexandre Duret-Lutz, Thierry Géraud, and Akim Demaille. `Generic
+ Design Patterns in C++'. In the Proceedings of the 6th USENIX
+ Conference on Object-Oriented Technologies and Systems
+ (COOTS'2001), pages 189-202, San Antonio, Texas, USA,
+ January-February 2001.
+
+ * Thierry Géraud, Yoann Fabre, and Alexandre Duret-Lutz. `Applying
+ Generic Programming to Image Processing'. In the Proceedings of
+ the IASTED International Conference on Applied Informatics
+ (AI'2001) - Symposium Advances in Computer Applications, ACTA
+ Press, pages 577-581, Innsbruck, Austria, February 2001.
+
+ * `Generic Implementation of Morphological Image Operators',
+ Jérôme Darbon, Thierry Géraud, and Alexandre Duret-Lutz,
+ submitted to International Symposium On Mathematical Morphology VI
+ (ISMM 2002), April 3-5, 2002, Sydney, Australia.
+
+ * `Static C++ Object-Oriented Programming (SCOOP)' Nicolas
+ Burrus, Alexandre Duret-Lutz, Thierry Géraud, David Lesage, and
+ Raphaël Poss. In the Proceedings of the Workshop on Multiple
+ Paradigm with OO Languages (MPOOL'03) Anaheim, CA Oct. 2003.
+
+ You can download these papers and related materials from
+<http://www.lrde.epita.fr/cgi-bin/twiki/view/Publications>
+
+
diff --git a/configure.ac b/configure.ac
index 24e7ad3..ee54879 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,8 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
+m4_pattern_forbid([^MLN_])
+
AC_PREREQ([2.61])
@@ -8,7 +10,7 @@ AC_PREREQ([2.61])
## Package set up. ##
## ---------------- ##
-AC_INIT([Olena], [1.0], [olena(a)lrde.epita.fr] [olena])
+AC_INIT([Olena], [1.0beta], [olena(a)lrde.epita.fr] [olena])
# Auxiliary files.
AC_CONFIG_AUX_DIR([build-aux])
@@ -16,7 +18,7 @@ AC_CONFIG_FILES([build-aux/Makefile])
# Automake.
AM_INIT_AUTOMAKE([1.10 foreign check-news dist-bzip2 nostdinc -Wall])
-
+AC_CONFIG_HEADERS([config.h] [milena/mln/version.hh])
## --------------------- ##
## C++ compiler set up. ##
@@ -136,7 +138,7 @@ AC_CONFIG_FILES(m4_do([swilena/python/sps-local],
## --------------- ##
# Ask for config.h.
-AM_CONFIG_HEADER([config.h])
+#AM_CONFIG_HEADER([config.h])
# Ask for the Makefile creations.
AC_CONFIG_FILES([
@@ -219,6 +221,7 @@ AC_CONFIG_FILES([
milena/tests/norm/Makefile
milena/tests/opt/Makefile
milena/tests/pw/Makefile
+ milena/tests/registration/Makefile
milena/tests/set/Makefile
milena/tests/subsampling/Makefile
milena/tests/tag/Makefile
--
1.5.6.5
1
0