[Paraview] Saving screen shots of multiple views from an animation with python

Oliver Borm oli.borm at web.de
Tue Jan 12 15:43:59 EST 2010


Thank's for the replies.

Utkarsh Ayachit schrieb:
>> * Run the animation multiple times, one for each view. I am guessing that there
>> is a way of setting which view is saved.
>>     
>
> To pick just of the two views, only add one of the two views to the
> scene i.e.scene.ViewModules = [view1] etc.
>   
Yes that would be possible, but this would invoke the whole
visualization pipeline for each timestep in each animation, with the
call of writer.Save(). If I do it this way, right?

## save files of animation
scene.ViewModules = [view1]
writer.SetFileName("fubar1.png")
writer.Save()

## save files of animation
scene.ViewModules = [view2]
writer.SetFileName("fubar2.png")
writer.Save()

But if one has a large data set with a couple of filters where each
update of a timestep would need a couple of minutes, then the overhead
in computation time to render several different views of the same
visualization pipeline is very small, compared to reinvoke the whole
visualization pipeline for all timesteps just for another view of the
same final visualization state. Therefore I'm looking for an efficient
method in order to do that.
>> * Run the animation manually (still using the animation scene) and save the
>> views yourself.
>>     
Do you mean to run the animation with scene.Play() and then save the
screenshots of the popped up windows by hand? This would be possible,
but it is not exactly, what I expect from an automated python script
(then option one is in that case, my preferred one).



More information about the ParaView mailing list