I&#39;ve tried the suggestions from Sebastien and Navneeth i.e. upgrading to VTK 5.8, and calling modified, however the problem remains unsolved.<br><br>Any insights into why &#39;render&#39; should behave erratically? The rendering time alone, measured before and after call of renwin-&gt;render is varying from 6-7 msecs at most times to 50-60 msecs at other times!<br>
<br>David, any thoughts?<br><br>regards,<br>Siddharth<br><br><div class="gmail_quote">On Tue, Dec 6, 2011 at 10:17 PM, Navneeth Subramanian <span dir="ltr">&lt;<a href="mailto:navneeth.s@gmail.com">navneeth.s@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Siddharth,<br>
Perhaps you are seeing a race-condition between the camera capture<br>
thread &amp; the vtk render thread ?<br>
Can you force call -&gt;Modified() on the vtkImageData object at the end<br>
of the camera refresh to see if that helps.<br>
<br>
best,<br>
navneeth<br>
<br>
&gt; ------------------------------<br>
&gt;<br>
&gt; Message: 16<br>
&gt; Date: Tue, 6 Dec 2011 19:35:52 +0530<br>
&gt; From: Siddharth Vikal &lt;<a href="mailto:siddharthvikal@gmail.com">siddharthvikal@gmail.com</a>&gt;<br>
&gt; Subject: [vtkusers] Render function&#39;s in-deterministic performance<br>
&gt; To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
&gt; Message-ID:<br>
&gt;        &lt;<a href="mailto:CADM22yxyGDvhiWBogiqTV7M5B_ZExryetZCQzSxPn6jwGRhjPw@mail.gmail.com">CADM22yxyGDvhiWBogiqTV7M5B_ZExryetZCQzSxPn6jwGRhjPw@mail.gmail.com</a>&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<div class="im">&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; Let me first describe the set-up. I&#39;m using a quad core, linux box with vtk<br>
&gt; 5.4. I&#39;m using Qt for GUI, thus QVTKWidget. I&#39;m trying to visualize image<br>
&gt; frames (1280 x1280 pixels) being captured from a camera device. The<br>
&gt; anticipated frame rate is 30 fps. I&#39;ve &#39;capture frame&#39; functionality<br>
&gt; happening in a separate thread. A minimal vtk pipeline is set up using<br>
&gt; vtkImageData, vtkImageMapper, vtkActor2D. Each time a new frame arrives,<br>
&gt; update is callled on the vtk pipeline and the main thread running Qt, is<br>
&gt; notified to perform render operation using paint event of QVTKWidget. For<br>
&gt; synchronization, mutex is used. This setup seems to work just fine except<br>
&gt; from the performance predictability standpoint.I&#39;ve put timers in place to<br>
&gt; measure time taken for each step.<br>
&gt;<br>
&gt; The problem is, the paint call (or eventually &#39;render&#39; call) is not<br>
&gt; behaving deterministically. For some frames, render completes within 6-10<br>
&gt; milliseconds, but for others, inexplicably, it starts taking 50-70<br>
&gt; milliseconds!! Now with new frame arriving at every 33 milliseconds (30<br>
&gt; fps), I start loosing frames. I&#39;ve tried the setup using vtkImageActor<br>
&gt; (therefore without vtkImageMapper, vtkActor2D) as well, but with similar<br>
&gt; behavior.<br>
&gt;<br>
&gt; I don&#39;t understand why is render taking 60-70 milliseconds? The data is<br>
&gt; ready to be rendered. The in-deterministic aspect is even more worrying.<br>
&gt;<br>
&gt; Can someone please help? It&#39;ll be greatly appreciated.<br>
&gt;<br>
&gt; regards<br>
&gt; Siddharth<br>
</div>&gt; -------------- next part --------------<br>
&gt; An HTML attachment was scrubbed...<br>
&gt; URL: &lt;<a href="http://www.vtk.org/pipermail/vtkusers/attachments/20111206/339c44b8/attachment-0001.htm" target="_blank">http://www.vtk.org/pipermail/vtkusers/attachments/20111206/339c44b8/attachment-0001.htm</a>&gt;<br>

&gt;<br>
</blockquote></div><br>