<style> p {margin-top:0px;margin-bottom:0px;} </style> <table border=0 width=100%% cellpadding=0 cellspacing=0 align=center> <tr> <td valign=top style='padding:8pt;'><font size=2><P><BR>
<FONT size=2>
<P>I presume that you are working on windows platform. Normally if you have defined and set up </P><FONT size=2>
<P>m_pRenWin = vtkWin32OpenGLRenderWindow::New(); </P>
<P> </P></FONT></FONT><FONT size=2><FONT size=2><FONT size=2>
<P>Then In your runtime program just call the following - </P><FONT size=2>
<P>m_pRenWin->Render();</P></FONT></FONT></FONT></FONT>
<P> </P>
<P>This works for me when I record the animation.<BR>
Cheers</P>
<P>Praveen<BR>
<BR>
<BR>
</P>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<P></P>
<P></P>
<P>---------[ Received Mail Content ]----------<BR>
</P>
<P></P>
<P><B>Subject : </B>[vtkusers] How to re-render on input data updates<BR>
</P>
<P></P>
<P><B>Date : </B>Tue, 12 Sep 2006 12:26:58 +0200<BR>
</P>
<P></P>
<P><B>From : </B>"Andy Treisch" <Andy.Treisch@gmx.de><BR>
</P>
<P></P>
<P><B>To : </B>vtkusers@public.kitware.com<BR>
</P>
<P></P>
<P><B>Cc : </B><BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P>Hi!</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
I created a rendering pipeline, which is based on a vtkImageData. It is</P>
<P></P>
<P><BR>
constructed by x and y coordinates and the "values" of the points added</P>
<P></P>
<P><BR>
via ->GetPointData()->SetScalars() method. During runtime, the scalar</P>
<P></P>
<P><BR>
data will change and i need to update my rendering window. how can I</P>
<P></P>
<P><BR>
do that? I tried to add an Observer to the vtkRenderWindowInteractor</P>
<P></P>
<P><BR>
using eventid = AddObserver(vtkCommand::UserEvent, cbc, 1.0) with</P>
<P></P>
<P><BR>
cbc beeing an instance of vtkCallbackCommand with my update function</P>
<P></P>
<P><BR>
set via ->SetCallback(). As far as I understand the doxygen</P>
<P></P>
<P><BR>
documentation, eventid should hold a value, which is needed to invoke</P>
<P></P>
<P><BR>
the event. When I try to iren->InvokeEvent(eventid) nothing happens.</P>
<P></P>
<P><BR>
I also tried InvokeEvent(vtkCommand::UserEvent) but nothing happens,</P>
<P></P>
<P><BR>
too. So I tried to change the event to a LeftButtonPressEvent resulting</P>
<P></P>
<P><BR>
in AddObserver(vtkCommand::LeftButtonPressEvent, ...) and it works.</P>
<P></P>
<P><BR>
But it only updates the plot if I click inside the renderwindow.</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
Is there any other way to update the renderwindow on changed basedata</P>
<P></P>
<P><BR>
or did I understand something wrong with the use of the Observer-system?</P>
<P></P>
<P><BR>
I work on that since about a week and it drives me crazy...</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
Thanks in advance,</P>
<P></P>
<P><BR>
Andy Treisch </P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
_______________________________________________</P>
<P></P>
<P><BR>
This is the private VTK discussion list. </P>
<P></P>
<P><BR>
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ</P>
<P></P>
<P><BR>
Follow this link to subscribe/unsubscribe:</P>
<P></P>
<P><BR>
http://www.vtk.org/mailman/listinfo/vtkusers</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P></BLOCKQUOTE>
<P></P></font></td></tr>
</table>