[Paraview] help with a simple script?
tim.gallagher at gatech.edu
Thu Nov 15 19:22:24 EST 2012
Use the Paraview trace feature (http://paraview.org/Wiki/Python_GUI_Tools#Trace) in the GUI when you do it once and save that.
Then it's easy to edit the resulting script to loop over the files you need.
----- Original Message -----
From: "Celia Bremer" <fuwsle at hotmail.com>
To: paraview at paraview.org
Sent: Thursday, November 15, 2012 7:20:12 PM
Subject: [Paraview] help with a simple script?
I want to write a script that would open a saved state, select one of the objects, and save data from that object as a VTI file series. I can do this with the GUI, but it takes many hours to do this to each file and I have about 60 of them, so a script would be nice since I could loop through the different states. But I can't figure out how to tell PV what I want to render, and I also can't find how to access options like "save time series".
from paraview.simple import *
import paraview.vtk.io as vtk_io
o=FindSource("Outer Mesh") # this is the name of the Gaussian resampling filter
SetActiveSource(o) # it shows up if I do Show(o) so I know PV found it
writer = vtk_io.vtkXMLImageDataWriter()
# TypeError: argument 1: method requires a VTK object
# how do I specify that I want o as input, and that I want to save it as a file series?
# delete everything, load another state, repeat
I would appreciate any pointers.
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:
More information about the ParaView