[Insight-users] Re: on wrap_itk

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sat Apr 14 07:19:01 EDT 2007


Hi,

Please keep the discussions about wrapitk on the user list: it can  
help others to fix there problems in the future :-)

Le 14 avr. 07 à 11:09, anirudh vij a écrit :

> hi gaetan,
> kudos once again for creating wrap itk.It has speeded up my work a  
> lot.Prototyping is truly horrible in cpp.
>
> in course of my use i faced some problems.hope you'll be able to  
> guide towards the solution.
>
> 1)still could'nt get show3d() working.my versions of qt and pyqt  
> are both 4.2.3. maybe thats the problem.

it shouldn't prevent you to see the show3D class in the itk module.
You didn't sent me the content of your /usr/local/InsightToolkit/ 
WrapITK/Python/itkExtras/ directory. Can you do that ?

> anyway,i installed mayavi which has excellent python  
> compatibility.i would like to write a wrapper for show3d() which  
> would make a call to mayavi whenever show3d() is called,maybe with  
> some extra options.where should i place the .py file give that no  
> show3d.py currently exists in /usr/local/lib/InsightToolkit.maybe  
> you could consider moving the itk.show framework entirely to mayavi  
> in the future .it would mean fewer dependencies on one hand,and a  
> unified show2d() and show3d() interface on the other(sice mayavi  
> can show 2d images with extra options of visualization)

I'm still looking for a good interface for python and ITK. I'm not  
sure that mayavi is what I exactly what I want though, but have an  
interface for it would be a great feature :-)
The best way to go, IMHO, is to create a mayavi function or class to  
display the image, and to put that function in a module in the  
itkExtras dir, so its content will automatically appear in the itk  
module - show3D is made that way.

>
> 2)whenever a filter is incorrectly initialized and an update is  
> triggered,wrap_itk stops working for that session.subsequent  
> imports produce the error:module swig not defined.
>
> 3)after succesfully triggering an update on a filter,if some  
> parameters are changed subsequently,and an update is again  
> triggered,there is no change.for example.
> dil=itl.BinaryDilateImageFilter.IFUS3US3.New()
> dil.SetKernel(se)  #se is some strel
> dil.Update()   #works fine
> dil.SetKernel(se2)
> dil.Update() #no change :(
>
> is it a problem with my installation or is this the way it is  
> supposed to behave.

it looks like a problem. Can you send a short script which reproduce  
the problem ? It would help a lot to reproduce it and to debug.

>
> currently i am trying to extend wrap_itk using scipy (i.e. make  
> calls cleaner,add routines that directly do common tasks etc).

Are you using PyBuffer to pass data from ITK to scipy ?

> i will report any major successes.
>

Please, do :-)

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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070414/caae622d/PGP.pgp


More information about the Insight-users mailing list