[Insight-users] WrapITK Pointers in C++
Marcel Luethi
marcel.luethi at unibas.ch
Tue Jul 24 07:48:59 EDT 2007
Hi Gaëtan,
Thank you for the hint. This is not precisely what I had in mind,
but it actually solves my problem and is much easier and even more
powerful than the solution I intended to implement.
Best regards,
Marcel
On Tue, 2007-07-24 at 12:04 +0200, Gaëtan Lehmann wrote:
> Hi Marcel,
>
> Le 24 juil. 07 à 11:56, Marcel Luethi a écrit :
>
> > 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.
> >
>
> Thanks a lot for the positive report :-)
>
> > 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?
>
> WrapITK has an external projec called PyBuffer which can be used to
> convert itk images to numarray arrays.
> Would it be ok for you?
>
> Gaëtan
>
> --
> 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
>
>
>
--
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