Sebastian,<br><br>thank you very much.<br>I used traces and it worked for me!<br><br><br>ula<br><br><div class="gmail_quote">On Thu, Mar 10, 2011 at 4:56 AM, 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="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Ula,<br>
<br>
you can use ParaView and with the python scripting interface, you<br>
should be able to automated that process for all your files.<br>
Start paraview, start python trace, do your processing for one file,<br>
do the capture, then show trace.<br>
This will show the python code that was needed for the whole process.<br>
Then, you will just need to change the reader filename, and request a<br>
new image capture for each new file that you may set inside a for loop<br>
in python.<br>
<br>
Seb<br>
<div><div></div><div class="h5"><br>
On Thu, Mar 10, 2011 at 12:25 AM, Ula Popov &lt;<a href="mailto:ula.popov@gmail.com">ula.popov@gmail.com</a>&gt; wrote:<br>
&gt; Hello all,<br>
&gt;<br>
&gt; I have 5000 cosmo files that I need to visualize and save each as a .png<br>
&gt; file.<br>
&gt;<br>
&gt; If I had one file, I&#39;d<br>
&gt; 1. open it in paraview<br>
&gt; 2. choose glyph filter<br>
&gt; 3. choose<br>
&gt;      vector : velocity<br>
&gt;      glyph type: arrow<br>
&gt;      color by: glyphVector<br>
&gt; 4. press &quot;reset&quot; button<br>
&gt; 5. adjust camera -&gt; azimuth (XX)<br>
&gt; 6. File-&gt;Save ScreenShot<br>
&gt; 7. type &quot;output_filename&quot;<br>
&gt;<br>
&gt; I need to automate this process, but I don&#39;t know how.<br>
&gt; I do know how to read cosmo file into unstructured grid,<br>
&gt; how to create a window, but i don&#39;t know how to set<br>
&gt; all these parameters and save an image.<br>
&gt;<br>
&gt;<br>
&gt; int main ()<br>
&gt; {<br>
&gt;     vtkUnstructuredGrid *data;<br>
&gt;     vtkSmartPointer&lt;vtkCosmoReader&gt; reader =<br>
&gt; vtkSmartPointer&lt;vtkCosmoReader&gt;::New();<br>
&gt;<br>
&gt;     reader-&gt;SetFileName(&quot;input_filename.cosmo&quot;);<br>
&gt;     reader-&gt;Update();<br>
&gt;     data = reader-&gt;GetOutput(0);<br>
&gt;<br>
&gt;     vtkSmartPointer&lt;vtkUnstructuredGridGeometryFilter&gt; geometryFilter =<br>
&gt; vtkSmartPointer&lt;vtkUnstructuredGridGeometryFilter&gt;::New();<br>
&gt;     geometryFilter-&gt;SetInputConnection(data-&gt;GetOutputPort());<br>
&gt;     geometryFilter-&gt;Update();<br>
&gt;<br>
&gt;     //Create a mapper and actor<br>
&gt;     vtkSmartPointer&lt;vtkDataSetMapper&gt; mapper =<br>
&gt; vtkSmartPointer&lt;vtkDataSetMapper&gt;::New();<br>
&gt;     mapper-&gt;SetInputConnection(geometryFilter-&gt;GetOutputPort());<br>
&gt;     vtkSmartPointer&lt;vtkActor&gt; actor =  vtkSmartPointer&lt;vtkActor&gt;::New();<br>
&gt;     actor-&gt;SetMapper(mapper);<br>
&gt;<br>
&gt;     // a renderer and render window<br>
&gt;    vtkRenderer *ren = vtkRenderer::New();<br>
&gt;    vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
&gt;    renWin-&gt;AddRenderer(ren);<br>
&gt;<br>
&gt;    // an interactor<br>
&gt;    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
&gt;    iren-&gt;SetRenderWindow(renWin);<br>
&gt;<br>
&gt;    // add the actor to the scene<br>
&gt;    ren-&gt;AddActor(actor);<br>
&gt;    ren-&gt;SetBackground(1,1,1); // Background color white<br>
&gt;<br>
&gt;    renWin-&gt;Render();<br>
&gt;<br>
&gt;   // begin mouse interaction<br>
&gt;    iren-&gt;Start();<br>
&gt;<br>
&gt;   ren1-&gt;Delete();<br>
&gt;   renWin-&gt;Delete();<br>
&gt;   iren-&gt;Delete();<br>
&gt;   return EXIT_SUCCESS;<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; Any ideas, suggestions, code examples are highly appreciated,<br>
&gt; ula<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>