* mln/binarization/binarization.hh,
* mln/level/abs.hh,
* mln/level/saturate.hh,
* mln/level/to_enc.hh,
* tests/io/pgm/pgm16.cc,
* tests/io/pgm/pgm19.cc,
* tests/io/pgm/pgm27.cc,
* tests/value/float01.cc: Update here.
* mln/level/transform.hh: Remove useless prototype.
---
milena/ChangeLog | 15 +++++++++++++++
milena/mln/binarization/binarization.hh | 2 +-
milena/mln/level/abs.hh | 4 ++--
milena/mln/level/saturate.hh | 6 +++---
milena/mln/level/to_enc.hh | 4 ++--
milena/mln/level/transform.hh | 10 +---------
milena/tests/io/pgm/pgm16.cc | 4 ++--
milena/tests/io/pgm/pgm19.cc | 4 ++--
milena/tests/io/pgm/pgm27.cc | 4 ++--
milena/tests/value/float01.cc | 6 +++---
10 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 63ba0ed..c013c05 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,18 @@
+2008-11-05 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Update use of level::transform().
+
+ * mln/binarization/binarization.hh,
+ * mln/level/abs.hh,
+ * mln/level/saturate.hh,
+ * mln/level/to_enc.hh,
+ * tests/io/pgm/pgm16.cc,
+ * tests/io/pgm/pgm19.cc,
+ * tests/io/pgm/pgm27.cc,
+ * tests/value/float01.cc: Update here.
+
+ * mln/level/transform.hh: Remove useless prototype.
+
2008-11-05 Thierry Geraud <thierry.geraud(a)lrde.epita.fr>
Make 2 x 1D convolution work again.
diff --git a/milena/mln/binarization/binarization.hh
b/milena/mln/binarization/binarization.hh
index cd1296d..0c8d2bd 100644
--- a/milena/mln/binarization/binarization.hh
+++ b/milena/mln/binarization/binarization.hh
@@ -70,7 +70,7 @@ namespace mln
trace::entering("binarization::impl::binarization_");
mln_concrete_ch_value(I, bool) output(input.domain());
- level::transform(input, fun, output);
+ output = level::transform(input, fun);
trace::exiting("binarization::impl::binarization_");
return output;
diff --git a/milena/mln/level/abs.hh b/milena/mln/level/abs.hh
index a74b144..9a544d7 100644
--- a/milena/mln/level/abs.hh
+++ b/milena/mln/level/abs.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -72,7 +72,7 @@ namespace mln
trace::entering("level::abs");
mln_precondition(exact(input).domain() == exact(output).domain());
- level::transform(input, fun::v2v::abs<mln_value(I)>(), output);
+ output = level::transform(input, fun::v2v::abs<mln_value(I)>());
trace::exiting("level::abs");
}
diff --git a/milena/mln/level/saturate.hh b/milena/mln/level/saturate.hh
index 8b9c4f3..d3a04e7 100644
--- a/milena/mln/level/saturate.hh
+++ b/milena/mln/level/saturate.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -102,7 +102,7 @@ namespace mln
mln_precondition(exact(input).domain() == exact(output).domain());
fun::v2v::saturate<mln_value(O)> f;
- level::transform(input, f, output);
+ output = level::transform(input, f);
trace::exiting("level::saturate");
}
@@ -118,7 +118,7 @@ namespace mln
mln_precondition(exact(input).domain() == exact(output).domain());
fun::v2v::saturate<mln_value(O)> f(min, max);
- level::transform(input, f, output);
+ output = level::transform(input, f);
trace::exiting("level::saturate");
}
diff --git a/milena/mln/level/to_enc.hh b/milena/mln/level/to_enc.hh
index 19661bb..96e834b 100644
--- a/milena/mln/level/to_enc.hh
+++ b/milena/mln/level/to_enc.hh
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -64,7 +64,7 @@ namespace mln
trace::entering("level::to_enc");
mln_precondition(exact(output).domain() == exact(input).domain());
- level::transform(input, fun::v2v::enc< mln_value(I) >(), output);
+ output = level::transform(input, fun::v2v::enc< mln_value(I) >());
trace::exiting("level::to_enc");
}
diff --git a/milena/mln/level/transform.hh b/milena/mln/level/transform.hh
index 1b21772..adc6467 100644
--- a/milena/mln/level/transform.hh
+++ b/milena/mln/level/transform.hh
@@ -53,23 +53,15 @@ namespace mln
namespace level
{
- /*! Transform the image \p input through a function \p f to set
- * the \p output image.
+ /*! Transform the image \p input through a function \p f
*
* \param[in] input The input image.
* \param[in] f The function.
- * \param[out] output The result image.
*
* This routine runs: \n
* for all p of \p input, \p output(p) = \p f( \p input(p) ).
*
- * \pre \p output.domain >= \p input.domain
*/
- template <typename I, typename F, typename O>
- void transform(const Image<I>& input, const Function_v2v<F>& f,
- Image<O>& output);
-
-
template <typename I, typename F>
mln_ch_value(I, mln_result(F))
transform(const Image<I>& input, const Function_v2v<F>& f);
diff --git a/milena/tests/io/pgm/pgm16.cc b/milena/tests/io/pgm/pgm16.cc
index baff76c..29c19f1 100644
--- a/milena/tests/io/pgm/pgm16.cc
+++ b/milena/tests/io/pgm/pgm16.cc
@@ -82,13 +82,13 @@ int main()
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR
"/lena.pgm");
image2d<int_u16> out(lena.domain());
- level::transform(lena, to16bits(), out);
+ out = level::transform(lena, to16bits());
io::pgm::save(out, "out16.pgm");
image2d<int_u16> lena2 = io::pgm::load<int_u16>("out16.pgm");
image2d<int_u8> out2(lena.domain());
- level::transform(lena2, to8bits(), out2);
+ out2 = level::transform(lena2, to8bits());
io::pgm::save(out2, "out8.pgm");
}
diff --git a/milena/tests/io/pgm/pgm19.cc b/milena/tests/io/pgm/pgm19.cc
index 3fa8490..91b863a 100644
--- a/milena/tests/io/pgm/pgm19.cc
+++ b/milena/tests/io/pgm/pgm19.cc
@@ -80,13 +80,13 @@ int main()
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR
"/lena.pgm");
image2d<int_u19> out(lena.domain());
- level::transform(lena, to19bits(), out);
+ out = level::transform(lena, to19bits());
io::pgm::save(out, "out19.pgm");
image2d<int_u19> lena2 = io::pgm::load<int_u19>("out19.pgm");
image2d<int_u8> out2(lena.domain());
- level::transform(lena2, to8bits(), out2);
+ out2 = level::transform(lena2, to8bits());
io::pgm::save(out2, "out8.pgm");
assert(out2 == lena);
}
diff --git a/milena/tests/io/pgm/pgm27.cc b/milena/tests/io/pgm/pgm27.cc
index 6945b94..244b2e6 100644
--- a/milena/tests/io/pgm/pgm27.cc
+++ b/milena/tests/io/pgm/pgm27.cc
@@ -79,14 +79,14 @@ int main()
image2d<int_u8> lena = io::pgm::load<int_u8>(MLN_IMG_DIR
"/lena.pgm");
image2d<int_u27> out(lena.domain());
- level::transform(lena, to27bits(), out);
+ out = level::transform(lena, to27bits());
io::pgm::save(out, "out27.pgm");
image2d<int_u27> lena2;
io::pgm::load(lena2, "out27.pgm");
image2d<int_u8> out2(lena.domain());
- level::transform(lena2, to8bits(), out2);
+ out2 = level::transform(lena2, to8bits());
io::pgm::save(out2, "out8.pgm");
assert(out2 == lena);
diff --git a/milena/tests/value/float01.cc b/milena/tests/value/float01.cc
index 47b8c48..9dbd6d2 100644
--- a/milena/tests/value/float01.cc
+++ b/milena/tests/value/float01.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 2007 EPITA Research and Development Laboratory
+// Copyright (C) 2007, 2008 EPITA Research and Development Laboratory
//
// This file is part of the Olena Library. This library is free
// software; you can redistribute it and/or modify it under the terms
@@ -133,13 +133,13 @@ int main()
image2d<float01_16> out(lena.domain());
image2d<float01_16> tmp(lena.domain());
- level::transform(lena, tofloat01(), tmp);
+ tmp = level::transform(lena, tofloat01());
level::median(tmp, rect, out);
level::median(lena, rect, ref);
- level::transform(out, to8bits(), lena);
+ lena = level::transform(out, to8bits());
io::pgm::save(lena, "out.pgm");
io::pgm::save(ref, "ref.pgm");
--
1.5.6.5