
Hi there, I'm trying to install swilena, however I'm facing many problems... After ./configure --enable-swilena... everything seems to be ok.. No dependencies problem (Configure result attached) But during Make... I've got many errors like this one: ---- if -Wall -c++ -python -I../../../milena -MD -MF ".deps/config-wrap.Tcc" -o config-wrap.cc ../../../swilena/config.i; then \ mv -f ".deps/config-wrap.Tcc" ".deps/config-wrap.Pcc";\ else \ rm -f ".deps/config-wrap.Tcc"; exit 1;\ fi --- That error I've mentioned before is related to SWIG field. For some reason, the SWIG and many other fields were blank. After reading the Makefile (/opt/olena-1.0/build/swilena/python/Makefile), I've noticed that It failed to fill some configuration commands... most of them related to python.. I have to fill those blanks by myself: SWIG = swig pyexecdir = /opt/olena-1.0/build/swilena/python/ pythondir = /usr/local/lib/python2.6/ PYTHON = /usr/lib/python2.6/ PYTHONINC = /usr/include/python2.6 After that, I thought the installation was about to finish successfully, but I got this error after "make install": test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/" /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/' ../../../build-aux/py-compile: 119: /usr/lib/python2.6/: Permission denied make[3]: ** [install-nodist_pythonPYTHON] Erro 126 make[3]: Saindo do diretório `/opt/olena-1.0/build/swilena/python' make[2]: ** [install-am] Erro 2 make[2]: Saindo do diretório `/opt/olena-1.0/build/swilena/python' make[1]: ** [install-recursive] Erro 1 make[1]: Saindo do diretório `/opt/olena-1.0/build/swilena' make: ** [install-recursive] Erro 1 Yes. I'm root :-) I don't know what is the cause of this permission denied Still, I changed to /opt/olena-1.0/swilena/python and tried to run what swig has created... but... samuel@beaver:/opt/olena-1.0/swilena/python$ python swilena.py Traceback (most recent call last): File "swilena.py", line 24, in <module> import config File "/usr/lib/python2.6/ihooks.py", line 406, in import_module q, tail = self.find_head_package(parent, str(name)) File "/usr/lib/python2.6/ihooks.py", line 449, in find_head_package raise ImportError, "No module named " + qname ImportError: No module named config I checked the generated files and there is no config.py available.. I guess there is something missing in the Makefile... not sure... Anyone can help me out? merci, -- Samuel Félix Computer Science M.Sc. Candidate at Federal University of Minas Gerais Computer Science B.Sc. at Federal University of Pará

