[Insight-users] WrapITK Pointers in C++

Marcel Luethi marcel.luethi at unibas.ch
Tue Jul 24 05:56:35 EDT 2007


Hi, 

I am using WrapITK for most of the simpler ITK tasks. 
First, thanks a lot for this wonderful contribution. It really makes
working with ITK very enjoyable. 

I frequently encounter the problem that I have to loop over all the
voxels of an image and apply an itk function (e.g. image.SetPixel(...))
to every voxel. Calling a wrapped function seems to be very expensive. 
That is why I would like to write the code (i.e. the corresponding for
loops) in C++, using e.g. scipy.weave.

For VTK, type converters for weave exist (weave.converters.vtk_spec)
that makes this task trivial and elegant.
I would like to do something similar for itk. However, I am struggling
with type conversion. Can anybody tell me how the itk classes are
represented in Python? It seems that they are not simple SWIG Pointers.
How would I access a WrapITK objects from c++? Has anybody already tried
to do something similar?

Thank you in advance. 

Marcel
-- 
Marcel Lüthi, PhD Student
University of Basel
Department of Computer Science
Bernoullistrasse 16
CH-4056 Basel
Tel: +41 61 267 05 52



More information about the Insight-users mailing list