Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
olena-2.0-15-g6982d67 Fix compilation Warnings with latest g++ versions.
by Guillaume Lazzara 16 Nov '11
by Guillaume Lazzara 16 Nov '11
16 Nov '11
* apps/papers/levillain.09.ismm/graph.cc,
* mln/canvas/browsing/diagonal2d.hh,
* mln/morpho/watershed/topological.hh: Remove unused variable.
* mln/canvas/labeling/sorted.hh,
* mln/core/concept/accumulator.hh,
* mln/core/concept/box.hh,
* mln/core/concept/gdpoint.hh,
* mln/core/concept/generalized_pixel.hh,
* mln/core/concept/gpoint.hh,
* mln/core/concept/graph.hh,
* mln/core/concept/image.hh,
* mln/core/concept/iterator.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/proxy.hh,
* mln/core/concept/pseudo_site.hh,
* mln/core/concept/site_iterator.hh,
* mln/core/concept/site_proxy.hh,
* mln/core/concept/site_set.hh,
* mln/core/concept/value_iterator.hh,
* mln/core/concept/value_set.hh,
* mln/core/concept/weighted_window.hh,
* mln/core/concept/window.hh,
* mln/core/image/imorph/decorated_image.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/internal/site_relative_iterator_base.hh,
* mln/io/off/load.hh,
* mln/io/off/save.hh,
* mln/morpho/reconstruction/by_erosion/union_find.hh,
* mln/topo/internal/complex_relative_iterator_base.hh,
* tests/algebra/h_vec.cc,
* tests/core/alias/point1d.cc,
* tests/metal/unconst.cc,
* tests/morpho/complex_image_wst.cc,
* apps/papers/levillain.09.ismm/graph.cc,
* mln/canvas/browsing/diagonal2d.hh,
* mln/canvas/labeling/sorted.hh,
* mln/core/concept/accumulator.hh,
* mln/core/concept/box.hh,
* mln/core/concept/gdpoint.hh,
* mln/core/concept/generalized_pixel.hh,
* mln/core/concept/gpoint.hh,
* mln/core/concept/graph.hh,
* mln/core/concept/image.hh,
* mln/core/concept/iterator.hh,
* mln/core/concept/neighborhood.hh,
* mln/core/concept/proxy.hh,
* mln/core/concept/pseudo_site.hh,
* mln/core/concept/site_iterator.hh,
* mln/core/concept/site_proxy.hh,
* mln/core/concept/site_set.hh,
* mln/core/concept/value_iterator.hh,
* mln/core/concept/value_set.hh,
* mln/core/concept/weighted_window.hh,
* mln/core/concept/window.hh,
* mln/core/image/imorph/decorated_image.hh,
* mln/core/internal/check/image_fastest.hh,
* mln/core/internal/site_relative_iterator_base.hh,
* mln/io/off/load.hh,
* mln/io/off/save.hh,
* mln/morpho/reconstruction/by_erosion/union_find.hh,
* mln/morpho/watershed/topological.hh,
* mln/topo/internal/complex_relative_iterator_base.hh,
* tests/algebra/h_vec.cc,
* tests/core/alias/point1d.cc,
* tests/metal/unconst.cc,
* tests/morpho/complex_image_wst.cc,
* tests/trait/super.cc: Fix unused variable warnings.
---
milena/ChangeLog | 73 ++++++++++++++++++++
milena/apps/papers/levillain.09.ismm/graph.cc | 4 -
milena/mln/canvas/browsing/diagonal2d.hh | 7 +-
milena/mln/canvas/labeling/sorted.hh | 2 +-
milena/mln/core/concept/accumulator.hh | 15 ++--
milena/mln/core/concept/box.hh | 7 +-
milena/mln/core/concept/gdpoint.hh | 5 +-
milena/mln/core/concept/generalized_pixel.hh | 9 ++-
milena/mln/core/concept/gpoint.hh | 5 +-
milena/mln/core/concept/graph.hh | 34 +++++-----
milena/mln/core/concept/image.hh | 21 +++---
milena/mln/core/concept/iterator.hh | 11 ++--
milena/mln/core/concept/neighborhood.hh | 9 ++-
milena/mln/core/concept/proxy.hh | 5 +-
milena/mln/core/concept/pseudo_site.hh | 7 +-
milena/mln/core/concept/site_iterator.hh | 15 ++--
milena/mln/core/concept/site_proxy.hh | 7 +-
milena/mln/core/concept/site_set.hh | 23 +++---
milena/mln/core/concept/value_iterator.hh | 5 +-
milena/mln/core/concept/value_set.hh | 8 +-
milena/mln/core/concept/weighted_window.hh | 7 +-
milena/mln/core/concept/window.hh | 25 ++++---
milena/mln/core/image/imorph/decorated_image.hh | 4 +-
milena/mln/core/internal/check/image_fastest.hh | 21 +++---
.../core/internal/site_relative_iterator_base.hh | 10 ++--
milena/mln/io/off/load.hh | 9 ++-
milena/mln/io/off/save.hh | 5 +-
.../morpho/reconstruction/by_erosion/union_find.hh | 5 +-
milena/mln/morpho/watershed/topological.hh | 4 +-
.../internal/complex_relative_iterator_base.hh | 7 +-
milena/tests/algebra/h_vec.cc | 1 +
milena/tests/core/alias/point1d.cc | 4 +-
milena/tests/metal/unconst.cc | 9 ++-
milena/tests/morpho/complex_image_wst.cc | 2 +
milena/tests/trait/super.cc | 1 +
35 files changed, 244 insertions(+), 142 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 5ee2282..abe73a7 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,76 @@
+2011-11-16 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix compilation Warnings with latest g++ versions.
+
+ * apps/papers/levillain.09.ismm/graph.cc,
+ * mln/canvas/browsing/diagonal2d.hh,
+ * mln/morpho/watershed/topological.hh: Remove unused variable.
+
+ * mln/canvas/labeling/sorted.hh,
+ * mln/core/concept/accumulator.hh,
+ * mln/core/concept/box.hh,
+ * mln/core/concept/gdpoint.hh,
+ * mln/core/concept/generalized_pixel.hh,
+ * mln/core/concept/gpoint.hh,
+ * mln/core/concept/graph.hh,
+ * mln/core/concept/image.hh,
+ * mln/core/concept/iterator.hh,
+ * mln/core/concept/neighborhood.hh,
+ * mln/core/concept/proxy.hh,
+ * mln/core/concept/pseudo_site.hh,
+ * mln/core/concept/site_iterator.hh,
+ * mln/core/concept/site_proxy.hh,
+ * mln/core/concept/site_set.hh,
+ * mln/core/concept/value_iterator.hh,
+ * mln/core/concept/value_set.hh,
+ * mln/core/concept/weighted_window.hh,
+ * mln/core/concept/window.hh,
+ * mln/core/image/imorph/decorated_image.hh,
+ * mln/core/internal/check/image_fastest.hh,
+ * mln/core/internal/site_relative_iterator_base.hh,
+ * mln/io/off/load.hh,
+ * mln/io/off/save.hh,
+ * mln/morpho/reconstruction/by_erosion/union_find.hh,
+ * mln/topo/internal/complex_relative_iterator_base.hh,
+ * tests/algebra/h_vec.cc,
+ * tests/core/alias/point1d.cc,
+ * tests/metal/unconst.cc,
+ * tests/morpho/complex_image_wst.cc,
+ * apps/papers/levillain.09.ismm/graph.cc,
+ * mln/canvas/browsing/diagonal2d.hh,
+ * mln/canvas/labeling/sorted.hh,
+ * mln/core/concept/accumulator.hh,
+ * mln/core/concept/box.hh,
+ * mln/core/concept/gdpoint.hh,
+ * mln/core/concept/generalized_pixel.hh,
+ * mln/core/concept/gpoint.hh,
+ * mln/core/concept/graph.hh,
+ * mln/core/concept/image.hh,
+ * mln/core/concept/iterator.hh,
+ * mln/core/concept/neighborhood.hh,
+ * mln/core/concept/proxy.hh,
+ * mln/core/concept/pseudo_site.hh,
+ * mln/core/concept/site_iterator.hh,
+ * mln/core/concept/site_proxy.hh,
+ * mln/core/concept/site_set.hh,
+ * mln/core/concept/value_iterator.hh,
+ * mln/core/concept/value_set.hh,
+ * mln/core/concept/weighted_window.hh,
+ * mln/core/concept/window.hh,
+ * mln/core/image/imorph/decorated_image.hh,
+ * mln/core/internal/check/image_fastest.hh,
+ * mln/core/internal/site_relative_iterator_base.hh,
+ * mln/io/off/load.hh,
+ * mln/io/off/save.hh,
+ * mln/morpho/reconstruction/by_erosion/union_find.hh,
+ * mln/morpho/watershed/topological.hh,
+ * mln/topo/internal/complex_relative_iterator_base.hh,
+ * tests/algebra/h_vec.cc,
+ * tests/core/alias/point1d.cc,
+ * tests/metal/unconst.cc,
+ * tests/morpho/complex_image_wst.cc,
+ * tests/trait/super.cc: Fix unused variable warnings.
+
2011-10-28 Guillaume Lazzara <z(a)lrde.epita.fr>
* mln/core/image/dmorph/slice_image.hh: Add operator=() for
diff --git a/milena/apps/papers/levillain.09.ismm/graph.cc b/milena/apps/papers/levillain.09.ismm/graph.cc
index bd6f983..507bbc5 100644
--- a/milena/apps/papers/levillain.09.ismm/graph.cc
+++ b/milena/apps/papers/levillain.09.ismm/graph.cc
@@ -189,10 +189,8 @@ namespace mln
// Adjacent vertices.
adj_v.start();
topo::face<1> v1 = adj_v.unproxy_().face();
- point2d p1 = adj_v.to_site().front();
adj_v.next();
topo::face<1> v2 = adj_v.unproxy_().face();
- point2d p2 = adj_v.to_site().front();
adj_v.next();
mln_invariant(!adj_v.is_valid());
@@ -279,10 +277,8 @@ namespace mln
// Adjacent vertices.
adj_v.start();
topo::face<1> v1 = adj_v.unproxy_().face();
- point2d p1 = adj_v.to_site().front();
adj_v.next();
topo::face<1> v2 = adj_v.unproxy_().face();
- point2d p2 = adj_v.to_site().front();
adj_v.next();
mln_invariant(!adj_v.is_valid());
diff --git a/milena/mln/canvas/browsing/diagonal2d.hh b/milena/mln/canvas/browsing/diagonal2d.hh
index 056375b..7840362 100644
--- a/milena/mln/canvas/browsing/diagonal2d.hh
+++ b/milena/mln/canvas/browsing/diagonal2d.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -115,8 +115,7 @@ namespace mln
mln_deduce(I, psite, delta) diag;
psite
- pmin = f.input.domain().pmin(),
- pmax = f.input.domain().pmax();
+ pmin = f.input.domain().pmin();
f.p = pmin;
diff --git a/milena/mln/canvas/labeling/sorted.hh b/milena/mln/canvas/labeling/sorted.hh
index 4f7dd5f..69f2181 100644
--- a/milena/mln/canvas/labeling/sorted.hh
+++ b/milena/mln/canvas/labeling/sorted.hh
@@ -96,7 +96,7 @@ namespace mln
// Output.
mln_ch_value(I, L) output;
- bool status;
+ bool status; // FIXME: Is-it useful?
// Initialization.
{
diff --git a/milena/mln/core/concept/accumulator.hh b/milena/mln/core/concept/accumulator.hh
index fc39314..a28664e 100644
--- a/milena/mln/core/concept/accumulator.hh
+++ b/milena/mln/core/concept/accumulator.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -162,19 +163,19 @@ namespace mln
typedef mln_q_result(E) q_result;
void (E::*m1)() = & E::init;
- m1 = 0;
+ (void) m1;
void (E::*m2)(const argument&) = & E::take;
- m2 = 0;
+ (void) m2;
void (E::*m3)(const E&) = & E::take;
- m3 = 0;
+ (void) m3;
q_result (E::*m4)() const = & E::to_result;
- m4 = 0;
+ (void) m4;
q_result (E::*m5)() const = & E::operator q_result;
- m5 = 0;
+ (void) m5;
bool (E::*m6)() const = & E::is_valid;
- m6 = 0;
+ (void) m6;
}
diff --git a/milena/mln/core/concept/box.hh b/milena/mln/core/concept/box.hh
index 15696b4..849a8e4 100644
--- a/milena/mln/core/concept/box.hh
+++ b/milena/mln/core/concept/box.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -142,9 +143,9 @@ namespace mln
{
typedef mln_site(E) site;
site (E::*m1)() const = & E::pmin;
- m1 = 0;
+ (void) m1;
site (E::*m2)() const = & E::pmax;
- m2 = 0;
+ (void) m2;
}
template <typename E>
diff --git a/milena/mln/core/concept/gdpoint.hh b/milena/mln/core/concept/gdpoint.hh
index c5b0bbd..722db89 100644
--- a/milena/mln/core/concept/gdpoint.hh
+++ b/milena/mln/core/concept/gdpoint.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -166,7 +167,7 @@ namespace mln
typedef mln_grid(E) grid;
typedef mln_vec(E) vec;
vec (E::*m)() const = & E::to_vec;
- m = 0;
+ (void) m;
}
diff --git a/milena/mln/core/concept/generalized_pixel.hh b/milena/mln/core/concept/generalized_pixel.hh
index 7b3bb6e..ff9faf0 100644
--- a/milena/mln/core/concept/generalized_pixel.hh
+++ b/milena/mln/core/concept/generalized_pixel.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -83,15 +84,15 @@ namespace mln
typedef mln_rvalue(E) rvalue;
rvalue (E::*m1)() const = & E::val;
- m1 = 0;
+ (void) m1;
typedef mln_image(E) image;
// FIXME: check "without &"
image& (E::*m2)() const = & E::ima;
- m2 = 0;
+ (void) m2;
mln_qlf_value(image)** (E::*m3)() const = & E::address_;
- m3 = 0;
+ (void ) m3;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/core/concept/gpoint.hh b/milena/mln/core/concept/gpoint.hh
index f9bba11..410b36a 100644
--- a/milena/mln/core/concept/gpoint.hh
+++ b/milena/mln/core/concept/gpoint.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -302,7 +303,7 @@ namespace mln
typedef mln_delta(E) delta;
typedef mln_vec(E) vec;
vec (E::*m)() const = & E::to_vec;
- m = 0;
+ (void) m;
}
diff --git a/milena/mln/core/concept/graph.hh b/milena/mln/core/concept/graph.hh
index c351f9c..a266783 100644
--- a/milena/mln/core/concept/graph.hh
+++ b/milena/mln/core/concept/graph.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -113,38 +113,38 @@ namespace mln
// Check methods
const void* (E::*m1)() const = & E::id;
- m1 = 0;
+ (void) m1;
util::vertex_id_t (E::*m2)(const util::edge_id_t& id_e, const util::vertex_id_t& id_v) const = & E::v_other;
- m2 = 0;
+ (void) m2;
size_t (E::*m4)() const = & E::v_nmax;
- m4 = 0;
+ (void) m4;
bool (E::*m5)(const util::vertex_id_t& id_v) const = & E::has_v;
- m5 = 0;
+ (void) m5;
size_t (E::*m6)(const util::vertex_id_t& id_v) const = & E::v_nmax_nbh_edges;
- m6 = 0;
+ (void) m6;
util::edge_id_t (E::*m7)(const util::vertex_id_t& id_v, unsigned i) const = & E::v_ith_nbh_edge;
- m7 = 0;
+ (void) m7;
size_t (E::*m8)() const = & E::e_nmax;
- m8 = 0;
+ (void) m8;
bool (E::*m9)(const util::edge_id_t& id_e) const = & E::has_e;
- m9 = 0;
+ (void) m9;
util::vertex_id_t (E::*m10)(const util::edge_id_t& id_e) const = & E::v1;
- m10 = 0;
+ (void) m10;
util::vertex_id_t (E::*m11)(const util::edge_id_t& id_e) const = & E::v2;
- m11 = 0;
+ (void) m11;
size_t (E::*m12)(const util::edge_id_t& id_e) const = & E::e_nmax_nbh_edges;
- m12 = 0;
+ (void) m12;
util::edge_id_t (E::*m13)(const util::edge_id_t& id_e, unsigned i) const = & E::e_ith_nbh_edge;
- m13 = 0;
+ (void) m13;
bool (E::*m14)() const = & E::is_valid;
- m14 = 0;
+ (void) m14;
void (E::*m15)() = & E::invalidate;
- m15 = 0;
+ (void) m15;
//FIXME: enable this test. Currently does not work because this is
// a templated method.
//bool (E::*m14)(...) = & E::is_subgraph_of;
- //m14 = 0;
+ //(void) m14;
}
diff --git a/milena/mln/core/concept/image.hh b/milena/mln/core/concept/image.hh
index 8c620bc..4c70768 100644
--- a/milena/mln/core/concept/image.hh
+++ b/milena/mln/core/concept/image.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -216,24 +216,24 @@ namespace mln
typedef mln_bkd_piter(E) bkd_piter;
bool (E::*m1)(const psite& p) const = & E::has;
- m1 = 0;
+ (void) m1;
// Only some image types feature the 'nsites' method.
// unsigned (E::*m2)() const = & E::nsites;
-// m2 = 0;
+// (void) m2;
bool (E::*m3)() const = & E::is_valid;
- m3 = 0;
+ (void) m3;
typedef typename E::t_eligible_values_set t_eligible_values_set;
const t_eligible_values_set& (E::*m4)() const = & E::values_eligible;
- m4 = 0;
+ (void) m4;
typedef typename E::t_values_space t_values_space;
const t_values_space& (E::*m5)() const = & E::values_space;
- m5 = 0;
+ (void) m5;
// to be provided in concrete image classes:
@@ -246,15 +246,16 @@ namespace mln
// FIXME Doc
//typedef mln_vset(E) vset;
//const vset& (E::*m5)() const = & E::values;
- //m5 = 0;
+ //(void) m5;
rvalue (E::*m6)(const psite& p) const = & E::operator();
- m6 = 0;
+ (void) m6;
+
lvalue (E::*m7)(const psite& p) = & E::operator();
- m7 = 0;
+ (void) m7;
const domain_t& (E::*m8)() const = & E::domain;
- m8 = 0;
+ (void) m8;
typedef typename E::skeleton skeleton;
diff --git a/milena/mln/core/concept/iterator.hh b/milena/mln/core/concept/iterator.hh
index 0da1ac8..5d0b090 100644
--- a/milena/mln/core/concept/iterator.hh
+++ b/milena/mln/core/concept/iterator.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -110,13 +111,13 @@ namespace mln
Iterator<E>::Iterator()
{
bool (E::*m1)() const = & E::is_valid;
- m1 = 0;
+ (void) m1;
void (E::*m2)() = & E::invalidate;
- m2 = 0;
+ (void) m2;
void (E::*m3)() = & E::start;
- m3 = 0;
+ (void) m3;
void (E::*m4)() = & E::next_;
- m4 = 0;
+ (void) m4;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/core/concept/neighborhood.hh b/milena/mln/core/concept/neighborhood.hh
index 2cd01ac..3fa0521 100644
--- a/milena/mln/core/concept/neighborhood.hh
+++ b/milena/mln/core/concept/neighborhood.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -121,16 +122,16 @@ namespace mln
typedef mln_window(E) window;
bool m = (& E::win) == (& E::win);
- m = 0;
+ (void) m;
bool (E::*m2)() const = &E::is_valid;
- m2 = 0;
+ (void) m2;
# if 0
/* FIXME: Disabled, as win() can either return a const reference
or a copy of the window (see documentation above). Hence the
simpler, relaxed check above (m0). */
const window& (E::*m1)() const = & E::win;
- m = m1;
+ (void) m1;
# endif
}
diff --git a/milena/mln/core/concept/proxy.hh b/milena/mln/core/concept/proxy.hh
index f8cd9b4..f22f342 100644
--- a/milena/mln/core/concept/proxy.hh
+++ b/milena/mln/core/concept/proxy.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -331,7 +332,7 @@ namespace mln
typedef typename E::q_subject q_subject;
q_subject (E::*m_)() = & E::subj_;
- m_ = 0;
+ (void) m_;
}
diff --git a/milena/mln/core/concept/pseudo_site.hh b/milena/mln/core/concept/pseudo_site.hh
index e8e5b03..b550baf 100644
--- a/milena/mln/core/concept/pseudo_site.hh
+++ b/milena/mln/core/concept/pseudo_site.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -98,9 +99,9 @@ namespace mln
typedef mln_target(E) target;
void (E::*m1)(const target&) = & E::change_target;
- m1 = 0;
+ (void) m1;
const target* (E::*m2)() const = & E::target_;
- m2 = 0;
+ (void) m2;
}
template <typename E>
diff --git a/milena/mln/core/concept/site_iterator.hh b/milena/mln/core/concept/site_iterator.hh
index 4a8f7fe..7ef6a43 100644
--- a/milena/mln/core/concept/site_iterator.hh
+++ b/milena/mln/core/concept/site_iterator.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -131,17 +132,17 @@ namespace mln
Site_Iterator<E>::Site_Iterator()
{
bool m0 = (& E::target_) == (& E::target_); // FIXME: Find a better test.
- m0 = 0;
+ (void) m0;
bool (E::*m1)() const = & E::is_valid_;
- m1 = 0;
+ (void) m1;
void (E::*m2)() = & E::invalidate_;
- m2 = 0;
+ (void) m2;
void (E::*m3)() = & E::start_;
- m3 = 0;
+ (void) m3;
void (E::*m4)() = & E::next_;
- m4 = 0;
+ (void) m4;
bool m5 = (& E::change_target) == (& E::change_target);
- m5 = 0;
+ (void) m5;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/core/concept/site_proxy.hh b/milena/mln/core/concept/site_proxy.hh
index d63c1eb..2d964e7 100644
--- a/milena/mln/core/concept/site_proxy.hh
+++ b/milena/mln/core/concept/site_proxy.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -82,11 +83,11 @@ namespace mln
typedef mln_site(E) site;
const site& (E::*m1)() const = & E::to_site;
- m1 = 0;
+ (void) m1;
// De-activate because sometimes it returns a "const site&"...
// site (E::*m2)() const = & E::operator site;
-// m2 = 0;
+// (void) m2;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/core/concept/site_set.hh b/milena/mln/core/concept/site_set.hh
index f0f2864..bbf217c 100644
--- a/milena/mln/core/concept/site_set.hh
+++ b/milena/mln/core/concept/site_set.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -185,7 +186,7 @@ namespace mln
static void run()
{
unsigned (E::*m)() const = & E::nsites;
- m = 0;
+ (void) m;
}
};
@@ -198,7 +199,7 @@ namespace mln
{
typedef typename E::q_box q_box;
q_box (E::*m)() const = & E::bbox;
- m = 0;
+ (void) m;
}
};
@@ -227,9 +228,9 @@ namespace mln
typedef typename E::i_element i_element;
mlc_equal(mlc_unqualif(i_element), i_element)::check();
void (E::*m1)(const i_element&) = & E::insert;
- m1 = 0;
+ (void) m1;
void (E::*m2)() = & E::clear;
- m2 = 0;
+ (void) m2;
}
};
@@ -241,13 +242,13 @@ namespace mln
typedef typename E::i_element i_element;
mlc_equal(mlc_unqualif(i_element), i_element)::check();
void (E::*m1)(const i_element&) = & E::insert;
- m1 = 0;
+ (void) m1;
typedef typename E::r_element r_element;
mlc_equal(mlc_unqualif(r_element), r_element)::check();
void (E::*m2)(const r_element&) = & E::remove;
- m2 = 0;
+ (void) m2;
void (E::*m3)() = & E::clear;
- m3 = 0;
+ (void) m3;
}
};
@@ -280,11 +281,11 @@ namespace mln
// Check methods.
bool (E::*m1)(const psite& p) const = & E::has;
- m1 = 0;
+ (void) m1;
bool (E::*m2)() const = & E::is_valid;
- m2 = 0;
+ (void) m2;
std::size_t (E::*m3)() const = & E::memory_size;
- m3 = 0;
+ (void) m3;
// Check methods depending upon properties.
internal::site_set_nsites_check < mln_trait_site_set_nsites(E), E >::run();
diff --git a/milena/mln/core/concept/value_iterator.hh b/milena/mln/core/concept/value_iterator.hh
index d87437e..1daccd7 100644
--- a/milena/mln/core/concept/value_iterator.hh
+++ b/milena/mln/core/concept/value_iterator.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -84,7 +85,7 @@ namespace mln
{
typedef mln_value(E) value;
value (E::*m)() const = & E::operator value;
- m = 0;
+ (void) m;
}
template <typename E>
diff --git a/milena/mln/core/concept/value_set.hh b/milena/mln/core/concept/value_set.hh
index b047ab0..0976537 100644
--- a/milena/mln/core/concept/value_set.hh
+++ b/milena/mln/core/concept/value_set.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2009, 2010 EPITA Research and Development
+// Copyright (C) 2007, 2009, 2010, 2011 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
@@ -91,11 +91,11 @@ namespace mln
typedef mln_bkd_viter(E) bkd_viter;
bool (E::*m1)(const value&) const = & E::has;
- m1 = 0;
+ (void) m1;
value (E::*m2)(unsigned) const = & E::operator[];
- m2 = 0;
+ (void) m2;
unsigned (E::*m3)() const = & E::nvalues;
- m3 = 0;
+ (void) m3;
}
template <typename E>
diff --git a/milena/mln/core/concept/weighted_window.hh b/milena/mln/core/concept/weighted_window.hh
index cdc5ce5..1341860 100644
--- a/milena/mln/core/concept/weighted_window.hh
+++ b/milena/mln/core/concept/weighted_window.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -113,10 +114,10 @@ namespace mln
typedef mln_bkd_qiter(E) bkd_qiter;
void (E::*m1)() = & E::sym;
- m1 = 0;
+ (void) m1;
const window& (E::*m2)() const = & E::win;
- m2 = 0;
+ (void) m2;
}
# endif // ! MLN_INCLUDE_ONLY
diff --git a/milena/mln/core/concept/window.hh b/milena/mln/core/concept/window.hh
index cde8550..3b2eafb 100644
--- a/milena/mln/core/concept/window.hh
+++ b/milena/mln/core/concept/window.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -161,7 +162,7 @@ namespace mln
static void run()
{
unsigned (E::*m)() const = & E::size;
- m = 0;
+ (void) m;
}
};
@@ -183,24 +184,24 @@ namespace mln
// Methods.
bool (E::*m1)() const = &E::is_centered;
- m1 = 0;
+ (void) m1;
bool (E::*m2)() const = &E::is_symmetric;
- m2 = 0;
+ (void) m2;
void (E::*m3)() = &E::sym;
- m3 = 0;
+ (void) m3;
unsigned (E::*m4)() const = &E::delta;
- m4 = 0;
+ (void) m4;
bool (E::*m5)() const = &E::is_valid;
- m5 = 0;
+ (void) m5;
}
static void run(mln::trait::window::definition::unique)
{
typedef mln_dpsite(E) D;
const D& (E::*m1)(unsigned) const = &E::dp;
- m1 = 0;
+ (void) m1;
bool (E::*m2)(const D&) const = &E::has;
- m2 = 0;
+ (void) m2;
run_extra();
}
@@ -235,11 +236,11 @@ namespace mln
{
typedef mln_element(E) W;
void (E::*m1)(unsigned, const W&) = &E::set_window;
- m1 = 0;
+ (void) m1;
const W& (E::*m2)(unsigned) const = &E::window;
- m2 = 0;
+ (void) m2;
unsigned (E::*m3)() const = &E::nwindows;
- m3 = 0;
+ (void) m3;
}
};
diff --git a/milena/mln/core/image/imorph/decorated_image.hh b/milena/mln/core/image/imorph/decorated_image.hh
index 181cbcd..54acbc7 100644
--- a/milena/mln/core/image/imorph/decorated_image.hh
+++ b/milena/mln/core/image/imorph/decorated_image.hh
@@ -184,11 +184,11 @@ namespace mln
decorated_image<I,D>::~decorated_image()
{
void (D::*mr)(const I&, const mln_psite(I)&) const = & D::reading;
- mr = 0;
+ (void) mr;
typedef mlc_unconst(I) I_;
void (D::*mw)(I_&, const mln_psite(I_)&, const mln_value(I_)&) =
& D::writing;
- mw = 0;
+ (void) mw;
}
template <typename I, typename D>
diff --git a/milena/mln/core/internal/check/image_fastest.hh b/milena/mln/core/internal/check/image_fastest.hh
index cdff19f..9aa7c51 100644
--- a/milena/mln/core/internal/check/image_fastest.hh
+++ b/milena/mln/core/internal/check/image_fastest.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -94,33 +95,33 @@ namespace mln
typedef mln_bkd_pixter(E) bkd_pixter;
int (E::*m1)(const dpsite&) const = & E::delta_index;
- m1 = 0;
+ (void) m1;
site (E::*m2)(unsigned) const = & E::point_at_index;
- m2 = 0;
+ (void) m2;
unsigned (E::*m3)() const = & E::border;
- m3 = 0;
+ (void) m3;
typedef mln_value(E) value;
mln_qlf_value(E)* (E::*m4)() = & E::buffer;
- m4 = 0;
+ (void) m4;
const value* (E::*m5)() const = & E::buffer;
- m5 = 0;
+ (void) m5;
typedef mln_rvalue(E) rvalue;
typedef mln_lvalue(E) lvalue;
rvalue (E::*m6)(unsigned) const = & E::element;
- m6 = 0;
+ (void) m6;
lvalue (E::*m7)(unsigned) = & E::element;
- m7 = 0;
+ (void) m7;
unsigned (E::*m8)() const = & E::nelements;
- m8 = 0;
+ (void) m8;
# if (defined(__GNUC__) && __GNUC__ >= 3) && !defined(__INTEL_COMPILER)
unsigned (E::*m9)(const psite& p) const = & E::index_of_point;
- m9 = 0;
+ (void) m9;
# endif
// FIXME: how to check that qixter are defined when W is unknown!
diff --git a/milena/mln/core/internal/site_relative_iterator_base.hh b/milena/mln/core/internal/site_relative_iterator_base.hh
index 4d9567f..7483dfa 100644
--- a/milena/mln/core/internal/site_relative_iterator_base.hh
+++ b/milena/mln/core/internal/site_relative_iterator_base.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -128,11 +128,11 @@ namespace mln
: c_(0)
{
void (E::*m1)() = & E::do_start_;
- m1 = 0;
+ (void) m1;
void (E::*m2)() = & E::do_next_;
- m2 = 0;
+ (void) m2;
mln_psite(S) (E::*m3)() const = & E::compute_p_;
- m3 = 0;
+ (void) m3;
}
template <typename S, typename E, typename C>
diff --git a/milena/mln/io/off/load.hh b/milena/mln/io/off/load.hh
index c9c4af7..9996df7 100644
--- a/milena/mln/io/off/load.hh
+++ b/milena/mln/io/off/load.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -218,11 +219,11 @@ namespace mln
{
// Concept checking.
void (E::*m1)(std::istream&) = &E::read_face_data;
- m1 = 0;
+ (void) m1;
void (E::*m2)(unsigned, unsigned, unsigned) = &E::reserve;
- m2 = 0;
+ (void) m2;
void (E::*m3)(values&, const domain&) = &E::assign;
- m3 = 0;
+ (void) m3;
}
diff --git a/milena/mln/io/off/save.hh b/milena/mln/io/off/save.hh
index 1ec747d..dba5fa7 100644
--- a/milena/mln/io/off/save.hh
+++ b/milena/mln/io/off/save.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -211,7 +212,7 @@ namespace mln
// Concept checking.
void (E::*m1)(std::ostream&, const value&) const =
&E::write_face_data;
- m1 = 0;
+ (void) m1;
}
diff --git a/milena/mln/morpho/reconstruction/by_erosion/union_find.hh b/milena/mln/morpho/reconstruction/by_erosion/union_find.hh
index ebce224..b367f7b 100644
--- a/milena/mln/morpho/reconstruction/by_erosion/union_find.hh
+++ b/milena/mln/morpho/reconstruction/by_erosion/union_find.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
-// Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2010, 2011 EPITA Research and
+// Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -224,6 +224,7 @@ namespace mln
const Neighborhood<N>& nbh)
{
// FIXME: Not yet implemented.
+ (void) nbh;
std::cerr
<< __FILE__ << ":" << __LINE__ << ": error:\n"
"mln::morpho::reconstruction::by_erosion::internal::\n"
diff --git a/milena/mln/morpho/watershed/topological.hh b/milena/mln/morpho/watershed/topological.hh
index b06e6ab..20702e3 100644
--- a/milena/mln/morpho/watershed/topological.hh
+++ b/milena/mln/morpho/watershed/topological.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -692,7 +693,6 @@ namespace mln
p_priority< mln_value(I), p_queue_fast<mln_site(I)> > l;
// p_queue < site > m;
std::queue<mln_site(I)> m;
- mln_value(I) min = mln_min(mln_value(I));
std::cout << "Init" << std::endl;
diff --git a/milena/mln/topo/internal/complex_relative_iterator_base.hh b/milena/mln/topo/internal/complex_relative_iterator_base.hh
index 58d6ee0..03f9cda 100644
--- a/milena/mln/topo/internal/complex_relative_iterator_base.hh
+++ b/milena/mln/topo/internal/complex_relative_iterator_base.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -239,7 +240,7 @@ namespace mln
{
// Check for required methods in E.
void (E::*m)() = & E::update_adj_faces_;
- m = 0;
+ (void) m;
exact(this)->invalidate();
}
@@ -251,7 +252,7 @@ namespace mln
{
// Check for required methods in E.
void (E::*m)() = & E::update_adj_faces_;
- m = 0;
+ (void) m;
center_at(f_ref);
}
diff --git a/milena/tests/algebra/h_vec.cc b/milena/tests/algebra/h_vec.cc
index 8b833c5..d674d58 100644
--- a/milena/tests/algebra/h_vec.cc
+++ b/milena/tests/algebra/h_vec.cc
@@ -48,6 +48,7 @@ int main()
algebra::vec<3, def::coord> x;
algebra::h_vec<3, def::coord> w = x.to_h_vec();
+ (void) w;
typedef algebra::h_vec<3, def::coord> p3d;
p3d p;
diff --git a/milena/tests/core/alias/point1d.cc b/milena/tests/core/alias/point1d.cc
index 1326ddd..627af52 100644
--- a/milena/tests/core/alias/point1d.cc
+++ b/milena/tests/core/alias/point1d.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -37,6 +38,7 @@ int main()
p[0] = 4;
algebra::vec<1,float> v = p;
+ (void) v;
p.ind() += 1;
mln_assertion(p.ind() == 5 && p[0] == 5);
diff --git a/milena/tests/metal/unconst.cc b/milena/tests/metal/unconst.cc
index c199919..f2c0994 100644
--- a/milena/tests/metal/unconst.cc
+++ b/milena/tests/metal/unconst.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -38,32 +39,38 @@ int main()
{
mlc_unconst_(int) var; // int
var = 0;
+ (void) var;
// void* v = var;
}
{
mlc_unconst_(const int) var; // int
var = 0;
+ (void) var;
// void* v = var;
}
{
mlc_unconst_(int*) var; // int*
var = 0;
+ (void) var;
// void v = var;
}
{
mlc_unconst_(const int*) var; // const int*
var = 0;
+ (void) var;
// void v = var;
}
{
mlc_unconst_(int *const) var; // int*
var = 0;
+ (void) var;
// void v = var;
}
{
mlc_unconst_(const int *const) var; // const int*
var = 0;
+ (void) var;
// void v = var;
}
diff --git a/milena/tests/morpho/complex_image_wst.cc b/milena/tests/morpho/complex_image_wst.cc
index 843b9dd..d39ae7b 100644
--- a/milena/tests/morpho/complex_image_wst.cc
+++ b/milena/tests/morpho/complex_image_wst.cc
@@ -297,9 +297,11 @@ int main()
v.start();
topo::face<1> v1 = v.unproxy_().face();
point2d p1 = v.to_site().front();
+ (void) p1;
v.next();
topo::face<1> v2 = v.unproxy_().face();
point2d p2 = v.to_site().front();
+ (void) p2;
v.next();
mln_invariant(!v.is_valid());
diff --git a/milena/tests/trait/super.cc b/milena/tests/trait/super.cc
index 33fdf2b..4e64604 100644
--- a/milena/tests/trait/super.cc
+++ b/milena/tests/trait/super.cc
@@ -134,6 +134,7 @@ int main()
mln_trait_op_uminus_(my::test) tmp;
tmp = true;
+ (void) tmp;
// int i;
// my::foo<int>(i);
--
1.7.2.5
1
0
olena-2.0-7-g0c903e4 README (Bibliography): Mention the GRETSI 2011 paper.
by Roland Levillain 14 Nov '11
by Roland Levillain 14 Nov '11
14 Nov '11
---
ChangeLog | 4 ++++
README | 11 +++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b385e9c..2515596 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-06 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * README (Bibliography): Mention the GRETSI 2011 paper.
+
2011-09-16 Roland Levillain <roland(a)lrde.epita.fr>
* configure.ac, NEWS: Version 2.0a.
diff --git a/README b/README
index 5c4bd9f..2ea740c 100644
--- a/README
+++ b/README
@@ -544,6 +544,13 @@ papers.
About Image Processing Programming:
+ * `Une approche générique du logiciel pour le traitement d'images
+ préservant les performances`. Roland Levillain, Thierry Géraud,
+ Laurent Najman. In the proceedings of the 23rd Symposium on
+ Signal and Image Processing (GRETSI)
+ http://www.gretsi2011.org/
+ Bordeaux, France, September 5 - 8, 2011.
+
* `Why and How to Design a Generic and Efficient Image Processing
Framework: The Case of the Milena Library`. Roland Levillain,
Thierry Géraud, Laurent Najman. In the proceedings of the 2010
@@ -618,8 +625,8 @@ About Generic Programming Paradigm:
2000.
- You can download these papers and related materials from
-<http://www.lrde.epita.fr/cgi-bin/twiki/view/Publications>
+ You can download these papers and related material from
+<http://publications.lrde.epita.fr>.
--
1.7.2.5
1
0
olena-2.0-8-g8f46b1c Mention the ICDAR 2011 paper in SCRIBO's README.
by Roland Levillain 14 Nov '11
by Roland Levillain 14 Nov '11
14 Nov '11
* README (Bibliography): Here.
Fix copyright header.
* src/README: Fix copyright header.
---
scribo/ChangeLog | 8 ++++++++
scribo/README | 34 ++++++++++++++++++++++++++++++----
scribo/src/README | 9 +++++----
3 files changed, 43 insertions(+), 8 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 04c55b8..420997a 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,11 @@
+2011-10-06 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Mention the ICDAR 2011 paper in SCRIBO's README.
+
+ * README (Bibliography): Here.
+ Fix copyright header.
+ * src/README: Fix copyright header.
+
2011-09-19 Guillaume Lazzara <z(a)lrde.epita.fr>
Fix paths in the SCRIBO viewer.
diff --git a/scribo/README b/scribo/README
index 84fe60a..4ba7f07 100644
--- a/scribo/README
+++ b/scribo/README
@@ -1,13 +1,13 @@
Copyright (C) 2009, 2010, 2011 EPITA Research and Development
Laboratory (LRDE)
-This file is part of Scribo.
+This file is part of Olena.
-Scribo is free software: you can redistribute it and/or modify it under
+Olena is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, version 2 of the License.
-Scribo is distributed in the hope that it will be useful,
+Olena 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.
@@ -80,4 +80,30 @@ KNOWN ISSUES
-fno-strict-aliasing flag.
- On Mac OS X Lion (10.7.0) prefer using GraphicsMagick++ instead of
- ImageMagick++. The latter may cause crashes.
\ No newline at end of file
+ ImageMagick++. The latter may cause crashes.
+
+
+============
+Bibliography
+============
+
+Further information about SCRIBO can be found into the following paper.
+
+ * `The SCRIBO Module of the Olena Platform: a Free Software
+ Framework for Document Image Analysis.` Guillaume Lazzara,
+ Roland Levillain, Thierry Géraud, Yann Jacquelet, Julien
+ Marquegnies, Arthur Crépin-Leblond. In the proceedings of the
+ 11th International Conference on Document Analysis and
+ Recognition (ICDAR)
+ http://www.icdar2011.org/
+ Beijing, China September 18 - 21, 2011.
+
+
+ You can download this paper and related material from
+<http://publications.lrde.epita.fr>.
+
+
+
+.. Local Variables:
+.. mode: rst
+.. End:
diff --git a/scribo/src/README b/scribo/src/README
index 582168d..9101525 100644
--- a/scribo/src/README
+++ b/scribo/src/README
@@ -1,12 +1,13 @@
-Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE)
+Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+Laboratory (LRDE)
-This file is part of Scribo.
+This file is part of Olena.
-Scribo is free software: you can redistribute it and/or modify it under
+Olena is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, version 2 of the License.
-Scribo is distributed in the hope that it will be useful,
+Olena 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.
--
1.7.2.5
1
0
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch next has been updated
via 8f46b1c939d1f110f4ad55ba3c2fdb51c5c1d709 (commit)
via 0c903e4c6d40d4f86ebda65250c26274854f34cc (commit)
from 00537669dbd854328126aa97cb7e7658129de3da (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
8f46b1c Mention the ICDAR 2011 paper in SCRIBO's README.
0c903e4 README (Bibliography): Mention the GRETSI 2011 paper.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
README | 11 +++++++++--
scribo/ChangeLog | 8 ++++++++
scribo/README | 34 ++++++++++++++++++++++++++++++----
scribo/src/README | 9 +++++----
5 files changed, 56 insertions(+), 10 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
olena-2.0-10-g6b931cc configure.ac: Configure milena/apps/morphers/Makefile.
by Roland Levillain 14 Nov '11
by Roland Levillain 14 Nov '11
14 Nov '11
---
ChangeLog | 4 ++++
configure.ac | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2515596..e56f5cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-14 Roland Levillain <roland(a)lrde.epita.fr>
+
+ * configure.ac: Configure milena/apps/morphers/Makefile.
+
2011-10-06 Roland Levillain <roland(a)lrde.epita.fr>
* README (Bibliography): Mention the GRETSI 2011 paper.
diff --git a/configure.ac b/configure.ac
index a53bcf8..d16eca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -566,6 +566,7 @@ AC_CONFIG_FILES([
milena/apps/constrained-connectivity/Makefile
milena/apps/graph-morpho/Makefile
milena/apps/mesh-segm-skel/Makefile
+ milena/apps/morphers/Makefile
milena/apps/papers/Makefile
milena/apps/papers/levillain.09.ismm/Makefile
])
--
1.7.2.5
1
0
* apps/morphers/mask+channel.cc,
* apps/morphers/recorder.cc,
* apps/morphers/mask+recorder.cc:
New.
* apps/morphers/Makefile.am: New.
* apps/Makefile.am (SUBDIRS): Add morphers.
---
milena/ChangeLog | 11 ++
milena/apps/Makefile.am | 5 +-
.../Makefile.am | 24 +++-
.../morphers/mask+channel.cc} | 76 +++++------
milena/apps/morphers/mask+recorder.cc | 140 ++++++++++++++++++++
milena/apps/morphers/recorder.cc | 135 +++++++++++++++++++
6 files changed, 338 insertions(+), 53 deletions(-)
copy milena/apps/{constrained-connectivity => morphers}/Makefile.am (62%)
copy milena/{doc/examples/tuto3_rw_image.cc => apps/morphers/mask+channel.cc} (58%)
create mode 100644 milena/apps/morphers/mask+recorder.cc
create mode 100644 milena/apps/morphers/recorder.cc
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 544cc30..c10deb8 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,14 @@
+2011-11-14 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Add examples of morphers.
+
+ * apps/morphers/mask+channel.cc,
+ * apps/morphers/recorder.cc,
+ * apps/morphers/mask+recorder.cc:
+ New.
+ * apps/morphers/Makefile.am: New.
+ * apps/Makefile.am (SUBDIRS): Add morphers.
+
2011-10-04 Roland Levillain <roland(a)lrde.epita.fr>
Handle the case of filling an empty border.
diff --git a/milena/apps/Makefile.am b/milena/apps/Makefile.am
index c42ffd7..465f1db 100644
--- a/milena/apps/Makefile.am
+++ b/milena/apps/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 2008, 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2008, 2009, 2011 EPITA Research and Development
+# Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -16,7 +17,7 @@
#
# Applied examples of Milena.
-SUBDIRS = mesh-segm-skel graph-morpho constrained-connectivity
+SUBDIRS = mesh-segm-skel graph-morpho constrained-connectivity morphers
# Examples from papers.
SUBDIRS += papers
diff --git a/milena/apps/constrained-connectivity/Makefile.am b/milena/apps/morphers/Makefile.am
similarity index 62%
copy from milena/apps/constrained-connectivity/Makefile.am
copy to milena/apps/morphers/Makefile.am
index c0dfb0d..d7af433 100644
--- a/milena/apps/constrained-connectivity/Makefile.am
+++ b/milena/apps/morphers/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -14,17 +14,27 @@
# You should have received a copy of the GNU General Public License
# along with Olena. If not, see <http://www.gnu.org/licenses/>.
+# Illustrations of morphers.
+
# Find Milena headers.
AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_builddir)/milena
# Produce fast code.
APPS_CXXFLAGS = @APPS_CXXFLAGS@
AM_CXXFLAGS = $(APPS_CXXFLAGS)
-noinst_PROGRAMS = constrained-connectivity
-constrained_connectivity_SOURCES = constrained-connectivity.cc
-constrained_connectivity_CXXFLAGS = $(AM_CXXFLAGS) $(STRICT_ALIASING_CXXFLAGS)
+noinst_PROGRAMS = \
+ mask+channel \
+ recorder \
+ mask+recorder
+
+mask_channel_SOURCES = mask+channel.cc
+recorder_SOURCES = recorder.cc
+mask_recorder_SOURCES = mask+recorder.cc
-TESTS = test-constrained-connectivity
+MOSTLYCLEANFILES = \
+ lena-mask-channel.ppm \
+ lena-fill??????.ppm \
+ lena-roi-fill??????.ppm
-# The sample image form Pierre Soille's PAMI 2008 article.
-EXTRA_DIST = soille.pgm
+# FIXME: Also produce movies (see comments in recorder.cc and
+# mask+recorder.cc.)
diff --git a/milena/doc/examples/tuto3_rw_image.cc b/milena/apps/morphers/mask+channel.cc
similarity index 58%
copy from milena/doc/examples/tuto3_rw_image.cc
copy to milena/apps/morphers/mask+channel.cc
index 14ba056..ffbe023 100644
--- a/milena/doc/examples/tuto3_rw_image.cc
+++ b/milena/apps/morphers/mask+channel.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -24,58 +24,46 @@
// executable file might be covered by the GNU General Public License.
/// \file
+/// \brief Example projecting a RGB image to the green channel and
+/// then applying a domain restricting with a mask.
-#include <mln/core/image/image2d.hh>
-#include <mln/value/rgb8.hh>
-#include <mln/data/fill.hh>
-#include <mln/data/paste.hh>
-#include <mln/core/routine/duplicate.hh>
-#include <mln/literal/colors.hh>
-#include <mln/opt/at.hh>
+#include <sstream>
+#include <iomanip>
-#include <tests/data.hh>
-#include <doc/tools/sample_utils.hh>
+#include <string>
-int main()
-{
- using namespace mln;
+#include <mln/core/image/image2d.hh>
+#include <mln/core/image/dmorph/image_if.hh>
+#include <mln/fun/component/green.hh>
- // \{
- image2d<value::rgb8> ima(40, 40);
- // \}
+#include <mln/value/rgb8.hh>
+
+/* FIXME: We wanted to use `fun_image' and `operator<<' from
+ <mln/core/image/vmorph/fun_image.hh, but they only create read-only
+ images. Use `thru_image' instead. */
+#include <mln/core/image/vmorph/thru_image.hh>
- // \{
- data::fill(ima, literal::red);
- // \}
+#include <mln/core/routine/duplicate.hh>
- // \{
- for (def::coord row = 20; row < 30; ++row)
- for (def::coord col = 20; col < 30; ++col)
- ima(point2d(row, col)) = literal::blue;
- // \}
+#include <mln/literal/colors.hh>
+#include <mln/data/fill.hh>
- // \{
- for (def::coord row = 20; row < 30; ++row)
- for (def::coord col = 20; col < 30; ++col)
- opt::at(ima, row, col) = literal::blue;
- // \}
- doc::ppmsave(ima, "tuto3_rw_image");
+#include <mln/io/ppm/all.hh>
- image2d<value::rgb8> ima2 = duplicate(ima);
+#include "apps/data.hh"
- // \{
- image2d<value::rgb8> lena;
- io::ppm::load(lena, MLN_IMG_DIR "/small.ppm");
- // \}
- // \{
- data::fill(ima, lena);
- // \}
- doc::ppmsave(ima, "tuto3_rw_image");
+int main()
+{
+ using namespace mln;
+ using mln::value::rgb8;
- ima = ima2;
- // \{
- data::paste(ima, lena);
- // \}
- doc::ppmsave(lena, "tuto3_rw_image");
+ image2d<rgb8> lena = io::ppm::load<rgb8>(MLN_IMG_DIR "/tiny.ppm");
+ fun::green green;
+ /* FIXME: Cheat: use generic fill as mln::decorated_image does not
+ define properly its properties. */
+ data::impl::generic::fill_with_value((thru(green, lena).rw() |
+ box2d(point2d(5,5), point2d(10,10))).rw(),
+ 255);
+ io::ppm::save(lena, "lena-mask-channel.ppm");
}
diff --git a/milena/apps/morphers/mask+recorder.cc b/milena/apps/morphers/mask+recorder.cc
new file mode 100644
index 0000000..d697451
--- /dev/null
+++ b/milena/apps/morphers/mask+recorder.cc
@@ -0,0 +1,140 @@
+// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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
+/// \brief Morpher recording every change in the morphed image
+/// followed by the application of a domain restriction with a mask.
+///
+/// To produce an AVI movie from the `lena-roi-fill*.ppm' files, use:
+///
+/// for f in lena-roi-fill*ppm; convert $f -scale 2500% $(basename $f .ppm).png
+/// mencoder "mf://lena-roi-fill*.png" -o lena-roi-fill.avi -ovc lavc -lavcopts vcodec=mjpeg
+///
+/// The output `lena-roi-fill.avi' can be embedded in a PDF file. */
+
+// FIXME: Factor with recorder.cc.
+
+#include <sstream>
+#include <iomanip>
+
+#include <string>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/image/dmorph/image_if.hh>
+#include <mln/core/image/imorph/decorated_image.hh>
+
+#include <mln/value/rgb8.hh>
+
+#include <mln/core/routine/duplicate.hh>
+
+#include <mln/literal/colors.hh>
+#include <mln/data/fill.hh>
+
+#include <mln/io/ppm/all.hh>
+
+#include "apps/data.hh"
+
+
+// FIXME: mln::decorated_image lacks a proper definition of
+// properties! (see mln/core/image/imorph/decorated_image.hh
+namespace mln
+{
+
+ namespace trait
+ {
+
+ template <typename I, typename D>
+ struct image_< decorated_image<I,D> >
+ : default_image_morpher< I,
+ mln_value(I),
+ decorated_image<I,D> >
+ {
+ typedef trait::image::category::identity_morpher category;
+ };
+
+ } // end of namespace mln::trait
+
+} // end of namespace mln
+
+
+// Recorder.
+template <typename I>
+struct recorder
+{
+ void reading(const I&, const mln_psite(I)&) const
+ {
+ // N/A.
+ }
+
+ void writing(I& ima, const mln_psite(I)&, const mln_value(I)&)
+ {
+ sequence.push_back(mln::duplicate(ima));
+ }
+
+ std::vector<I> sequence;
+};
+
+template <typename I>
+mln::decorated_image< I, recorder<I> >
+record(mln::Image<I>& ima)
+{
+ return mln::decorate(ima, recorder<I>());
+}
+
+
+// I/O.
+namespace ppm
+{
+ template <typename I>
+ void
+ save(const mln::decorated_image< I, recorder<I> >& rec,
+ const std::string& prefix)
+ {
+ for (size_t i = 0; i < rec.decoration().sequence.size(); ++i)
+ {
+ std::stringstream s;
+ s << std::setfill ('0') << std::setw (6) << i;
+ mln::io::ppm::save(rec.decoration().sequence[i],
+ prefix + s.str() + ".ppm");
+ }
+ }
+}
+
+
+int main()
+{
+ using namespace mln;
+ using mln::value::rgb8;
+
+ typedef image2d<rgb8> I;
+ I lena = io::ppm::load<rgb8>(MLN_IMG_DIR "/tiny.ppm");
+ decorated_image< I, recorder<I> > lena_rec = record(lena);
+ /* FIXME: Cheat: use generic fill as mln::decorated_image does not
+ define properly its properties. */
+ data::impl::generic::fill_with_value((lena_rec | box2d(point2d(5,5),
+ point2d(10,10))).rw(),
+ literal::green);
+ ppm::save(lena_rec, "lena-roi-fill");
+}
diff --git a/milena/apps/morphers/recorder.cc b/milena/apps/morphers/recorder.cc
new file mode 100644
index 0000000..195f24c
--- /dev/null
+++ b/milena/apps/morphers/recorder.cc
@@ -0,0 +1,135 @@
+// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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
+/// \brief Morpher recording every change in the morphed image.
+///
+/// To produce an AVI movie from the `lena-fill*.ppm' files, use:
+///
+/// for f in lena-fill*ppm; convert $f -scale 2500% $(basename $f .ppm).png
+/// mencoder "mf://lena-fill*.png" -o lena-fill.avi -ovc lavc -lavcopts vcodec=mjpeg
+///
+/// The output `lena-fill.avi' can be embedded in a PDF file. */
+
+#include <sstream>
+#include <iomanip>
+
+#include <string>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/image/imorph/decorated_image.hh>
+
+#include <mln/value/rgb8.hh>
+
+#include <mln/core/routine/duplicate.hh>
+
+#include <mln/literal/colors.hh>
+#include <mln/data/fill.hh>
+
+#include <mln/io/ppm/all.hh>
+
+#include "apps/data.hh"
+
+
+// FIXME: mln::decorated_image lacks a proper definition of
+// properties! (see mln/core/image/imorph/decorated_image.hh
+namespace mln
+{
+
+ namespace trait
+ {
+
+ template <typename I, typename D>
+ struct image_< decorated_image<I,D> >
+ : default_image_morpher< I,
+ mln_value(I),
+ decorated_image<I,D> >
+ {
+ typedef trait::image::category::identity_morpher category;
+ };
+
+ } // end of namespace mln::trait
+
+} // end of namespace mln
+
+
+// Recorder.
+template <typename I>
+struct recorder
+{
+ void reading(const I&, const mln_psite(I)&) const
+ {
+ // N/A.
+ }
+
+ void writing(I& ima, const mln_psite(I)&, const mln_value(I)&)
+ {
+ sequence.push_back(mln::duplicate(ima));
+ }
+
+ std::vector<I> sequence;
+};
+
+template <typename I>
+mln::decorated_image< I, recorder<I> >
+record(mln::Image<I>& ima)
+{
+ return mln::decorate(ima, recorder<I>());
+}
+
+
+// I/O.
+namespace ppm
+{
+ template <typename I>
+ void
+ save(const mln::decorated_image< I, recorder<I> >& rec,
+ const std::string& prefix)
+ {
+ for (size_t i = 0; i < rec.decoration().sequence.size(); ++i)
+ {
+ std::stringstream s;
+ s << std::setfill ('0') << std::setw (6) << i;
+ mln::io::ppm::save(rec.decoration().sequence[i],
+ prefix + s.str() + ".ppm");
+ }
+ }
+}
+
+
+int main()
+{
+ using namespace mln;
+ using mln::value::rgb8;
+
+ typedef image2d<rgb8> I;
+ I lena = io::ppm::load<rgb8>(MLN_IMG_DIR "/tiny.ppm");
+ decorated_image< I, recorder<I> > lena_rec = record(lena);
+ /* FIXME: Cheat: use generic fill as mln::decorated_image does not
+ define properly its properties. */
+ data::impl::generic::fill_with_value(lena_rec,
+ literal::green);
+ ppm::save(lena_rec, "lena-fill");
+}
--
1.7.2.5
1
0
18 Oct '11
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch unstable/scribo has been updated
via 80d159955caf5c547a844c660c45984bcdb8d880 (commit)
from 0461de7a9a2d473326a09fa6d09fda03df9b6fd9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
80d1599 mln/io/dicom/load.hh: Fix memory leak.
-----------------------------------------------------------------------
Summary of changes:
milena/ChangeLog | 4 ++++
milena/mln/io/dicom/load.hh | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
18 Oct '11
---
milena/ChangeLog | 4 ++++
milena/mln/io/dicom/load.hh | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 8b495e8..04bac84 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-18 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ * mln/io/dicom/load.hh: Fix memory leak.
+
2011-10-14 Guillaume Lazzara <z(a)lrde.epita.fr>
Invert threshold function test.
diff --git a/milena/mln/io/dicom/load.hh b/milena/mln/io/dicom/load.hh
index fb6996b..7369c0f 100644
--- a/milena/mln/io/dicom/load.hh
+++ b/milena/mln/io/dicom/load.hh
@@ -182,7 +182,7 @@ namespace mln
ima(p) = v;
}
- delete(dataBuffer);
+ delete[] dataBuffer;
trace::exiting("mln::io::dicom::load");
}
--
1.7.2.5
1
0
14 Oct '11
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch wip-bench-milena has been created
at 6f5a4364165165f725601f9b50b5db408095116f (commit)
- Log -----------------------------------------------------------------
6f5a436 apps/bench/list2table: Generate a shorter table.
cb9bfa4 Simplify `fast_static' and `faster_static' cases in apps/bench/.
efb9eb1 WIP: Aesthetic changes in the output of apps/bench/list2table.
876e31d WIP: New (postprocessing) script: apps/bench/list2table.
bd3a6c3 WIP: Split apps/bench/dilation-lena-bench.
51d7fe3 WIP: New experiment: apps/bench/dilation-lena-bench.
7808a2d WIP: Have apps/bench/dilation-lena-table behave a bit more like apps/bench/dilation-lena.
c061b74 WIP: Misc. changes in apps/bench/.
b2a8ff2 WIP: configure.ac (APPS_CXXFLAGS_NODEBUG): New precious variable.
fcea0a4 WIP: Generate a LaTeX table from some results of apps/bench/dilation-lena.
a657c01 WIP: Split apps/bench/dilation-lena.
4762c47 WIP: More comparisons (2- and 1-pointer based non-gen impl.)
fa79493 WIP: Run more test cases, make comparisons more robust, and factor.
a7f8a8c WIP: More comparisons on dilation (static window + single pixter).
a8d13f2 WIP: More comparisons on dilation (variants without accu).
1dfe127 WIP: More comparisons on dilation (static windows and qixters).
dd737af WIP: Comparison on dilation.
613752c WIP: More (specialized) test/bench gradient on lena.pgm.
80a95bd WIP: apps/Makefile.am (SUBDIRS): Add bench.
72256ba WIP: Configure milena/apps/bench/Makefile.am.
155bb1c WIP: Test/bench gradient on lena.pgm.
-----------------------------------------------------------------------
hooks/post-receive
--
Olena, a generic and efficient image processing platform
2
1
last-svn-commit-542-g613752c WIP: More (specialized) test/bench gradient on lena.pgm.
by Roland Levillain 14 Oct '11
by Roland Levillain 14 Oct '11
14 Oct '11
---
milena/apps/bench/Makefile.am | 15 +-
milena/{mln/accu/pair.hh => apps/bench/and_not.hh} | 74 +++--
milena/apps/bench/gradient-spe-lena.cc | 353 ++++++++++++++++++++
milena/{mln/accu/pair.hh => apps/bench/minus.hh} | 73 +++--
4 files changed, 450 insertions(+), 65 deletions(-)
copy milena/{mln/accu/pair.hh => apps/bench/and_not.hh} (74%)
create mode 100644 milena/apps/bench/gradient-spe-lena.cc
copy milena/{mln/accu/pair.hh => apps/bench/minus.hh} (74%)
diff --git a/milena/apps/bench/Makefile.am b/milena/apps/bench/Makefile.am
index 707f457..27a368e 100644
--- a/milena/apps/bench/Makefile.am
+++ b/milena/apps/bench/Makefile.am
@@ -21,9 +21,20 @@ APPS_CXXFLAGS = @APPS_CXXFLAGS@
AM_CXXFLAGS = $(APPS_CXXFLAGS)
noinst_PROGRAMS = \
- gradient-lena
+ gradient-lena \
+ gradient-spe-lena
+
+EXTRA_DIST = \
+ and_not.hh \
+ minus.hh
gradient_lena_SOURCES = gradient-lena.cc
+gradient_spe_lena_SOURCES = gradient-spe-lena.cc
MOSTLYCLEANFILES = \
- gradient-lena-out.pgm
+ gradient-lena-out.pgm \
+ gradient-spe-lena-out-0.pgm \
+ gradient-spe-lena-out-1.pgm \
+ gradient-spe-lena-out-2.pgm \
+ gradient-spe-lena-out-3.pgm \
+ gradient-spe-lena-out-4.pgm
diff --git a/milena/mln/accu/pair.hh b/milena/apps/bench/and_not.hh
similarity index 74%
copy from milena/mln/accu/pair.hh
copy to milena/apps/bench/and_not.hh
index 11f4dc6..c3ddf36 100644
--- a/milena/mln/accu/pair.hh
+++ b/milena/apps/bench/and_not.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -23,17 +23,17 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef MLN_ACCU_PAIR_HH
-# define MLN_ACCU_PAIR_HH
+#ifndef MLN_ACCU_AND_NOT_HH
+# define MLN_ACCU_AND_NOT_HH
/// \file
///
-/// Define a pair of accumulators.
-
-# include <utility>
+/// Define a logical "and not" of accumulators.
# include <mln/core/concept/meta_accumulator.hh>
+# include <mln/logical/and_not.hh>
+
# include <mln/accu/internal/base.hh>
# include <mln/metal/is_a.hh>
# include <mln/metal/unqualif.hh>
@@ -46,7 +46,7 @@ namespace mln
{
- /// \brief Generic pair of accumulators.
+ /// \brief Logical "and not" of accumulators.
///
/// The parameter \c T is the type of values.
///
@@ -55,29 +55,30 @@ namespace mln
/// \ingroup modaccumulti
//
template <typename A1, typename A2, typename T = mln_argument(A1)>
- struct pair : public mln::accu::internal::base< std::pair<mln_result(A1), mln_result(A2)>,
- pair<A1,A2,T> >
+ struct and_not
+ : public mln::accu::internal::base< bool, and_not<A1,A2,T> >
{
typedef T argument;
typedef mln_result(A1) result_1;
typedef mln_result(A2) result_2;
- pair();
+ and_not();
// FIXME: not implemented. Do we want it?
-// pair(const A1& a1, const A2& a2);
+// and_not(const A1& a1, const A2& a2);
/// Manipulators.
/// \{
void init();
void take_as_init_(const argument& t);
void take(const argument& t);
- void take(const pair<A1,A2,T>& other);
+ void take(const and_not<A1,A2,T>& other);
+ void untake(const argument& t);
/// \}
/// Get the value of the accumulator.
/// \{
- std::pair<mln_result(A1), mln_result(A2)> to_result() const;
+ bool to_result() const;
void get_result(result_1& r1, result_2& r2) const;
/// \}
@@ -105,16 +106,16 @@ namespace mln
namespace meta
{
- /// Meta accumulator for pair.
+ /// Meta accumulator for and_not.
template <typename A1, typename A2>
- struct pair : public Meta_Accumulator< pair<A1,A2> >
+ struct and_not : public Meta_Accumulator< and_not<A1,A2> >
{
template <typename T>
struct with
{
typedef mln_accu_with(A1, T) A1_T;
typedef mln_accu_with(A2, T) A2_T;
- typedef accu::pair<A1_T, A2_T, T> ret;
+ typedef accu::and_not<A1_T, A2_T, T> ret;
};
};
@@ -125,7 +126,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
- pair<A1,A2,T>::pair()
+ and_not<A1,A2,T>::and_not()
{
init();
}
@@ -133,7 +134,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::init()
+ and_not<A1,A2,T>::init()
{
a1_.init();
a2_.init();
@@ -142,7 +143,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::take_as_init_(const argument& t)
+ and_not<A1,A2,T>::take_as_init_(const argument& t)
{
a1_.take_as_init_(t);
a2_.take_as_init_(t);
@@ -151,7 +152,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::take(const argument& t)
+ and_not<A1,A2,T>::take(const argument& t)
{
a1_.take(t);
a2_.take(t);
@@ -160,7 +161,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::take(const pair<A1,A2,T>& other)
+ and_not<A1,A2,T>::take(const and_not<A1,A2,T>& other)
{
a1_.take(other.a1_);
a2_.take(other.a2_);
@@ -168,18 +169,27 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
- std::pair<mln_result(A1), mln_result(A2)>
- pair<A1,A2,T>::to_result() const
+ void
+ and_not<A1,A2,T>::untake(const argument& t)
+ {
+ a1_.untake(t);
+ a2_.untake(t);
+ }
+
+ template <typename A1, typename A2, typename T>
+ inline
+ bool
+ and_not<A1,A2,T>::to_result() const
{
- std::pair<mln_result(A1), mln_result(A2)> tmp(a1_.to_result(), a2_.to_result());
+ bool tmp = a1_.to_result() && ! a2_.to_result();
return tmp;
}
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::get_result(result_1& r1,
- result_2& r2) const
+ and_not<A1,A2,T>::get_result(result_1& r1,
+ result_2& r2) const
{
r1 = a1_.to_result();
r2 = a2_.to_result();
@@ -188,7 +198,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
mln_result(A1)
- pair<A1,A2,T>::first() const
+ and_not<A1,A2,T>::first() const
{
return a1_.to_result();
}
@@ -196,7 +206,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
mln_result(A2)
- pair<A1,A2,T>::second() const
+ and_not<A1,A2,T>::second() const
{
return a2_.to_result();
}
@@ -206,7 +216,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
A1
- pair<A1,A2,T>::first_accu() const
+ and_not<A1,A2,T>::first_accu() const
{
return a1_;
}
@@ -214,7 +224,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
A2
- pair<A1,A2,T>::second_accu() const
+ and_not<A1,A2,T>::second_accu() const
{
return a2_;
}
@@ -223,7 +233,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
bool
- pair<A1,A2,T>::is_valid() const
+ and_not<A1,A2,T>::is_valid() const
{
return a1_.is_valid() && a2_.is_valid();
}
@@ -235,4 +245,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_ACCU_PAIR_HH
+#endif // ! MLN_ACCU_AND_NOT_HH
diff --git a/milena/apps/bench/gradient-spe-lena.cc b/milena/apps/bench/gradient-spe-lena.cc
new file mode 100644
index 0000000..70dd58b
--- /dev/null
+++ b/milena/apps/bench/gradient-spe-lena.cc
@@ -0,0 +1,353 @@
+// Copyright (C) 2007, 2008, 2009, 2010 EPITA Research and Development
+// Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena 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 Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project 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.
+
+#include <iostream>
+
+#include <mln/core/image/image2d.hh>
+#include <mln/core/alias/window2d.hh>
+
+#include <mln/io/pgm/load.hh>
+#include <mln/io/pgm/save.hh>
+
+#include <mln/value/int_u8.hh>
+
+#include <mln/morpho/includes.hh>
+#include <mln/morpho/general.hh>
+
+#include <mln/accu/logic/lor.hh>
+#include <mln/accu/logic/land.hh>
+#include <mln/accu/logic/land_basic.hh>
+#include <mln/accu/logic/lor_basic.hh>
+#include <mln/accu/stat/max.hh>
+#include <mln/accu/stat/min.hh>
+#include <mln/accu/stat/max_h.hh>
+#include <mln/accu/stat/min_h.hh>
+
+#include "apps/bench/minus.hh"
+#include "apps/bench/and_not.hh"
+
+#include <mln/util/timer.hh>
+
+#include "apps/data.hh"
+
+// With hard-coded/inlined 4-c structuring element.
+template <typename I>
+mln_concrete(I)
+gradient_spe_0(const mln::Image<I>& ima_)
+{
+ using namespace mln;
+ typedef mln_value(I) V;
+ typedef mln_psite(I) P;
+
+ const I& ima = exact(ima_);
+
+ mln_concrete(I) result;
+ initialize(result, ima);
+
+ mln_piter(I) p(result.domain());
+ for_all(p)
+ {
+ // FIXME: Use one or two accu(s) instead?
+ V sup = ima(p);
+ V inf = ima(p);
+ {
+ P q(p.row() - 1, p.col());
+ if (ima.has(q))
+ {
+ if (ima(q) > sup) sup = ima(q);
+ if (ima(q) < inf) inf = ima(q);
+ }
+ }
+ {
+ P q(p.row(), p.col() - 1);
+ if (ima.has(q))
+ {
+ if (ima(q) > sup) sup = ima(q);
+ if (ima(q) < inf) inf = ima(q);
+ }
+ }
+ {
+ P q(p.row(), p.col() + 1);
+ if (ima.has(q))
+ {
+ if (ima(q) > sup) sup = ima(q);
+ if (ima(q) < inf) inf = ima(q);
+ }
+ }
+ {
+ P q(p.row() + 1, p.col());
+ if (ima.has(q))
+ {
+ if (ima(q) > sup) sup = ima(q);
+ if (ima(q) < inf) inf = ima(q);
+ }
+ }
+ result(p) = sup - inf;
+ }
+ return result;
+}
+
+template <typename I, typename W>
+mln_concrete(I)
+gradient_spe_1(const mln::Image<I>& ima_, const mln::Window<W>& win_)
+{
+ using namespace mln;
+ typedef mln_value(I) V;
+
+ const I& ima = exact(ima_);
+ const W& win = exact(win_);
+
+ mln_concrete(I) result;
+ initialize(result, ima);
+
+ mln_piter(I) p(result.domain());
+ mln_qiter(W) q(win, p);
+ for_all(p)
+ {
+ // FIXME: Use one or two accu(s) instead?
+ V sup = mln_min(V);
+ V inf = mln_max(V);
+ for_all(q)
+ if (ima.has(q))
+ {
+ if (ima(q) > sup)
+ sup = ima(q);
+ if (ima(q) < inf)
+ inf = ima(q);
+ }
+ result(p) = sup - inf;
+ }
+ return result;
+}
+
+template <typename I, typename W>
+mln_concrete(I)
+gradient_spe_2(const mln::Image<I>& ima_, const mln::Window<W>& win_)
+{
+ using namespace mln;
+ typedef mln_value(I) V;
+
+ const I& ima = exact(ima_);
+ const W& win = exact(win_);
+
+ typedef mln_concrete(I) O;
+ O result;
+ initialize(result, ima);
+
+ mln_pixter(const I) pi(ima);
+ mln_pixter(O) po(result);
+ // FIXME: The arguments of a qixter (p, win) are swapped compared to
+ // a qiter (win, p). Make this uniform?
+ mln_qixter(const I, W) q(pi, win);
+ for_all_2(pi, po)
+ {
+ // FIXME: Use one or two accu(s) instead?
+ V sup = mln_min(V);
+ V inf = mln_max(V);
+ for_all(q)
+ {
+ if (q.val() > sup)
+ sup = q.val();
+ if (q.val() < inf)
+ inf = q.val();
+ }
+ po.val() = sup - inf;
+ }
+ return result;
+}
+
+template <typename I, typename W>
+mln_concrete(I)
+gradient_spe_3(const mln::Image<I>& ima_, const mln::Window<W>& win_)
+{
+ using namespace mln;
+ typedef mln_value(I) V;
+
+ const I& ima = exact(ima_);
+ const W& win = exact(win_);
+
+ typedef mln_concrete(I) O;
+ O result;
+ initialize(result, ima);
+
+ mln_pixter(const I) pi(ima);
+ mln_pixter(O) po(result);
+ // FIXME: The arguments of a qixter (p, win) are swapped compared to
+ // a qiter (win, p). Make this uniform?
+ mln_qixter(const I, W) q(pi, win);
+ for_all_2(pi, po)
+ {
+ // FIXME: Use one or two accu(s) instead?
+ V sup = mln_min(V);
+ V inf = mln_max(V);
+ bool global_sup_reached_p = false;
+ bool global_inf_reached_p = false;
+ for_all(q)
+ {
+ if (!global_sup_reached_p && q.val() > sup)
+ {
+ sup = q.val();
+ if (sup == mln_max(V))
+ {
+ // Global sup reached.
+ if (global_inf_reached_p)
+ break;
+ global_sup_reached_p = true;
+ }
+ }
+ if (!global_inf_reached_p && q.val() < inf)
+ {
+ inf = q.val();
+ if (inf == mln_min(V))
+ {
+ // Global inf reached.
+ if (global_sup_reached_p)
+ break;
+ global_inf_reached_p = true;
+ }
+ }
+ }
+ po.val() = sup - inf;
+ }
+ return result;
+}
+
+
+// FIXME: Unify accumulators and_not and minus?
+
+namespace mln
+{
+ namespace accu
+ {
+ namespace meta
+ {
+ /// Accumulator for morphological gradient on sets.
+ typedef and_not<meta::logic::lor_basic, meta::logic::land_basic> lor_basic_minus_land_basic;
+ /// Accumulator for morphological gradient on functions.
+ typedef minus<meta::stat::max, meta::stat::min> max_minus_min;
+
+ /// Incremental accumulator for morphological gradient on sets.
+ typedef meta::and_not<meta::logic::lor, meta::logic::land> lor_minus_land;
+ /// Incremental accumulator for morphological gradient on functions.
+ typedef meta::minus<meta::stat::max_h, meta::stat::min_h> max_h_minus_min_h;
+ } // End of namespace mln::accu::meta.
+
+ } // End of namespace mln::accu.
+
+
+namespace morpho
+{
+
+ struct gradient_op
+ {
+ template <typename I>
+ mln_morpho_select_accu(I, lor_basic_minus_land_basic, max_minus_min)
+ accu(const Image<I>&) const
+ {
+ mln_morpho_select_accu(I, lor_basic_minus_land_basic, max_minus_min) tmp;
+ return tmp;
+ }
+
+ template <typename I>
+ mln_morpho_select_accu(I, lor_minus_land, max_h_minus_min_h)
+ accu_incr(const Image<I>&) const
+ {
+ mln_morpho_select_accu(I, lor_minus_land, max_h_minus_min_h) tmp;
+ return tmp;
+ }
+
+ // FIXME: Which neutral should we choose?
+ template <typename I>
+ mln_value(I) neutral(const Image<I>&) const
+ {
+ return internal::neutral<I>::infimum();
+ }
+ };
+
+ template <typename I, typename W>
+ inline
+ mln_concrete(I)
+ gradient_spe_4(const Image<I>& input, const Window<W>& win)
+ {
+ trace::entering("morpho::dilation");
+ mln_precondition(exact(input).is_valid());
+ mln_precondition(! exact(win).is_empty());
+
+ mln_concrete(I) output = general(gradient_op(), input, win);
+
+ mln_postcondition(test::positive(output));
+ trace::exiting("morpho::dilation");
+ return output;
+ }
+
+} // End of namespace mln::morpho.
+
+} // End of namespace mln.
+
+
+
+int main()
+{
+ using namespace mln;
+ using value::int_u8;
+
+ border::thickness = 1;
+ image2d<int_u8> lena;
+ io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
+
+ image2d<int_u8> g;
+ util::timer t;
+
+ t.start();
+ g = gradient_spe_0(lena);
+ t.stop();
+ std::cout << t.read() << std::endl;
+ io::pgm::save(g, "gradient-spe-lena-out-0.pgm");
+
+ t.restart();
+ g = gradient_spe_1(lena, win_c4p());
+ t.stop();
+ std::cout << t.read() << std::endl;
+ io::pgm::save(g, "gradient-spe-lena-out-1.pgm");
+
+ t.restart();
+ g = gradient_spe_2(lena, win_c4p());
+ t.stop();
+ std::cout << t.read() << std::endl;
+ io::pgm::save(g, "gradient-spe-lena-out-2.pgm");
+
+ t.restart();
+ g = gradient_spe_3(lena, win_c4p());
+ t.stop();
+ std::cout << t.read() << std::endl;
+ io::pgm::save(g, "gradient-spe-lena-out-3.pgm");
+
+ t.restart();
+ g = mln::morpho::gradient_spe_4(lena, win_c4p());
+ t.stop();
+ std::cout << t.read() << std::endl;
+ io::pgm::save(g, "gradient-spe-lena-out-4.pgm");
+}
diff --git a/milena/mln/accu/pair.hh b/milena/apps/bench/minus.hh
similarity index 74%
copy from milena/mln/accu/pair.hh
copy to milena/apps/bench/minus.hh
index 11f4dc6..16b7b9d 100644
--- a/milena/mln/accu/pair.hh
+++ b/milena/apps/bench/minus.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -23,17 +23,17 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef MLN_ACCU_PAIR_HH
-# define MLN_ACCU_PAIR_HH
+#ifndef MLN_ACCU_MINUS_HH
+# define MLN_ACCU_MINUS_HH
/// \file
///
-/// Define a pair of accumulators.
-
-# include <utility>
+/// Define a difference of accumulators.
# include <mln/core/concept/meta_accumulator.hh>
+# include <mln/arith/minus.hh>
+
# include <mln/accu/internal/base.hh>
# include <mln/metal/is_a.hh>
# include <mln/metal/unqualif.hh>
@@ -46,38 +46,40 @@ namespace mln
{
- /// \brief Generic pair of accumulators.
+ /// \brief Difference of accumulators.
///
/// The parameter \c T is the type of values.
///
/// \todo Check that, when T is not provided, A1 and A2 have the same value.
+ /// \todo Compute the result type from both A1 and A2.
///
/// \ingroup modaccumulti
//
template <typename A1, typename A2, typename T = mln_argument(A1)>
- struct pair : public mln::accu::internal::base< std::pair<mln_result(A1), mln_result(A2)>,
- pair<A1,A2,T> >
+ struct minus
+ : public mln::accu::internal::base< mln_result(A1), minus<A1,A2,T> >
{
typedef T argument;
typedef mln_result(A1) result_1;
typedef mln_result(A2) result_2;
- pair();
+ minus();
// FIXME: not implemented. Do we want it?
-// pair(const A1& a1, const A2& a2);
+// minus(const A1& a1, const A2& a2);
/// Manipulators.
/// \{
void init();
void take_as_init_(const argument& t);
void take(const argument& t);
- void take(const pair<A1,A2,T>& other);
+ void take(const minus<A1,A2,T>& other);
+ void untake(const argument& t);
/// \}
/// Get the value of the accumulator.
/// \{
- std::pair<mln_result(A1), mln_result(A2)> to_result() const;
+ mln_result(A1) to_result() const;
void get_result(result_1& r1, result_2& r2) const;
/// \}
@@ -105,16 +107,16 @@ namespace mln
namespace meta
{
- /// Meta accumulator for pair.
+ /// Meta accumulator for minus.
template <typename A1, typename A2>
- struct pair : public Meta_Accumulator< pair<A1,A2> >
+ struct minus : public Meta_Accumulator< minus<A1,A2> >
{
template <typename T>
struct with
{
typedef mln_accu_with(A1, T) A1_T;
typedef mln_accu_with(A2, T) A2_T;
- typedef accu::pair<A1_T, A2_T, T> ret;
+ typedef accu::minus<A1_T, A2_T, T> ret;
};
};
@@ -125,7 +127,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
- pair<A1,A2,T>::pair()
+ minus<A1,A2,T>::minus()
{
init();
}
@@ -133,7 +135,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::init()
+ minus<A1,A2,T>::init()
{
a1_.init();
a2_.init();
@@ -142,7 +144,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::take_as_init_(const argument& t)
+ minus<A1,A2,T>::take_as_init_(const argument& t)
{
a1_.take_as_init_(t);
a2_.take_as_init_(t);
@@ -151,7 +153,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::take(const argument& t)
+ minus<A1,A2,T>::take(const argument& t)
{
a1_.take(t);
a2_.take(t);
@@ -160,7 +162,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::take(const pair<A1,A2,T>& other)
+ minus<A1,A2,T>::take(const minus<A1,A2,T>& other)
{
a1_.take(other.a1_);
a2_.take(other.a2_);
@@ -168,17 +170,26 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
- std::pair<mln_result(A1), mln_result(A2)>
- pair<A1,A2,T>::to_result() const
+ void
+ minus<A1,A2,T>::untake(const argument& t)
+ {
+ a1_.untake(t);
+ a2_.untake(t);
+ }
+
+ template <typename A1, typename A2, typename T>
+ inline
+ mln_result(A1)
+ minus<A1,A2,T>::to_result() const
{
- std::pair<mln_result(A1), mln_result(A2)> tmp(a1_.to_result(), a2_.to_result());
+ mln_result(A1) tmp = a1_.to_result() - a2_.to_result();
return tmp;
}
template <typename A1, typename A2, typename T>
inline
void
- pair<A1,A2,T>::get_result(result_1& r1,
+ minus<A1,A2,T>::get_result(result_1& r1,
result_2& r2) const
{
r1 = a1_.to_result();
@@ -188,7 +199,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
mln_result(A1)
- pair<A1,A2,T>::first() const
+ minus<A1,A2,T>::first() const
{
return a1_.to_result();
}
@@ -196,7 +207,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
mln_result(A2)
- pair<A1,A2,T>::second() const
+ minus<A1,A2,T>::second() const
{
return a2_.to_result();
}
@@ -206,7 +217,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
A1
- pair<A1,A2,T>::first_accu() const
+ minus<A1,A2,T>::first_accu() const
{
return a1_;
}
@@ -214,7 +225,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
A2
- pair<A1,A2,T>::second_accu() const
+ minus<A1,A2,T>::second_accu() const
{
return a2_;
}
@@ -223,7 +234,7 @@ namespace mln
template <typename A1, typename A2, typename T>
inline
bool
- pair<A1,A2,T>::is_valid() const
+ minus<A1,A2,T>::is_valid() const
{
return a1_.is_valid() && a2_.is_valid();
}
@@ -235,4 +246,4 @@ namespace mln
} // end of namespace mln
-#endif // ! MLN_ACCU_PAIR_HH
+#endif // ! MLN_ACCU_MINUS_HH
--
1.7.2.5
1
0