[vtkusers] Reseting vtk pipeline

Nasos Iliopoulos nasos_i at hotmail.com
Thu Jun 18 09:20:53 EDT 2009


Hello all,
I am developing an application using QT and VTK. At some points (i.e. when the user wants to start a New Project), I need to reset the vtk pipeline to the original state. 

For example I have a vtkPNMImageReader that through some image algorithms is streamed to a vtkImageActor. Now, I need to reset the vtkPNMImageReader, so that it does not provide any image in the pipeline and hence vtkImageActor have no image to display. If I just set vtkPNMImageReader to a non-existent image, vtkImageActor won't update since vtkPNMImageReader is at an error state.

For now I am deleting the old vtkObjects and just recreate them, but I am afraid I am getting a broken interface with the rest of my application.

The most vtk-friendly way I find is by disconnecting each object, update it and then recreate the pipeline, without deleting any vtk item. Obviously this is a tedious process and I feel it is not the most elegant one. Is there any other way that will resolve my situation?

Best
Nasos


_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090618/581d2949/attachment.htm>


More information about the vtkusers mailing list