<HTML>
<HEAD>
<TITLE>Re: [vtkusers] Reseting vtk pipeline</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi </SPAN></FONT><FONT SIZE="2"><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>Nasos,<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>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”.<BR>
<BR>
Gerrick<BR>
<BR>
<BR>
On 6/18/09 8:20 AM, "Nasos Iliopoulos" <<a href="nasos_i@hotmail.com">nasos_i@hotmail.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT SIZE="2"><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>Hello all,<BR>
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. <BR>
<BR>
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.<BR>
<BR>
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.<BR>
<BR>
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?<BR>
<BR>
Best<BR>
Nasos<BR>
<BR>
<BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="100%">Lauren found her dream laptop. Find the PC that’s right for you. <<a href="http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290">http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290</a>> <BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><SPAN STYLE='font-size:10pt'><FONT FACE="Consolas, Courier New, Courier">_______________________________________________<BR>
Powered by www.kitware.com<BR>
<BR>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><BR>
<BR>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><BR>
<BR>
Follow this link to subscribe/unsubscribe:<BR>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><BR>
</FONT></SPAN></FONT></BLOCKQUOTE>
</BODY>
</HTML>