[Insight-developers] using swig to wrap ITK - a summary of the tcon (and a little much)

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Nov 17 16:11:00 EST 2006


Hi,

Because I'm not sure how much clear I have been during the tcon, here is  
in short what have been said, and also some things I have forgotten:

The current wrapping system:
  - work on linux and windows with tcl, python and java
  - known to have problems on mac os (java, python) and solaris (java)
  - the problems detailed in the WrapITK article, including the small  
coverage, and inconsistency in wrapped types

WrapITK:
  - 66% of the filters wrapped
  - tcl, python, java
  - python typemaps, to be able to use python types rather than simple itk  
objects,
    like FixedArray, Index, Size, ...
  - no typemaps for tcl and java
  - lacks some custom classes from the previous wrapping system in java and  
tcl
  - tested on linux, mac os, and recently, solaris
  - still lots of problems with windows (especially with java), even if  
some users have reported using it on that plateform (msvc 7.1 only I think)

What will be better with swig:
  - a lot easier to customize
  - build with python 2.5
  - should help to fix problems with very long file names
  - may help to fix build caused by too big generated c++ files
  - no need to maintain a branch of swig

WrapITK with swig status:
  - swig is still not able to read ITK headers - they still need to be read  
by gccxml. The output of gccxml is converted to a swig interface with  
igenerator.py
  - python only
  - made on mac os
  - all currently wrapped itk classes builds with swig
  - no customization from the current wrapitk, like typemaps
  - but some other customizations, like vector support
  - no cmake configurations support
  - based on cableidx and pygccxml, so need python to build
  - problems with cmake dependencies
  - don't group the groups in a few shared modules
  - no template with dict interface
  - require pygccxml cvs and swig cvs because some bugs have been fixed  
while working on wrapping ITK with swig
  - only a few changes have been made (to respect the wrapping order  
imposed by swig) in the WrapITK/Modules directory
  - roughly, igenerator.py have took about 2 days of work, modifying  
WrapITK have took 1 day. The bugs above, and a misunderstanding of  
pygccxml query interface took me one more day

What need to be done (* mark for what I need help), in the order I think  
it should be done:
  - fix the cmake dependencies *
  - add the customizations
    - basic types like std::string, std::exception, ...
    - typemaps currently in WrapITK
    - PyCommand, PyImageToImageFilter
  - fix the dict interface for the templates
(at that point, the current python tests should all pass on unix-like  
systems)
  - support cmake configurations
  - make it work on all the systems, and submit daily tests for all those  
systems on the dashboard *
  - add support for java (*?)
  - add support for tcl and the customizations from the current wrapper  
(TkImageViewer2D, TclCommand, ...) *
  - more python customizations: __getitem__(), __len__(), __str__(), ...  
like in the current optional patch
  - recode igenerator.py in c++ to no more use pygccxml (igenerator.py is  
attached for the ones who want to have an idea of the work to do) *
(the following items are too be done later)
  - better filter coverage *
  - support more languages
  - ...

What still remain to decide:
  - when switch to swig (I think it's clear that the switch is a good thing)
  - who can/want to work on the the items marked with a "*" in the "What  
need to be done" section above (any help is welcome for the other items  
too :-)
  - how to proceed:
    - fix WrapITK with cableswig on windows, or switch first to swig, and  
make sure it builds on windows after that
    - create a new cvs branch or a new cvs check out

Gaetan



Le Wed, 15 Nov 2006 16:09:22 +0100, Gaetan Lehmann  
<gaetan.lehmann at jouy.inra.fr> a écrit:

>
> Hi Luis,
>
> On Tue, 14 Nov 2006 22:34:50 +0100, Luis Ibanez  
> <luis.ibanez at kitware.com> wrote:
>
>>
>> Hi Gaetan,
>>
>> That's a good idea.
>>
>> Why don't you call to this Friday's developers phone conference ?
>>
>> That will be at the usual time of 1:00pm EST (7:00pm France time).
>>
>> Please let us know if this time works for you.
>>
>
> Its ok for me.
> How can I join the conference ?
>
> Gaetan
>
>
>>
>>    Thanks
>>
>>
>>       Luis
>>
>>
>> --------------------------------
>> Gaetan Lehmann wrote:
>>>  It is important for me to plan what I will do, and to know if it is   
>>> possible to get some help when things are going wrong. Also, perhaps  
>>> there  are some more favorable times than others to switch to swig.
>>> Can we plan a meeting to talk about that ?
>>>   On Sun, 12 Nov 2006 00:50:06 +0100, Gaëtan Lehmann   
>>> <gaetan.lehmann at jouy.inra.fr> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> Today, I have completed the build of WrapITK with swig.
>>>> There is still lot of work to do, but there is already some features  
>>>> not  there with cableswig, like some usable vector<> types.
>>>>
>>>> Can we plan a meeting next week to talk about how this work can be   
>>>> continuated ?
>>>>
>>>> Regards,
>>>>
>>>> Gaetan
>>>>
>>>>
>>>>
>>>
>
>
>



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: igenerator.py
Type: application/octet-stream
Size: 9872 bytes
Desc: not available
Url : http://www.itk.org/mailman/private/insight-developers/attachments/20061117/46a8c2cd/igenerator.obj


More information about the Insight-developers mailing list