[Paraview] Python: opening time-series of files, adding glyphs

Deij, Menno M.Deij at marin.nl
Thu Feb 16 07:16:31 EST 2012


Hi Vaclav,

What helps me greatly in writing Python scripts is to use Tools->Start trace in ParaView. Then perform the actions you want, followed by Tools->Stop trace. This will show you which commands were executed in Python code.

Also, if your tasks are always the same, but with different data sets, you can save and load state. Upon loading a statefile in ParaView, it will ask you to specify the readers. This lets you create a state and re-use it with other datasets.

Both approaches have their limits and don't always work 100% in my (also limited) experience.

Good luck!


Menno



dr. ir. Menno A. Deij
Software Engineer
Maritime Simulation Group
E mailto:M.Deij at marin.nl
T +31 317 49 35 06

MARIN
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
T +31 317 49 39 11, F , I www.marin.nl

-----Original Message-----
From: paraview-bounces at paraview.org [mailto:paraview-bounces at paraview.org] On Behalf Of Václav Šmilauer
Sent: Thursday, February 16, 2012 1:00 PM
To: paraview at paraview.org
Subject: [Paraview] Python: opening time-series of files, adding glyphs

Hello,

I would like to automatize my routine tasks with paraview, but perhaps
my lack of better understanding of VTK makes
http://paraview.org/Wiki/ParaView/Python_Scripting not as instructive as
I would like to. Could I get short commands which will do the following?

1. Open a time-series of files with embedded number (File - Open -
fileName...vtu). The OpenDataFile function does not hadle the ...
ellipsis. I used the glob.glob module instead, but it does not sort
numerically; moreover, repeated calls to OpenDataFile do not create new
time points.

2. Once the pipeline is ready I would like to add Arrow/Spheres/...
glyphs and make the original white points invisible.

Thanks for help,

Vaclav
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list