
Giovanni Palma wrote:
Index: olena/ChangeLog from Giovanni Palma <giovanni@lrde.epita.fr> * tests/topo/tests/md5_topo_dmap_hh0: Add file. * tests/topo/tests/md5_topo_tarjan_flat-zone_hh0: Likewise.
+2004-03-23 Giovanni Palma <giovanni@lrde.epita.fr> + * tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2: Add file. * tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3: Likewise. * tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4: Likewise. Index: olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 --- olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 Tue, 23 Mar 2004 15:47:49 +0100 palma_g () +++ olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 Tue, 23 Mar 2004 12:29:52 +0100 palma_g (oln/m/12_md5_topo_t 644) @@ -0,0 +1,28 @@ +// -*- c++ -*- +#include "data.hh" +#include <oln/utils/md5.hh> + +#include "check.hh" +#include <oln/basics2d.hh> +#include <oln/topo/tarjan/flat-zone.hh> +#include <oln/convert/stretch.hh> + +int main() +{ +oln::utils::key::value_type data_key[16] = {0x23, 0x57, 0x37, 0xc5, 0xf5, 0xd1, 0x56, 0x6b, 0x6a, 0x2b, 0x6b, 0xe6, 0x59, 0x5b, 0xbb, 0x57}; + +oln::utils::key key(data_key); + + typedef oln::image2d<ntg:: +int_u8> img_type; + img_type in = oln::load(rdata("test-cmap.pgm")); + oln::topo::tarjan::flat_zone<img_type> z(in); + if (oln::utils::md5(oln::convert::stretch_balance<ntg:: +int_u8>(z.label, 0, 255)) == key)
C'est ok, note que stretch_balance est utile dans la doc pour bien voir le résultat dans le cas où le résultat est une image de labels (par exemple une image2d<int_u8> comportant des '2' des '3' et des '200', va étre transformée en image comportant des '0' des '127' et des '255'). Dans le make check elle fait perdre du temps. (Mais ce n'est pas grave, et ce sont des tests générés). -- Niels