<DIV>Hello,</DIV>  <DIV>&nbsp;</DIV>  <DIV>I tried vtkRenderWindow::OffScreenRenderingOn today but it does not work.</DIV>  <DIV>&nbsp;</DIV>  <DIV>It would be really helpful if you could provide any examples.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I turned it on and used vtkWindowToImageFilter to save a snapshot of the OffScreenRenderWindow to an image file( JPEG )&nbsp;on disk but the image comes out to be a&nbsp;snaphot of the desktop&nbsp;when the code is executed.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I am using the VTK + QT library written by Carsten Kibler. I suspect if that is giving the problem.&nbsp;Because My Application is developed with QT and VTK. So there is already a QT + VTK render window in which the model is being displayed. I am creating the offscreen render window after that, so i suspect there are some conflicts.</DIV>  <DIV>Because if i turn the offscreenrendering to off ( which is the default ), the render window is not visible, which is not normally expected.</DIV> 
 <DIV>&nbsp;</DIV>  <DIV>I am using offscreen rendering to find the volume enclosed between two surfaces.</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;--- First i render the surface behind ---&gt; extract the z-buffer of the offscreen window.</DIV>  <DIV>&nbsp;</DIV>  <DIV>---- Second i remove the surface behind and new render the front surface alone ---&gt; extract the z-buffer again</DIV>  <DIV>&nbsp;</DIV>  <DIV>----- Subtracting both the Z-buffers would give me the volume.</DIV>  <DIV>&nbsp;</DIV>  <DIV>I earlier used vtkMassProperties but it does not give good results. Hence i resorted to the z-buffer technique.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Here is the code i used for the offscreen rendering:</DIV>  <DIV>&nbsp;</DIV>  <DIV>************************************************************************************************</DIV>  <DIV>&nbsp;</DIV><FONT size=2>  <div>vtkOpenGLRenderer *pOffScreenRenderer = vtkOpenGLRenderer::New();</div>  <div>&nbsp;</div>  <div>vtkRenderWindow
 *pOffScreenRenderWindow = vtkOpenGLRenderWindow::New();</div>  <div>pOffScreenRenderWindow-&gt;OffScreenRenderingOn();</div>  <div>pOffScreenRenderWindow-&gt;AddRenderer( pOffScreenRenderer );</div>  <div>pOffScreenRenderWindow-&gt;Start();</div>  <div>pOffScreenRenderWindow-&gt;SetSize( wx , wy ); </div>  <div>pOffScreenRenderWindow-&gt;Render();</div>  <div>&nbsp;</div>  <div></FONT><FONT color=#008000 size=2>// render a surface now</div></FONT><FONT size=2>  <div>pOffScreenRenderer-&gt;AddActor( pSurfaceActor );</div>  <div>pOffScreenRenderer-&gt;Render();</div>  <div>pOffScreenRenderWindow-&gt;Render();</div>  <div>&nbsp;</div>  <div>// save a snapshot to disk</div>  <div>vtkWindowToImageFilter *pWindowImageFilter = vtkWindowToImageFilter::New();</div>  <div>pWindowImageFilter-&gt;SetInput( pOffScreenRenderWindow );</div>  <div></div>  <div>vtkJPEGWriter *pImageWriter = vtkJPEGWriter::New();</div>  <div>pImageWriter-&gt;SetInput( pWindowImageFilter-&gt;GetOutput() );</div> 
 <div>pImageWriter-&gt;SetQuality( 100 );</div>  <div>pImageWriter-&gt;SetFileName( "coons_image.jpg" );</div>  <div>pImageWriter-&gt;ProgressiveOff();</div>  <div>pImageWriter-&gt;Write();</div>  <div>pImageWriter-&gt;Delete();</div></FONT>  <DIV>&nbsp;</DIV>  <DIV>*************************************************************************************************</DIV>  <DIV>&nbsp;</DIV>  <DIV>Is there anything wrong with the code ?</DIV>  <DIV><BR>Please Help !!!!!</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks in Advance.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Regards</DIV>  <DIV>&nbsp;</DIV>  <DIV>Deepak Roy</DIV>  <DIV>&nbsp;</DIV>  <DIV><BR><B><I>Sylvain Jaume &lt;sylvain.jaume@kitware.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hi Deepak,<BR><BR>Have you tried
 vtkRenderWindow::OffScreenRenderingOn?<BR>http://www.vtk.org/doc/nightly/html/classvtkWindow.html#803e4f1aba85b796a0f17b0ec84093f9<BR><BR>Cheers,<BR>Sylvain<BR><BR>Deepak Roy wrote:<BR><BR>&gt; hello everybody,<BR>&gt; <BR>&gt; Do you know how to create an offscreen vtk render window in VTK ?<BR>&gt; <BR>&gt; I want to render into the off screen render window and then get its <BR>&gt; z-buffer using GetZbufferData <BR>&gt; <HTTP: classvtkRenderWindow.html#z3197_1 html 4.2 release doc www.vtk.org><BR>&gt; () and work on its z-buffer.<BR>&gt; <BR>&gt; Or is there an offscreen buffer similar to vtkRenderWindow.<BR>&gt; <BR>&gt; Please Help.<BR>&gt; <BR>&gt; Thanks in advance.<BR>&gt; <BR>&gt; Regards,<BR>&gt; <BR>&gt; Deepak<BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; Yahoo! DSL <BR>&gt; <HTTP: evt="37474/*http://promo.yahoo.com/broadband/%20" us.rd.yahoo.com *http: pa.yahoo.com><BR>&gt; Something to write home about. Just $16.99/mo.
 or less<BR>&gt;<BR>&gt;------------------------------------------------------------------------<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;This is the private VTK discussion list. <BR>&gt;Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>&gt;Follow this link to subscribe/unsubscribe:<BR>&gt;http://www.vtk.org/mailman/listinfo/vtkusers<BR>&gt; <BR>&gt;<BR></BLOCKQUOTE>  <DIV><BR></DIV><p>
                <hr size=1> <a href="http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/">Yahoo! Music Unlimited - Access over 1 million songs. Try it free.</a>