Rblena is now as usable as Pylena is.
I don't know why the watershed transform doesn't work (neither in
Pylena nor in Rblena), but this shouldn't be hard to fix.
By the way, if you want to take part in the lifting of Olena 0.10,
you're welcome! Tell us, and we'll create some tickets on Olena's
Trac.
2006-07-11 Roland Levillain <roland(a)lrde.epita.fr>
Complete Rblena test suite.
* ruby/tests/arith.rb, ruby/tests/conversions.rb,
* ruby/tests/morpho.rb: New tests
* ruby/tests/Makefile.am (dist_noinst_DATA): Add arith.rb,
conversions.rb and morpho.rb.
* python/tests/conversions.py, python/tests/morpho.py:
* python/tests/simple1.py: Reduce the number of imported modules.
* python/tests/Makefile.am, python/tests/arith.py,
* python/tests/sanity.py, ruby/tests/conversions.rb,
* ruby/tests/simple1.rb: Aesthetic changes.
--- 10.241/tools/swilena/python/tests/Makefile.am Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/v/15_Makefile.a 1.8 644)
+++ 10.242/tools/swilena/python/tests/Makefile.am Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/v/15_Makefile.a 1.9 644)
@@ -3,10 +3,10 @@
## Makefile.am for swilena/python/tests
##
-dist_noinst_DATA = sanity.py arith.py conversions.py simple1.py morpho.py
-
TESTS_ENVIRONMENT = \
PYTHONPATH="..:$(srcdir)/..:$(PYTHONPATH):" \
IMGDIR="$(top_srcdir)/olena/img"
+dist_noinst_DATA = sanity.py arith.py conversions.py morpho.py simple1.py
+
TESTS = $(dist_noinst_DATA)
--- 10.241/tools/swilena/python/tests/simple1.py Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/v/16_simple1.py 1.5 744)
+++ 10.242/tools/swilena/python/tests/simple1.py Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/v/16_simple1.py 1.6 744)
@@ -1,10 +1,9 @@
-#!/usr/bin/env python
+#! /usr/bin/env python
import os
import sys
import ltihooks
from swilena_image2d import *
-from swilena_ntg import *
imgdir = os.environ['IMGDIR']
--- 10.241/tools/swilena/ruby/tests/Makefile.am Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/v/18_Makefile.a 1.7 644)
+++ 10.242/tools/swilena/ruby/tests/Makefile.am Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/v/18_Makefile.a 1.8 644)
@@ -7,6 +7,6 @@
SWILENA_PATH="$(srcdir)/..:..:../.libs" \
IMGDIR="$(top_srcdir)/olena/img"
-dist_noinst_DATA = sanity.rb simple1.rb
+dist_noinst_DATA = sanity.rb arith.rb conversions.rb morpho.rb simple1.rb
TESTS = $(dist_noinst_DATA)
--- 10.241/tools/swilena/ruby/tests/simple1.rb Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/v/19_simple1.rb 1.5 755)
+++ 10.242/tools/swilena/ruby/tests/simple1.rb Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/v/19_simple1.rb 1.6 755)
@@ -1,6 +1,6 @@
-#!/usr/bin/env ruby
+#! /usr/bin/env ruby
-# Set swilena_path to the location where swilena ruby modules are
+# Set swilena_path to the location where swilena ruby modules are.
if ENV.has_key? "SWILENA_PATH"
$:.concat ENV["SWILENA_PATH"].split(":")
end
--- 10.241/tools/swilena/python/tests/morpho.py Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/v/47_morpho.py 1.3 744)
+++ 10.242/tools/swilena/python/tests/morpho.py Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/v/47_morpho.py 1.4 744)
@@ -1,13 +1,28 @@
-#!/usr/bin/env python
+#! /usr/bin/env python
import os
import sys
import ltihooks
-from swilena_all2d import *
+
+from swilena_image2d import *
+from swilena_conversions2d import *
+
+from swilena_structelt2d import *
+import swilena_morpho2d_ntg_int_s32 as morpho_s32
+import swilena_morpho2d_ntg_int_u8 as morpho_u8
imgdir = os.environ['IMGDIR']
lena = image2d_u8(load(imgdir + "/lena.pgm"))
-lenas32 = cast_to_int_s32(lena)
-closing(lenas32, win_c4p())
-#watershed_seg(lena, neighb_c4())
+lena_s32 = cast_to_int_s32(lena)
+morpho_s32.closing(lena_s32, win_c4p())
+
+# FIXME: The watershed transform fails with this error:
+#
+# Traceback (most recent call last):
+# File "../../../../../tools/swilena/python/tests/morpho.py", line 21, in
?
+# morpho_u8.watershed_seg(lena, neighb_c4())
+# RuntimeError: ../../../../integre/ntg/real/behavior.hh:238:
+# Assertion `ntg::to_ntg(p) <= ntg::type_traits< T >::max()' failed.
+
+#morpho_u8.watershed_seg(lena, neighb_c4())
--- 10.241/tools/swilena/python/tests/arith.py Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/w/0_arith.py 1.3 744)
+++ 10.242/tools/swilena/python/tests/arith.py Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/w/0_arith.py 1.4 744)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python
import os
import sys
--- 10.241/tools/swilena/python/tests/conversions.py Tue, 11 Jul 2006 15:29:25 +0200
levill_r (oln/w/1_conversion 1.2 744)
+++ 10.242/tools/swilena/python/tests/conversions.py Tue, 11 Jul 2006 17:56:38 +0200
levill_r (oln/w/1_conversion 1.3 744)
@@ -1,9 +1,10 @@
-#!/usr/bin/env python
+#! /usr/bin/env python
import os
import sys
import ltihooks
-from swilena_all2d import *
+from swilena_image2d import *
+from swilena_conversions2d import *
imgdir = os.environ['IMGDIR']
--- 10.241/tools/swilena/ruby/tests/sanity.rb Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/w/38_sanity.rb 1.2 755)
+++ 10.242/tools/swilena/ruby/tests/sanity.rb Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/w/38_sanity.rb 1.3 755)
@@ -2,7 +2,6 @@
# Sanity check: include all Ruby modules, but do nothing.
-
# Set swilena_path to the location where swilena ruby modules are.
if ENV.has_key? "SWILENA_PATH"
$:.concat ENV["SWILENA_PATH"].split(":")
--- 10.241/tools/swilena/python/tests/sanity.py Tue, 11 Jul 2006 15:29:25 +0200 levill_r
(oln/w/39_sanity.py 1.2 744)
+++ 10.242/tools/swilena/python/tests/sanity.py Tue, 11 Jul 2006 17:56:38 +0200 levill_r
(oln/w/39_sanity.py 1.3 744)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#! /usr/bin/env python
# Sanity check: include all Python modules, but do nothing.