[vtkusers] Reseting vtk pipeline

Gerrick Bivins gbivins at objectreservoir.com
Fri Jun 19 10:05:00 EDT 2009


Hi Nasos,
Did you try setting the visibility of the image actor to ³off² do when you
want to reset? Then when you read a new file you can turn the visibility of
the actor back to ³on².

Gerrick


On 6/18/09 8:20 AM, "Nasos Iliopoulos" <nasos_i at hotmail.com> wrote:

> 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>
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090619/7d779342/attachment.htm>


More information about the vtkusers mailing list