[Insight-users] ITK V4.0.0 with Python Wrapping

Mathieu Stumpf mathieu.stumpf at etu.unistra.fr
Fri Feb 10 07:18:41 EST 2012


Le vendredi 10 février 2012 à 10:19 +0100, Mathieu Stumpf a écrit :
> Using the debian swig version, the following error ISN'T return, but it
> is returned with both cvs and ITK provided versions :
> 
>          CMake Warning (dev) at /usr/share/cmake-2.8/Modules/ExternalProject.cmake:167 (message):
>            unknown ExternalProject_Add keyword: PCRE
>          Call Stack (most recent call first):
>            /usr/share/cmake-2.8/Modules/ExternalProject.cmake:1131 (_ep_parse_arguments)
>            Wrapping/Generators/SwigInterface/CMakeLists.txt:44 (ExternalProject_add)
>          This warning is for project developers.  Use -Wno-dev to suppress it.
>         
> For now I recompile with the debian swig configuration, without gccxml,
> I will let you know what it gives.


Ok,it works now !

So here are the step which worked for me :
- installing the debian swig package : sudo apt-get install swig
- configuring the build (ccmake) following [1] instructions, except for
the ITK_USE_SYSTEM_SWIG which should be turned to ON. Typing 'c' and
check you have :
        SWIG_DIR=/usr/share/swig1.3
        SWIG_EXECUTABLE=/usr/bin/swig 
- add the following lines to your ~/.bashrc (or wherever you set your
shell env variables) :
        
        export ITK_VERSION=4.1
        export VTK_VERSION=5.8
        export ITKWRAPPEDINSTALLED=/usr/local/lib/cmake/ITK-${ITK_VERSION}/WrapITK/
        export LD_LIBRARY_PATH=${ITKWRAPPEDINSTALLED}:/usr/local/lib:/usr/local/lib/vtk-${VTK_VERSION}/
        export PYTHONPATH=$ITKWRAPPEDINSTALLED:/usr/local/lib/ITK-${ITK_VERSION}/Python
        
Of course you should adapt versions and install path. I didn't changed
the install path, so if you let the default configuration and where able
to install it there (may require some privileges), it should work . 

Also I installed some other packages during the week, so it may requires
more dependances than just the swig package. I can't tell which are
really required but here are some which may not be completely
irrelevant:
- python-sip-dev
- python-sip
- glutg3-dev

Of course you need the compilation tool chain:
- make
- bison
- cmake
- ccmake
- cmake-curses-gui
- g++
- gccxml

Where should I preferably put documentation on this topic ? I may create
a
http://farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Building_Software/Building_ITK/Debian wiki page, if you like.

Thank everybody for your help and answers.

Kind regards,
Mathieu

[1]
http://farsight-toolkit.org/wiki/FARSIGHT_Tutorials/Building_Software/Building_ITK#Run_ccmake



More information about the Insight-users mailing list