No subject
Sun Jan 5 18:15:45 EST 2014
<VTKFile type="Collection">
<Collection>
<DataSet timestep=".00000" file="././vtk/particles_000000.pvtu"/>
<DataSet timestep=".01562" file="././vtk/particles_000001.pvtu"/>
<DataSet timestep=".03125" file="././vtk/particles_000002.pvtu"/>
<DataSet timestep=".04688" file="././vtk/particles_000003.pvtu"/>
<DataSet timestep=".06250" file="././vtk/particles_000004.pvtu"/>
...
For visualization purposes I can load this file into ParaView. However, I would like to do some postprocessing using python now. In particular I want to perform some averaging and Fourier transforms over time etc.
To this end I would like to read the .pvd file into python. Can you direct me to some information how to do this?
Until now, I could already successfully load the individual .pvtu files using
import vtk as vtk
reader=vtk.vtkXMLGenericDataObjectReader()
reader.SetFileName("vtk/particles_000000.pvtu")
reader.Update()
data=reader.GetOutput()
...
If I change the filename to reader.SetFileName("particles.timeseries.pvd") though, upon calling reader.Update() it says
ERROR: In /home/abuild/rpmbuild/BUILD/VTK6.0.0/IO/XML/vtkXMLGenericDataObjectReader.cxx, line 152
vtkXMLGenericDataObjectReader (0x2591fb0): could not load particles.timeseries.pvd
ERROR: In /home/abuild/rpmbuild/BUILD/VTK6.0.0/Common/ExecutionModel/vtkExecutive.cxx, line 754
vtkCompositeDataPipeline (0x259a640): Algorithm vtkXMLGenericDataObjectReader(0x2591fb0) returned failure for request: vtkInformation (0x259aba0)
Debug: Off
Modified Time: 76
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA_OBJECT
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0
Thank you for your help.
Best regards,
Mathias
--------------020803090205030608070003
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font size="-1"><tt>Hello,<br>
<br>
From my application I am generating a timeseries of vtk files
that are then listed in a .pvd file of in the form<br>
<br>
<VTKFile type="Collection"><br>
<Collection><br>
<DataSet timestep=".00000"
file="././vtk/particles_000000.pvtu"/><br>
<DataSet timestep=".01562"
file="././vtk/particles_000001.pvtu"/><br>
<DataSet timestep=".03125"
file="././vtk/particles_000002.pvtu"/><br>
<DataSet timestep=".04688"
file="././vtk/particles_000003.pvtu"/><br>
<DataSet timestep=".06250"
file="././vtk/particles_000004.pvtu"/><br>
...<br>
<br>
For visualization purposes I can load this file into ParaView.
However, I would like to do some postprocessing using python
now. In particular I want to perform some averaging and Fourier
transforms over time etc.<br>
<br>
To this end I would like to read the .pvd file into python. Can
you direct me to some information how to do this?<br>
<br>
Until now, I could already successfully load the individual
.pvtu files using<br>
<br>
import vtk as vtk<br>
reader=vtk.vtkXMLGenericDataObjectReader()<br>
reader.SetFileName("vtk/particles_000000.pvtu")<br>
reader.Update()<br>
data=reader.GetOutput()<br>
...<br>
<br>
If I change the filename to
reader.SetFileName("particles.timeseries.pvd") though, upon
calling </tt></font><font size="-1"><tt><font size="-1"><tt>reader.Update()
it says<br>
<br>
</tt></font>ERROR: In
/home/abuild/rpmbuild/BUILD/VTK6.0.0/IO/XML/vtkXMLGenericDataObjectReader.cxx,
line 152<br>
vtkXMLGenericDataObjectReader (0x2591fb0): could not load
particles.timeseries.pvd<br>
<br>
ERROR: In
/home/abuild/rpmbuild/BUILD/VTK6.0.0/Common/ExecutionModel/vtkExecutive.cxx,
line 754<br>
vtkCompositeDataPipeline (0x259a640): Algorithm
vtkXMLGenericDataObjectReader(0x2591fb0) returned failure for
request: vtkInformation (0x259aba0)<br>
Debug: Off<br>
Modified Time: 76<br>
Reference Count: 1<br>
Registered Events: (none)<br>
Request: REQUEST_DATA_OBJECT<br>
ALGORITHM_AFTER_FORWARD: 1<br>
FORWARD_DIRECTION: 0<br>
<br>
<br>
Thank you for your help.<br>
<br>
Best regards,<br>
<br>
Mathias<br>
<br>
</tt></font>
</body>
</html>
--------------020803090205030608070003--
More information about the vtkusers
mailing list