[Paraview] Writing Images at certian time Steps using pvpython

Hedieh Ebrahimi hedieh.ebrahimi at amphos21.com
Wed Aug 21 06:04:05 EDT 2013


Hello,

My Data is of type h5 that I open using PFlotran HDF5 reader in ParaView
which are result of PFlotran simulation.

What I am trying to do is to write an image at a certain time step and then
finally write a batch job that writes an image for each time step of the
simulation result.

If I try to interactively go to a certain time step and then save an image,
everything works fine.

The problem is I have 40 time steps and I want to do the same procedure
often. So I saved my state file as a python script and then set these few
lines at the end of script just before Render().

RenderView1.ViewTime = 0.0
RenderView1.CacheKey = 0.0
RenderView1.UseCache = 0
AnimationScene1 = GetAnimationScene()
AnimationScene1.AnimationTime = 0.0
WriteImage('myImage.jpg')

Render()


My timeSeries start at 0 and the python script works just fine for 0.

If I change the following lines to 10000 (my final time step) or any other
time step, then pvpython crashes, that is the following change to the
script makes the pvpython crash:

RenderView1.ViewTime = 10000.0
RenderView1.CacheKey = 10000.0
RenderView1.UseCache = 0
AnimationScene1 = GetAnimationScene()
AnimationScene1.AnimationTime = 10000.0
WriteImage('myImage.jpg')

Render()

I used the trace to see what values I need to change to save an screen shot
for any time step and I ended up with ViewTime and AnimationTime.

I have attached my script with this email. I would be grateful if you could
please tell me if I need to change more in my script or add any additional
lines to be able to get an screenshot of any timestep rather than 0.

Thanks in Advance.

Hedie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130821/d2722de2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top.py
Type: application/octet-stream
Size: 35564 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130821/d2722de2/attachment-0001.obj>


More information about the ParaView mailing list