ChangeLog | 7 +++++
tests/morpho/tests/gradient | 48 --------------------------------------
tests/morpho/tests/thick_gradient | 48 ++++++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 48 deletions(-)
Index: olena/ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
* tests/morpho/tests/gradient: Catch up with changes on
morphological gradients.
Rename as...
* tests/morpho/tests/thick_gradient: ...this.
2005-07-04 Roland Levillain <roland(a)lrde.epita.fr>
Index: olena/tests/morpho/tests/thick_gradient
--- olena/tests/morpho/tests/thick_gradient (révision 0)
+++ olena/tests/morpho/tests/thick_gradient (révision 0)
@@ -0,0 +1,48 @@
+ // -*- C++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include <ntg/int.hh>
+#include <oln/core/2d/image2d.hh>
+#include <oln/core/gen/image_with_nbh.hh>
+#include <oln/io/read_image.hh>
+#include <oln/io/write_image.hh>
+#include <oln/morpho/thick_gradient.hh>
+
+using namespace oln;
+
+bool check()
+{
+ typedef image2d<ntg::int_u8> ima_type;
+ ima_type input;
+ input = io::read(rdata("lena-small.pgm"));
+
+ // Beucher gradient.
+ utils::key::value_type bg_data_key[16] =
+ {0x89, 0xaa, 0x5b, 0xca, 0x8, 0xec, 0xb3, 0xe7,
+ 0x86, 0xfb, 0x4b, 0x59, 0xf0, 0x8, 0xf5, 0x59};
+ utils::key bg_key(bg_data_key);
+ ima_type bg = morpho::thick_gradient_beucher(input, win_c8p());
+ if (utils::md5(bg) != bg_key)
+ return true;
+
+ // Internal gradient.
+ utils::key::value_type ig_data_key[16] =
+ {0xe7, 0xff, 0x90, 0x2a, 0x50, 0x44, 0x30, 0x65,
+ 0xeb, 0xe3, 0xf2, 0xc4, 0x6f, 0xfe, 0x65, 0x84};
+ utils::key ig_key(ig_data_key);
+ ima_type ig = morpho::thick_gradient_internal(input, win_c8p());
+ if (utils::md5(ig) != ig_key)
+ return true;
+
+ // External gradient.
+ utils::key::value_type eg_data_key[16] =
+ {0xf7, 0xb7, 0x9e, 0x74, 0xe0, 0xd1, 0xe7, 0xd8,
+ 0x5b, 0x0, 0xe8, 0x37, 0x57, 0xdc, 0x2c, 0x27};
+ utils::key eg_key(eg_data_key);
+ ima_type eg = morpho::thick_gradient_external(input, win_c8p());
+ if (utils::md5(eg) != eg_key)
+ return true;
+
+ return false;
+}
Index: olena/tests/morpho/tests/gradient
--- olena/tests/morpho/tests/gradient (révision 231)
+++ olena/tests/morpho/tests/gradient (copie de travail)
@@ -1,48 +0,0 @@
- // -*- C++ -*-
-#include "data.hh"
-#include <oln/utils/md5.hh>
-
-#include <ntg/int.hh>
-#include <oln/core/2d/image2d.hh>
-#include <oln/core/gen/image_with_nbh.hh>
-#include <oln/io/read_image.hh>
-#include <oln/io/write_image.hh>
-#include <oln/morpho/gradient.hh>
-
-using namespace oln;
-
-bool check()
-{
- typedef image2d<ntg::int_u8> ima_type;
- ima_type input;
- input = io::read(rdata("lena-small.pgm"));
-
- // Beucher gradient.
- utils::key::value_type bg_data_key[16] =
- {0x89, 0xaa, 0x5b, 0xca, 0x8, 0xec, 0xb3, 0xe7,
- 0x86, 0xfb, 0x4b, 0x59, 0xf0, 0x8, 0xf5, 0x59};
- utils::key bg_key(bg_data_key);
- ima_type bg = morpho::beucher_gradient(input, win_c8p());
- if (utils::md5(bg) != bg_key)
- return true;
-
- // Internal gradient.
- utils::key::value_type ig_data_key[16] =
- {0xe7, 0xff, 0x90, 0x2a, 0x50, 0x44, 0x30, 0x65,
- 0xeb, 0xe3, 0xf2, 0xc4, 0x6f, 0xfe, 0x65, 0x84};
- utils::key ig_key(ig_data_key);
- ima_type ig = morpho::internal_gradient(input, win_c8p());
- if (utils::md5(ig) != ig_key)
- return true;
-
- // External gradient.
- utils::key::value_type eg_data_key[16] =
- {0xf7, 0xb7, 0x9e, 0x74, 0xe0, 0xd1, 0xe7, 0xd8,
- 0x5b, 0x0, 0xe8, 0x37, 0x57, 0xdc, 0x2c, 0x27};
- utils::key eg_key(eg_data_key);
- ima_type eg = morpho::external_gradient(input, win_c8p());
- if (utils::md5(eg) != eg_key)
- return true;
-
- return false;
-}