[vtkusers] Reseting vtk pipeline
Nasos Iliopoulos
nasos_i at hotmail.com
Fri Jun 19 10:28:36 EDT 2009
I was thinking of that, but it will cause gui integration problems. i.e. there is a pushbutton for the user to choose the visibility of the image actor and I feel that it would not be nice the application to force user demanded options to be touched by the backend. Of course one can add one more degree of indirection there (and hence non qui-api controlled flags) but I am trying to avoid it.
Thanks though!
Date: Fri, 19 Jun 2009 09:05:00 -0500
Subject: Re: [vtkusers] Reseting vtk pipeline
From: gbivins at objectreservoir.com
To: nasos_i at hotmail.com; vtkusers at vtk.org
Re: [vtkusers] Reseting vtk pipeline
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
_________________________________________________________________
Windows Live™ SkyDrive™: Get 25 GB of free online storage.
http://windowslive.com/online/skydrive?ocid=TXT_TAGLM_WL_SD_25GB_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090619/dcbe29f9/attachment.htm>
More information about the vtkusers
mailing list