I'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 'render' should behave erratically? The rendering time alone, measured before and after call of renwin->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"><<a href="mailto:navneeth.s@gmail.com">navneeth.s@gmail.com</a>></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 & the vtk render thread ?<br>
Can you force call ->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>
> ------------------------------<br>
><br>
> Message: 16<br>
> Date: Tue, 6 Dec 2011 19:35:52 +0530<br>
> From: Siddharth Vikal <<a href="mailto:siddharthvikal@gmail.com">siddharthvikal@gmail.com</a>><br>
> Subject: [vtkusers] Render function's in-deterministic performance<br>
> To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
> Message-ID:<br>
> <<a href="mailto:CADM22yxyGDvhiWBogiqTV7M5B_ZExryetZCQzSxPn6jwGRhjPw@mail.gmail.com">CADM22yxyGDvhiWBogiqTV7M5B_ZExryetZCQzSxPn6jwGRhjPw@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="iso-8859-1"<br>
<div class="im">><br>
> Hi,<br>
><br>
> Let me first describe the set-up. I'm using a quad core, linux box with vtk<br>
> 5.4. I'm using Qt for GUI, thus QVTKWidget. I'm trying to visualize image<br>
> frames (1280 x1280 pixels) being captured from a camera device. The<br>
> anticipated frame rate is 30 fps. I've 'capture frame' functionality<br>
> happening in a separate thread. A minimal vtk pipeline is set up using<br>
> vtkImageData, vtkImageMapper, vtkActor2D. Each time a new frame arrives,<br>
> update is callled on the vtk pipeline and the main thread running Qt, is<br>
> notified to perform render operation using paint event of QVTKWidget. For<br>
> synchronization, mutex is used. This setup seems to work just fine except<br>
> from the performance predictability standpoint.I've put timers in place to<br>
> measure time taken for each step.<br>
><br>
> The problem is, the paint call (or eventually 'render' call) is not<br>
> behaving deterministically. For some frames, render completes within 6-10<br>
> milliseconds, but for others, inexplicably, it starts taking 50-70<br>
> milliseconds!! Now with new frame arriving at every 33 milliseconds (30<br>
> fps), I start loosing frames. I've tried the setup using vtkImageActor<br>
> (therefore without vtkImageMapper, vtkActor2D) as well, but with similar<br>
> behavior.<br>
><br>
> I don't understand why is render taking 60-70 milliseconds? The data is<br>
> ready to be rendered. The in-deterministic aspect is even more worrying.<br>
><br>
> Can someone please help? It'll be greatly appreciated.<br>
><br>
> regards<br>
> Siddharth<br>
</div>> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <<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>><br>
><br>
</blockquote></div><br>