I'ld change vtkRenderWindow itself. Add an ivar that when changed from the default enables your new behavior. If you submit a patch via gerrit we can get it into future versions of VTK.<div><br clear="all">David E DeMarle<br>
Kitware, Inc.<br>R&D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: 518-881-4909<br>
<br><br><div class="gmail_quote">On Tue, Jul 10, 2012 at 8:58 AM, Zsolt V <span dir="ltr"><<a href="mailto:vtkzsolt@gmail.com" target="_blank">vtkzsolt@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,<br><br>rendering focal depth frames is a great feature of VTK. However, the random offsets in vtkRenderWindow::DoFDRender() add a very annoying vibration to it. Let's say we would like to create a simple video of moving the focal point smoothly from a frontal object to an object in the background. At the beginning the frontal object is sharp, the background is blurred, while at the end it is swapped. It should be easily done in VTK by focal depth rendering and changing only the distance of the focal point. But due to the fact that for each rendered frames new random offsets are calculated for radius and angle ( in vtkRenderWindow::DoFDRender() ), the result is a camera vibrating.<br>
<br>More simply: when focal depth rendering is turned on, each rendering yields a different image, even if camera and scene do not change at all.<br><br>I would change vtkRenderWindow to calculate these random numbers only when the SetFDFrames method is invoked, and store them for each FDFrames separately. In DoFDRender these pre-generated random numbers can be used, hence they won't vary each time the method Render() is called.<br>
<br>My problem is that I don't know how to create a subclass of vtkRenderWindow without loosing all the methods re-implemented in its subclasses (vtkOpenGLRenderWindow, and so on). I want my code to be portable, so it is not sufficient to create a subclass of vtkXOpenGLRenderWindow, for example. But if a class inherits vtkRenderWindow, all specific classes will not be its subclass any longer.<br>
<br>Is there a solution for it without subclassing all RenderWindow classes?<br><br>Thanks,<br>Zsolt<br><br>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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" target="_blank">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" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>