[Insight-users] Python Wrapping Coverage for ITK
Hua Qian
hqian at imaging . robarts . ca
Fri, 03 Oct 2003 15:18:24 -0400
This is a multi-part message in MIME format.
--------------010404090107070605020401
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
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
--
Hua Qian, Ph.D.
Programmer/Analyst
Imaging Research Laboratories
Robarts Research Institute
--------------010404090107070605020401
Content-Type: text/plain;
name="itkPythonList.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="itkPythonList.py"
#! /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()
--------------010404090107070605020401--