Hi again,<br><br>thanks for your answer Seb. Offscreen rendering was the keywords I was missing for a successfull search. <br>Anyway, I have been reading other posts about this topic and realized that rendering with OSMesa will be slower as is not hardware accelerated, is that true?. As I intend to use the Offscreen rendering for batch processing, I really need the rendering to be fast... I am using Linux with Nvidia Card... Any other ideas?<br>
<br>Thanks<br><br><div class="gmail_quote">On Wed, Jul 7, 2010 at 1:58 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi  Aitor,<br>
<br>
The only way to prevent the window from poping up, is to use the<br>
Offscreen option and compile vtk with OSMesa.<br>
Otherwise, even in Offscreen mode, a black window will popup and disappear.<br>
<br>
Seb<br>
<div><div></div><div class="h5"><br>
On Wed, Jul 7, 2010 at 7:36 AM, Aitor Aldomā &lt;<a href="mailto:aldoma.aitor@gmail.com">aldoma.aitor@gmail.com</a>&gt; wrote:<br>
&gt; Hi everybody,<br>
&gt;<br>
&gt; I want to generate 2D views of a 3D model and save them as jpeg image. At<br>
&gt; the moment, I am using vtkWindowToImageFilter to obtain the generated view<br>
&gt; from a RenderWindow. The problem is that I dont want to display the window<br>
&gt; on the screen, just wan the RenderWindow to render the view and store the<br>
&gt; result with vtkWindow without showing the window.<br>
&gt;<br>
&gt; This is part of the code i am using now, the problem is that the window will<br>
&gt; flash for a short time and then disapper. Is there a way to render the view<br>
&gt; without being displayed on the screen???<br>
&gt;<br>
&gt; renWin = vtk.vtkRenderWindow()<br>
&gt; renWin.AddRenderer(ren)<br>
&gt; ren.SetBackground(1, 1, 1)<br>
&gt; renWin.SetSize(128,128)<br>
&gt;<br>
&gt; ren.Render()<br>
&gt;<br>
&gt; winToImageFilter = vtk.vtkWindowToImageFilter()<br>
&gt; winToImageFilter.SetInput(renWin);<br>
&gt;<br>
&gt; renWin.Finalize()<br>
&gt; winToImageFilter.Update()<br>
&gt;<br>
&gt; jw = vtk.vtkJPEGWriter();<br>
&gt; jw.SetInput(winToImageFilter.GetOutput());<br>
&gt;<br>
&gt; jw.SetFileName(fileName + &quot;.jpg&quot;);<br>
&gt; jw.Write();<br>
&gt;<br>
&gt; Thanks in advance<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br>