URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2008-01-07 Simon Nivault <simon.nivault(a)lrde.epita.fr>
Some fixes for unit-tests.
* mln/convert/to_p_set.hh,
* mln/core/concept/value.hh,
* mln/make/voronoi.hh,
* mln/make/w_window3d_int.hh,
* mln/util/tree_to_image.hh,
* mln/value/equiv.hh,
* mln/value/float01.hh,
* mln/value/graylevel_f.hh,
* mln/value/int_u_sat.hh,
* mln/value/internal/gray_f.hh,
* mln/value/viter.hh: Fix headers.
* tests/morpho/contrast.cc: Simplify test.
* mln/value/rgb8_non_templated.hh: Remove deprecated.
---
mln/convert/to_p_set.hh | 1 +
mln/core/concept/value.hh | 2 +-
mln/make/voronoi.hh | 1 +
mln/make/w_window3d_int.hh | 2 +-
mln/util/tree_to_image.hh | 1 +
mln/value/equiv.hh | 1 +
mln/value/float01.hh | 3 ++-
mln/value/graylevel_f.hh | 3 +--
mln/value/int_u_sat.hh | 1 +
mln/value/internal/gray_f.hh | 1 +
mln/value/viter.hh | 2 +-
tests/morpho/contrast.cc | 6 +++---
12 files changed, 15 insertions(+), 9 deletions(-)
Index: trunk/milena/tests/morpho/contrast.cc
===================================================================
--- trunk/milena/tests/morpho/contrast.cc (revision 1633)
+++ trunk/milena/tests/morpho/contrast.cc (revision 1634)
@@ -47,11 +47,11 @@
using namespace mln;
using value::int_u8;
- win::rectangle2d rect(5, 5);
- border::thickness = 2;
+ win::rectangle2d rect(3, 3);
+ border::thickness = 1;
image2d<int_u8> lena;
- io::pgm::load(lena, "../../img/lena.pgm");
+ io::pgm::load(lena, "../../img/tiny.pgm");
image2d<int_u8> out = morpho::contrast(lena, rect);
io::pgm::save(out, "out.pgm");
Index: trunk/milena/mln/core/concept/value.hh
===================================================================
--- trunk/milena/mln/core/concept/value.hh (revision 1633)
+++ trunk/milena/mln/core/concept/value.hh (revision 1634)
@@ -91,7 +91,7 @@
} // end of namespace mln
-# include <mln/value/cast.hh>
+//# include <mln/value/cast.hh>
#endif // ! MLN_CORE_CONCEPT_VALUE_HH
Index: trunk/milena/mln/value/rgb8_non_templated.hh (deleted)
===================================================================
Index: trunk/milena/mln/value/graylevel_f.hh
===================================================================
--- trunk/milena/mln/value/graylevel_f.hh (revision 1633)
+++ trunk/milena/mln/value/graylevel_f.hh (revision 1634)
@@ -381,9 +381,8 @@
inline
graylevel_f::graylevel_f(const graylevel_f& rhs)
+ : Floating<graylevel_f>()
{
- mln_precondition(rhs.v_ >= 0);
- mln_precondition(rhs.v_ <= 1);
this->v_ = rhs.v_;
}
Index: trunk/milena/mln/value/internal/gray_f.hh
===================================================================
--- trunk/milena/mln/value/internal/gray_f.hh (revision 1633)
+++ trunk/milena/mln/value/internal/gray_f.hh (revision 1634)
@@ -209,6 +209,7 @@
inline
gray_f::gray_f(const gray_f& g)
+ : Floating<gray_f>()
{
this->v_ = g.v_;
}
Index: trunk/milena/mln/value/int_u_sat.hh
===================================================================
--- trunk/milena/mln/value/int_u_sat.hh (revision 1633)
+++ trunk/milena/mln/value/int_u_sat.hh (revision 1634)
@@ -38,6 +38,7 @@
# include <mln/value/internal/value_like.hh>
# include <mln/value/concept/integer.hh>
# include <mln/value/internal/encoding.hh>
+# include <mln/value/int_u.hh>
# include <mln/trait/value_.hh>
# include <mln/debug/format.hh>
Index: trunk/milena/mln/value/equiv.hh
===================================================================
--- trunk/milena/mln/value/equiv.hh (revision 1633)
+++ trunk/milena/mln/value/equiv.hh (revision 1634)
@@ -159,5 +159,6 @@
} // end of namespace mln
+# include <mln/value/cast.hh>
#endif // ! MLN_VALUE_EQUIV_HH
Index: trunk/milena/mln/value/viter.hh
===================================================================
--- trunk/milena/mln/value/viter.hh (revision 1633)
+++ trunk/milena/mln/value/viter.hh (revision 1634)
@@ -34,7 +34,7 @@
*/
# include <mln/core/concept/value_iterator.hh>
-
+# include <mln/core/concept/value_set.hh>
namespace mln
Index: trunk/milena/mln/value/float01.hh
===================================================================
--- trunk/milena/mln/value/float01.hh (revision 1633)
+++ trunk/milena/mln/value/float01.hh (revision 1634)
@@ -37,7 +37,7 @@
# include <utility>
# include <mln/core/concept/value.hh>
-# include <mln/value/float01_.hh>
+# include <mln/value/concept/floating.hh>
# include <mln/trait/value_.hh>
# include <mln/trait/all.hh> // FIXME!
# include <mln/trait/value_.hh>
@@ -285,5 +285,6 @@
} // end of namespace mln
+# include <mln/value/float01_.hh>
#endif // ! MLN_VALUE_FLOAT01_HH
Index: trunk/milena/mln/make/voronoi.hh
===================================================================
--- trunk/milena/mln/make/voronoi.hh (revision 1633)
+++ trunk/milena/mln/make/voronoi.hh (revision 1634)
@@ -36,6 +36,7 @@
# include <vector>
# include <map>
+# include <mln/core/concept/neighborhood.hh>
# include <mln/core/mesh_p.hh>
# include <mln/accu/mean.hh>
# include <mln/estim/min_max.hh>
Index: trunk/milena/mln/make/w_window3d_int.hh
===================================================================
--- trunk/milena/mln/make/w_window3d_int.hh (revision 1633)
+++ trunk/milena/mln/make/w_window3d_int.hh (revision 1634)
@@ -52,7 +52,7 @@
* \return A 3D int-weighted window.
*/
template <unsigned M>
- mln::w_window3d_int w_window3d_int(int (&weights)[M][N]);
+ mln::w_window3d_int w_window3d_int(int (&weights)[M]);
# ifndef MLN_INCLUDE_ONLY
Index: trunk/milena/mln/convert/to_p_set.hh
===================================================================
--- trunk/milena/mln/convert/to_p_set.hh (revision 1633)
+++ trunk/milena/mln/convert/to_p_set.hh (revision 1634)
@@ -36,6 +36,7 @@
# include <set>
# include <mln/core/concept/neighborhood.hh>
+# include <mln/core/concept/window.hh>
# include <mln/core/concept/point_site.hh>
# include <mln/core/p_set.hh>
# include <mln/pw/image.hh>
Index: trunk/milena/mln/util/tree_to_image.hh
===================================================================
--- trunk/milena/mln/util/tree_to_image.hh (revision 1633)
+++ trunk/milena/mln/util/tree_to_image.hh (revision 1634)
@@ -39,6 +39,7 @@
# include <mln/core/concept/image.hh>
# include <mln/util/tree.hh>
# include <mln/core/p_set.hh>
+# include <mln/level/fill.hh>
namespace mln
{