[Insight-users] new-style ITK Python wrapping

Zachary Pincus zpincus at stanford.edu
Tue Feb 7 13:23:51 EST 2006


[4] http://voxel.jouy.inra.fr/darcs/contrib-itk/WrapITK/

Gaetan Lehmann and I have nearly wrapped up some changes to the new- 
style wrapping, which have been going into the above repository.

I'll let Gaetan make an official announcement of this when things are  
fully-stabilized, since he's really been the ringleader of all of  
this. However, in the service of answering your question, I will  
briefly summarize.

The new changes have been to (a) allow WrapITK to be built outside of  
an ITK tree (b) support easy addition and installation of "external"  
wrapped classes (either more itk classes, or custom itk-like classes)  
to the existing wrappers, and (c) to make the "magic" CMake and  
Python code -- especially the parts that people might use or  
customize -- much simpler and better documented.

Gaetan has started preparing an article for the Insight Journal to  
describe all of this properly. For now, consult the draft  
documentation for the new wrappers:
http://voxel.jouy.inra.fr/darcs/contrib-itk/WrapITK/Documentation/ 
Guide.txt

The code linked above is pretty stable and currently good for use  
with Python. Right now Java and Tcl wrappers build, more or less, but  
probably do not run. Someone more familiar with those languages and  
how they interface with shared libraries would be welcome to help us  
make the (in all likelihood minor) changes to the scripts which load  
the itk libraries.

One last remaining sore spot, I think, is support for iterators.  
Right now there's no way in CableSwig to rename operator++ to  
something valid in Python (or Java or Tcl), so the iterator classes  
are not useful.(*) The only way to solve this is to manually patch  
ITK to have synonymous functions for operator++. Currently WrapITK  
has some patches like this, but none for the iterators yet.


Zach Pincus

Program in Biomedical Informatics and Department of Biochemistry
Stanford University School of Medicine


* A far-out plan: write a tool that translates gcc_xml output into  
input for a current and fully-functional version of swig, freeing us  
from the limitations of the venerable cableswig. This is in all  
likelihood not going to happen unless someone is interested in  
helping me suss some of the issues surrounding this all out.



On Feb 7, 2006, at 9:52 AM, Charl P. Botha wrote:

> Dear ITK'ers,
>
> On the "new-style wrapping" proposal page [1], there is currently no
> information on how I can get my hands on the current implementation.
> After more searching, I find two possibilities: [2] and [3].
>
> Could the one and only true implementation of the new-style wrapping
> please stand up?
>
> More directly:
> 1. Which is the implementation that goes with the proposal?
> 2. Could this information be added to the WIKI page?
>
> Thanks,
> Charl
>
> [1] http://vtk.org/Wiki/Proposals:Refactoring_Wrapping
> [2] http://cvs.creatis.insa-lyon.fr/viewcvs/viewcvs.cgi/itkWrapping/
> [3] http://voxel.jouy.inra.fr/darcs/itk-mima2/Insight/Wrapping/CSwig/
>
> --
> charl p. botha - http://visualisation.tudelft.nl/
> work: c.p.botha%tudelft.nl other: cpbotha%cpbotha.net
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list