[Insight-users] using ImageToVTKImageFilter for multiple WindowRenderer

Flo snrf at no-log.org
Tue Jul 31 17:57:02 EDT 2007


Dear all:

I'm using a void function containing ImageToVTKImageFilter in  
conjunction with a Caster to pass images from ITK to VTK.
Everything works fine in the case where I use a single WindowRender/ 
Renderer.

However, If I have 2 or more WindowRenders, and if each has a  
different call to my function (with different input images) then I  
have a segmentation fault.

To my understanding, this is a memory access violation due to the  
"pointer" strategy of ITK while creating the Casting/Exporting pipeline.
Thus, I tried different update(), updatewholeextent() calls but in  
vain (I thought it would have force the ITK pipeline to create a new  
pointer - now I understand why this was a bad guess !!!).

So here is my question, is creating such a function but returning a  
pointer to the casted data the best way to do things ? But then, how  
to make sure I really have a new pointer towards my new casted data ?  
I tried to declare a table of connector (ImageToVTKImageFilter  
connectors) but it failed as well !

any suggestions would be of great help.

Flo.


More information about the Insight-users mailing list