[Insight-users] using ImageToVTKImageFilter for multiple WindowRenderer

Luis Ibanez luis.ibanez at kitware.com
Tue Jul 31 18:37:50 EDT 2007


Hi Flo,

Please post the the list the following:

1) The declaration of your void function
2) The lines where you call the function
3) The declaration of your ITK image and vtkImageData
    outside of the function.

BTW: Are you programing in C++ ?

Are you instantiating the RenderWindow outside of the void function ?
or inside ?


   Please let us know,


      Thanks


        Luis


---------------
Flo wrote:
> 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.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list