[Insight-users] Python Wrapping Coverage for ITK

Luis Ibanez luis . ibanez at kitware . com
Tue, 14 Oct 2003 14:06:58 -0400


Hi Hua,

Thanks a lot for your detailed information  about
the classes needing wrapping for multi-resolution
registration.

Wrappers your the classes in your list have been
added now.

 >   MultiResolutionImageRegistrationMethod
 >   RecursiveMultiResolutionPyramidImageFilter
 >   ChangeInformationImageFilte
 >   FlipImageFilter
 >   NormalizeImageFilter
 >   PermuteAxesImageFilter


Massive wrapping is not impossible but it will be
quite impractical. For the classes in BasicFilters
it may not be that bad, but when you go to Algorithms
and Statistics, there are way too many possible
combinations.

The "Evolutionary" method of simply wrapping the classes
that are being used (and in the context of their use)
seems to be the best approach to follow.

For this year we are planning in increase a lot the
coverage of classes wrapped. So, if you have more
classes in you wrapping wish list, please let us know
so we can make sure that they got included.




Regards,



    Luis



-------------------
Hua Qian wrote:
> Hello All,
> 
> As a test drive for my Python-ITK application,
> I tried to re-implement the MultiResMIRegistration
> application in Python recently. I didn't go very
> far before I found that I have to wrap lots of
> ITK classes myself, such as
> 
>   MultiResolutionImageRegistrationMethod
>   RecursiveMultiResolutionPyramidImageFilter
>   ChangeInformationImageFilte
>   FlipImageFilter
>   NormalizeImageFilter
>   PermuteAxesImageFilter
> 
> While it is quick and easy to write a C++ wrapping
> file for a class, it is slow to rebuild ITK
> every time you add new wrapping files.
> Now, I am wondering if I could get all the
> building work done in one shot. My questions are:
> 
> Is feasible to wrap all the ITK C++ class (at
> least for US3, F3 and combinations) in python
> (and Tcl)?
>  
> Does anyone know the coverage of python/tcl
> wrapping in ITK 1.4 distribution? I am talking
> about the class base, not all the template
> parameter combinations.
> 
> By the way, I attached a little python program
> that generates a list of ITK python classes
> (output: /usr/tmp/itklist.txt). I use the list
> to check what classes are available in Python.
> 
> Regards,
> Hua
> 
> 
> ------------------------------------------------------------------------
> 
> #! /usr/bin/env python
> 
> import InsightToolkit as itk
> 
> file = open('/usr/tmp/itklist.txt', 'w')
> 
> itklist = dir(itk)
> for item in itklist:
>     file.write(item)
>     file.write('\n')
> 
> file.close()