Samuel Félix <sfelixjr@gmail.com> writes:
Hi there,
Hello,
I'm trying to install swilena, however I'm facing many problems...
After ./configure --enable-swilena... everything seems to be ok.. No dependencies problem (Configure result attached)
But during Make... I've got many errors like this one:
----
if -Wall -c++ -python -I../../../milena -MD -MF ".deps/config-wrap.Tcc" -o config-wrap.cc ../../../swilena/config.i; then \ mv -f ".deps/config-wrap.Tcc" ".deps/config-wrap.Pcc";\ else \ rm -f ".deps/config-wrap.Tcc"; exit 1;\ fi
---
That error I've mentioned before is related to SWIG field. For some reason, the SWIG and many other fields were blank.
Swilena depends on SWIG. If you plan to compile and install the former, you must tell configure where it can find working `swig' and `python' programs. Adding `--with-swig' to the configure command line should do the trick: ./configure --enable-swig --enable-swilena Could you give it a try? Yes, this is a flaw in our build system (`--enable-swilena' should trigger `--with-swig' automatically). Worse: this is not documented in README. Sorry for the inconvenience. This will be fixed in the next release.
After reading the Makefile (/opt/olena-1.0/build/swilena/python/Makefile), I've noticed that It failed to fill some configuration commands... most of them related to python.. I have to fill those blanks by myself:
SWIG = swig pyexecdir = /opt/olena-1.0/build/swilena/python/ pythondir = /usr/local/lib/python2.6/ PYTHON = /usr/lib/python2.6/
Note that PYTHON is expected to contain the path to the Python interpreter (e.g. `/usr/bin/python'), not a directory.
PYTHONINC = /usr/include/python2.6
After that, I thought the installation was about to finish successfully, but I got this error after "make install":
test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/ " /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/' ../../../build-aux/py-compile: 119: /usr/lib/python2.6/: Permission denied
[...]
Yes. I'm root :-) I don't know what is the cause of this permission denied
This is probably a consequence of the previous problem (hopefully). I guess ``/usr/lib/python2.6/: Permission denied'' is due to the PYTHON Make variable containing a directory name instead of a program name.
Still, I changed to /opt/olena-1.0/swilena/python and tried to run what swig has created...
but...
samuel@beaver:/opt/olena-1.0/swilena/python$ python swilena.py Traceback (most recent call last): File "swilena.py", line 24, in <module> import config File "/usr/lib/python2.6/ihooks.py", line 406, in import_module q, tail = self.find_head_package(parent, str(name)) File "/usr/lib/python2.6/ihooks.py", line 449, in find_head_package raise ImportError, "No module named " + qname ImportError: No module named config
I checked the generated files and there is no config.py available..
`config.py' should be generated by swig from `swilena/config.i.' at build time. It was probably not installed, hence the error message.
I guess there is something missing in the Makefile... not sure...
By the way, Swilena's Python bindings depends on compiled C++ libraries (generated by SWIG), and the Python interpreter must be helped to find them. If you plan to use Swilena in interactive mode, I recommend using the Swilena Python Shell (the `sps' command installed during `make install'). If you want to use Swilena in your script, you may have to set up the environment correctly, depending on your platform. For instance, on Mac OS X, the path to the above-mentioned C++ libraries must be added to the DYLD_LIBRARY_PATH environment variable. On GNU/Linux, everything should run fine if the module `swilena' is imported. Let us know if you run into problems of this kind. Best regards, Roland -- Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est EPITA Research and Development Laboratory (LRDE) 14-16, rue Voltaire - FR-94276 Le Kremlin-Bicêtre Cedex - France Phone: +33 1 53 14 59 45 - Fax: +33 1 53 14 59 22 - www.lrde.epita.fr

Hello sir, first of all, thx for your help... Well, I tried to do what you told me to... but It didn't work... I still get those blanks... I have tested this --enable-swig argument using both versions (olena-1.0 and the latest one from git).. but nothing has changed :( thx for the advice about /usr/bin/python, my mistake :) I fixed that and apparently It finished without problems... look at those lines after make install test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/" /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/' Byte-compiling python modules... config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py Byte-compiling python modules (optimized versions) ... config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/" /usr/bin/install -c -m 644 ../../../swilena/python/ltihooks.py ../../../swilena/python/swilena.py ../../../swilena/python/data.py ../../../swilena/python/sps.py '/usr/local/lib/python2.6/' Byte-compiling python modules... ltihooks.pyswilena.pydata.pysps.py Byte-compiling python modules (optimized versions) ... The sps was installed but when I tried to run, I got: *samuel@beaver:/opt/olena-1.0/build/swilena/python$ sps exec: 27: -i: not found samuel@beaver:/opt/olena-1.0/build/swilena/python$* And when tried to import swilena inside of python environment, I got: * samuel@beaver:/opt/olena-1.0/build/swilena/python$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import swilena Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named swilena *
I think that might be related to some blank field... (e.g I filled the SWIG field, but the SWIG_LIB was blank, I'm not sure what should be put over there) Do you have a well formed Makefile which you could send me? So, I can compare which blank fields may be messing with me... My environment is Ubuntu GNU/Linux merci, Samuel 2010/3/29 Roland Levillain <roland@lrde.epita.fr>
Samuel Félix <sfelixjr@gmail.com> writes:
Hi there,
Hello,
I'm trying to install swilena, however I'm facing many problems...
After ./configure --enable-swilena... everything seems to be ok.. No dependencies problem (Configure result attached)
But during Make... I've got many errors like this one:
----
if -Wall -c++ -python -I../../../milena -MD -MF ".deps/config-wrap.Tcc" -o config-wrap.cc ../../../swilena/config.i; then \ mv -f ".deps/config-wrap.Tcc" ".deps/config-wrap.Pcc";\ else \ rm -f ".deps/config-wrap.Tcc"; exit 1;\ fi
---
That error I've mentioned before is related to SWIG field. For some reason, the SWIG and many other fields were blank.
Swilena depends on SWIG. If you plan to compile and install the former, you must tell configure where it can find working `swig' and `python' programs. Adding `--with-swig' to the configure command line should do the trick:
./configure --enable-swig --enable-swilena
Could you give it a try?
Yes, this is a flaw in our build system (`--enable-swilena' should trigger `--with-swig' automatically). Worse: this is not documented in README. Sorry for the inconvenience. This will be fixed in the next release.
After reading the Makefile (/opt/olena-1.0/build/swilena/python/Makefile), I've noticed that It failed to fill some configuration commands... most of them related to python.. I have to fill those blanks by myself:
SWIG = swig pyexecdir = /opt/olena-1.0/build/swilena/python/ pythondir = /usr/local/lib/python2.6/ PYTHON = /usr/lib/python2.6/
Note that PYTHON is expected to contain the path to the Python interpreter (e.g. `/usr/bin/python'), not a directory.
PYTHONINC = /usr/include/python2.6
After that, I thought the installation was about to finish successfully, but I got this error after "make install":
test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/ " /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/' ../../../build-aux/py-compile: 119: /usr/lib/python2.6/: Permission denied
[...]
Yes. I'm root :-) I don't know what is the cause of this permission denied
This is probably a consequence of the previous problem (hopefully). I guess ``/usr/lib/python2.6/: Permission denied'' is due to the PYTHON Make variable containing a directory name instead of a program name.
Still, I changed to /opt/olena-1.0/swilena/python and tried to run what swig has created...
but...
samuel@beaver:/opt/olena-1.0/swilena/python$ python swilena.py Traceback (most recent call last): File "swilena.py", line 24, in <module> import config File "/usr/lib/python2.6/ihooks.py", line 406, in import_module q, tail = self.find_head_package(parent, str(name)) File "/usr/lib/python2.6/ihooks.py", line 449, in find_head_package raise ImportError, "No module named " + qname ImportError: No module named config
I checked the generated files and there is no config.py available..
`config.py' should be generated by swig from `swilena/config.i.' at build time. It was probably not installed, hence the error message.
I guess there is something missing in the Makefile... not sure...
By the way, Swilena's Python bindings depends on compiled C++ libraries (generated by SWIG), and the Python interpreter must be helped to find them. If you plan to use Swilena in interactive mode, I recommend using the Swilena Python Shell (the `sps' command installed during `make install').
If you want to use Swilena in your script, you may have to set up the environment correctly, depending on your platform. For instance, on Mac OS X, the path to the above-mentioned C++ libraries must be added to the DYLD_LIBRARY_PATH environment variable. On GNU/Linux, everything should run fine if the module `swilena' is imported. Let us know if you run into problems of this kind.
Best regards, Roland
-- Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est EPITA Research and Development Laboratory (LRDE) 14-16, rue Voltaire - FR-94276 Le Kremlin-Bicêtre Cedex - France Phone: +33 1 53 14 59 45 - Fax: +33 1 53 14 59 22 - www.lrde.epita.fr
-- Samuel Félix Computer Science M.Sc. Candidate at Federal University of Minas Gerais Computer Science B.Sc. at Federal University of Pará

Samuel Félix <sfelixjr@gmail.com> writes:
Hello sir,
Hello,
first of all, thx for your help...
Well, I tried to do what you told me to... but It didn't work... I still get those blanks... I have tested this --enable-swig argument using both versions (olena-1.0 and the latest one from git).. but nothing has changed :(
My mistake! The good option is `--with-swig', not `--enable-swig'. Sorry for the bad advice. :( I think this should solve the problem with blank variables in Makefiles.
thx for the advice about /usr/bin/python, my mistake :)
I fixed that and apparently It finished without problems... look at those lines after make install
test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/ " /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/' Byte-compiling python modules... config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py Byte-compiling python modules (optimized versions) ... config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/ " /usr/bin/install -c -m 644 ../../../swilena/python/ltihooks.py ../../../ swilena/python/swilena.py ../../../swilena/python/data.py ../../../swilena/ python/sps.py '/usr/local/lib/python2.6/' Byte-compiling python modules... ltihooks.pyswilena.pydata.pysps.py Byte-compiling python modules (optimized versions) ...
The sps was installed but when I tried to run, I got:
samuel@beaver:/opt/olena-1.0/build/swilena/python$ sps exec: 27: -i: not found samuel@beaver:/opt/olena-1.0/build/swilena/python$
And when tried to import swilena inside of python environment, I got:
samuel@beaver:/opt/olena-1.0/build/swilena/python$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import swilena Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named swilena
I think that might be related to some blank field...
Yes, probably.
(e.g I filled the SWIG field, but the SWIG_LIB was blank, I'm not sure what should be put over there)
On my system (Debian GNU/Linux unstable), it points to ``/usr/share/swig1.3''.
Do you have a well formed Makefile which you could send me? So, I can compare which blank fields may be messing with me...
I think passing the right option (`--with-swig') and rebuilding from scratch should produce a working installation this time. Tell me if works. Best regards, Roland -- Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est EPITA Research and Development Laboratory (LRDE) 14-16, rue Voltaire - FR-94276 Le Kremlin-Bicêtre Cedex - France Phone: +33 1 53 14 59 45 - Fax: +33 1 53 14 59 22 - www.lrde.epita.fr

Hello Roland, It worked \o/ thx!! But, there is just a small problem... trying to run the sps, I got: samuel@beaver:/opt$ sps /usr/bin/python: can't open file '/lib/python2.6/dist-packages/sps.py': [Errno 2] No such file or directory But I fixed that using a naive solution: I changed the /usr/local/bin/sps file by adding a prefix variable pointing to /usr/local like that: prefix=/usr/local PYTHONPATH='${prefix}/lib/python2.6/dist-packages':"$PYTHONPATH" \ DYLD_LIBRARY_PATH='${prefix}/lib/python2.6/dist-packages:${exec_prefix}/lib' \ exec /usr/bin/python -i ${prefix}/lib/python2.6/dist-packages/sps.py "$@" well, after that I have swilena working :) But, I got many other erros inside of swilena.. check that: The Swilena Python Shell (sps). Type "help", "copyright", "credits" or "license" for more information on Python Type "example" for a short example. Type "quit()" or ^D (Ctrl-D) to quit.
import data Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/ihooks.py", line 406, in import_module q, tail = self.find_head_package(parent, str(name)) File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package q = self.import_it(head, qname, parent) File "/usr/lib/python2.6/ihooks.py", line 497, in import_it m = self.loader.load_module(fqname, stuff) File "/usr/lib/python2.6/ihooks.py", line 272, in load_module m = self.hooks.load_source(name, filename, file) File "/usr/lib/python2.6/ihooks.py", line 170, in load_source return imp.load_source(name, filename, file) File "/usr/local/lib/python2.6/dist-packages/data.py", line 24, in <module> top_srcdir = os.environ["top_srcdir"] File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__ raise KeyError(key) KeyError: 'top_srcdir'
Swilena is not stable.. is it? I was trying to find a CCT algorithm in olena... like Salambier, Winkinson, Berger, Menotti, Matas Najman... Do you know which of those I can find? 2010/3/30 Roland Levillain <roland@lrde.epita.fr>
Samuel Félix <sfelixjr@gmail.com> writes:
Hello sir,
Hello,
first of all, thx for your help...
Well, I tried to do what you told me to... but It didn't work... I still get those blanks... I have tested this --enable-swig argument using both versions (olena-1.0 and the latest one from git).. but nothing has changed :(
My mistake! The good option is `--with-swig', not `--enable-swig'. Sorry for the bad advice. :( I think this should solve the problem with blank variables in Makefiles.
thx for the advice about /usr/bin/python, my mistake :)
I fixed that and apparently It finished without problems... look at those lines after make install
test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/ " /usr/bin/install -c -m 644 config.py point2d.py dpoint2d.py box2d.py box2d_piter.py int_u8.py int_u32.py neighb2d.py window2d.py image2d_int.py image2d_int_u8.py dynamic_image2d.py '/usr/local/lib/python2.6/' Byte-compiling python modules...
config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py
Byte-compiling python modules (optimized versions) ...
config.pypoint2d.pydpoint2d.pybox2d.pybox2d_piter.pyint_u8.pyint_u32.pyneighb2d.pywindow2d.pyimage2d_int.pyimage2d_int_u8.pydynamic_image2d.py
test -z "/usr/local/lib/python2.6/" || /bin/mkdir -p "/usr/local/lib/python2.6/ " /usr/bin/install -c -m 644 ../../../swilena/python/ltihooks.py ../../../ swilena/python/swilena.py ../../../swilena/python/data.py ../../../swilena/ python/sps.py '/usr/local/lib/python2.6/' Byte-compiling python modules... ltihooks.pyswilena.pydata.pysps.py Byte-compiling python modules (optimized versions) ...
The sps was installed but when I tried to run, I got:
samuel@beaver:/opt/olena-1.0/build/swilena/python$ sps exec: 27: -i: not found samuel@beaver:/opt/olena-1.0/build/swilena/python$
And when tried to import swilena inside of python environment, I got:
samuel@beaver:/opt/olena-1.0/build/swilena/python$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import swilena Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named swilena
I think that might be related to some blank field...
Yes, probably.
(e.g I filled the SWIG field, but the SWIG_LIB was blank, I'm not sure what should be put over there)
On my system (Debian GNU/Linux unstable), it points to ``/usr/share/swig1.3''.
Do you have a well formed Makefile which you could send me? So, I can compare which blank fields may be messing with me...
I think passing the right option (`--with-swig') and rebuilding from scratch should produce a working installation this time. Tell me if works.
Best regards, Roland
-- Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est EPITA Research and Development Laboratory (LRDE) 14-16, rue Voltaire - FR-94276 Le Kremlin-Bicêtre Cedex - France Phone: +33 1 53 14 59 45 - Fax: +33 1 53 14 59 22 - www.lrde.epita.fr
-- Samuel Félix Computer Science M.Sc. Candidate at Federal University of Minas Gerais Computer Science B.Sc. at Federal University of Pará

Samuel Félix <sfelixjr@gmail.com> writes:
Hello Roland,
Hi,
It worked \o/ thx!!
You're welcome.
But, there is just a small problem...
trying to run the sps, I got:
samuel@beaver:/opt$ sps /usr/bin/python: can't open file '/lib/python2.6/dist-packages/sps.py': [Errno 2] No such file or directory
But I fixed that using a naive solution: I changed the /usr/local/bin/sps file by adding a prefix variable pointing to / usr/local like that:
prefix=/usr/local PYTHONPATH='${prefix}/lib/python2.6/dist-packages':"$PYTHONPATH" \ DYLD_LIBRARY_PATH='${prefix}/lib/python2.6/dist-packages:${exec_prefix}/lib' \ exec /usr/bin/python -i ${prefix}/lib/python2.6/dist-packages/sps.py "$@"
Yes, this is a bug, `prefix' is missing in sps. Sorry, I'll fix it.
well, after that I have swilena working :)
But, I got many other erros inside of swilena.. check that:
The Swilena Python Shell (sps). Type "help", "copyright", "credits" or "license" for more information on Python Type "example" for a short example. Type "quit()" or ^D (Ctrl-D) to quit.
import data Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/ihooks.py", line 406, in import_module q, tail = self.find_head_package(parent, str(name)) File "/usr/lib/python2.6/ihooks.py", line 442, in find_head_package q = self.import_it(head, qname, parent) File "/usr/lib/python2.6/ihooks.py", line 497, in import_it m = self.loader.load_module(fqname, stuff) File "/usr/lib/python2.6/ihooks.py", line 272, in load_module m = self.hooks.load_source(name, filename, file) File "/usr/lib/python2.6/ihooks.py", line 170, in load_source return imp.load_source(name, filename, file) File "/usr/local/lib/python2.6/dist-packages/data.py", line 24, in <module> top_srcdir = os.environ["top_srcdir"] File "/usr/lib/python2.6/UserDict.py", line 22, in __getitem__ raise KeyError(key) KeyError: 'top_srcdir'
You should not use module `data': it is wrongly installed by the current distribution (Olena 1.0); its sole purpose is to give access to data in the distribution (i.e., the file you extracted from the Olena tarball), not in the installed package, so that tests can use images from the distribution. You probably do not need it, by the way. `sps' imports the whole content of module `swilena', so you can use it directly: % ./sps The Swilena Python Shell (sps). Type "help", "copyright", "credits" or "license" for more information on Python Type "example" for a short example. Type "quit()" or ^D (Ctrl-D) to quit.
ima = image2d_int.image2d_int(3, 3) image2d_int.fill(ima, 42) image2d_int.println(ima) 42 42 42 42 42 42 42 42 42
Swilena is not stable.. is it?
Swilena is usable for a few things, but definitely not as stable as Milena. And its gives access to a very small part of Milena for the moment.
I was trying to find a CCT algorithm in olena... like Salambier, Winkinson, Berger, Menotti, Matas Najman... Do you know which of those I can find?
Milena (the core C++ library of Olena) provides routines to create min- and max-trees using a union-find-based algorithm. For instance, the following C++ code: ---------------------------------------------------------------------- #include <mln/core/image/image2d.hh> #include <mln/core/alias/neighb2d.hh> #include <mln/morpho/tree/max.hh> #include <mln/make/image2d.hh> #include <mln/debug/println.hh> int main() { using namespace mln; unsigned vals[] = { 5, 6, 6, 8, 9, 9, 8, 9, 9 }; image2d<unsigned> ima = make::image2d(vals); debug::println("ima =", ima); image2d<point2d> max_tree_parent = morpho::tree::max(ima, c4()); debug::println("max_tree_parent =", max_tree_parent); } ---------------------------------------------------------------------- gives: ---------------------------------------------------------------------- ima = 5 6 6 8 9 9 8 9 9 max_tree_parent = (0,0) (0,0) (0,1) (0,1) (1,0) (1,1) (1,0) (1,1) (1,1) ---------------------------------------------------------------------- However, Swilena wraps only very few data structures and algorithms at the moment, and the min- and max-tree are not part of it yet. I think wrapping them would not take a long time, so I'll give it a try ASAP. If you want, I can let you know when they're ready, either from the Git repository or as a snapshot tarball. Best regards, Roland -- Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est Laboratoire de Recherche et de Développement de l'EPITA (LRDE) 14-16, rue Voltaire - 94276 Le Kremlin-Bicêtre Cedex Tél. : 01 53 14 59 45 - Fax : 01 53 14 59 22 - www.lrde.epita.fr

Roland Levillain <roland@lrde.epita.fr> writes: [...]
However, Swilena wraps only very few data structures and algorithms at the moment, and the min- and max-tree are not part of it yet. I think wrapping them would not take a long time, so I'll give it a try ASAP. If you want, I can let you know when they're ready, either from the Git repository or as a snapshot tarball.
Actually, I just added a simple wrapper to compute the max-tree of an image2d<int_u8> in the branch `swilena' of Olena's Git repository. If you want to give it a try, you can get this version by ``cloning'' the repository, then checking out that branch: git clone git://git.lrde.epita.fr/olena cd olena git checkout swilena ./bootstrap ./configure --with-swig --enable-swilena make You can look at swilena/python/max-tree.py for an example. To run this test, just type: make -C swilena/python check TESTS=max-tree.py VERBOSE=1 Hope this may help you. Roland -- Roland Levillain - LRDE/EPITA - A3SI/ESIEE/IGM/UMLV-Paris Est EPITA Research and Development Laboratory (LRDE) 14-16, rue Voltaire - FR-94276 Le Kremlin-Bicêtre Cedex - France Phone: +33 1 53 14 59 45 - Fax: +33 1 53 14 59 22 - www.lrde.epita.fr
participants (2)
-
Roland Levillain
-
Samuel Félix