
https://svn.lrde.epita.fr/svn/oln/branches/cleanup-2008/milena Index: ChangeLog from Thierry Geraud <thierry.geraud@lrde.epita.fr> Fix connectivity number values for c4. * tests/morpho/skeleton_constrained.cc: Use tiny image. * mln/topo/is_simple_2d.hh (connectivity_number_c4): Fix values. mln/topo/is_simple_2d.hh | 39 +++++++++++++++++------------------ tests/morpho/skeleton_constrained.cc | 2 - 2 files changed, 21 insertions(+), 20 deletions(-) Index: tests/morpho/skeleton_constrained.cc --- tests/morpho/skeleton_constrained.cc (revision 2899) +++ tests/morpho/skeleton_constrained.cc (working copy) @@ -89,7 +89,7 @@ border::thickness = 1; image2d<bool> pic; - io::pbm::load(pic, MLN_IMG_DIR "/fly.pbm"); + io::pbm::load(pic, MLN_IMG_DIR "/tiny.pbm"); mln_VAR( nbh, make::dual_neighb(pic, c4(), c8()) ); Index: mln/topo/is_simple_2d.hh --- mln/topo/is_simple_2d.hh (revision 2899) +++ mln/topo/is_simple_2d.hh (working copy) @@ -100,27 +100,28 @@ 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; + static const unsigned char connectivity_number_c4[256] = { - 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, - 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 3, 2, 2, 2, 2, 1, - 1, 2, 2, 2, 2, 3, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, - 2, 3, 3, 3, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 1, - - 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 3, 3, 2, - 2, 3, 3, 3, 2, 3, 2, 2, 3, 3, 4, 3, 3, 3, 3, 2, - 1, 2, 2, 2, 2, 3, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, - 2, 3, 3, 3, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 2, 1, - - 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3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