|
[Sponsors] |
[General] How can I use python script to generate animation from 2000 frames of vtk datasets |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 7, 2016, 18:40 |
How can I use python script to generate animation from 2000 frames of vtk datasets
|
#1 |
New Member
Lieyu Shi
Join Date: Mar 2016
Posts: 3
Rep Power: 10 |
Hi,
I'm a beginner in Paraview. I just generated 2000 frames of vtk data for fluid simulation. I have separately uploaded files in Paraview and was able to see the image. I have two concerns 1. How can I use shell script to automatically generate animation from these datasets? Can Paraview achieve that with some piece of python code? 2. If the answer for above is no, can I write a script to automatically upload and save screenshots of each dataset respectively? I could only manually save screenshots from GUI. Can somebody kindly help me with that? I was still learning Python script and searched materials online for that. Attached is one of my manually generated figure for fluid. |
|
March 10, 2016, 10:02 |
|
#2 | |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi,
I think the easiest way is to rename the files such that they are foo0001.vtk, foo0002.vtk, foo0003.vtk, ..., foo2000.vtk and move all files to same directory. Then from ParaView GUI press Open and browse to the directory and you should see a filename called foo..vtk which loads all the timesteps. Now, you should be able to create an animation by pressing "Save Animation". Regards, Mikko Quote:
|
||
March 10, 2016, 14:28 |
|
#3 |
New Member
Lieyu Shi
Join Date: Mar 2016
Posts: 3
Rep Power: 10 |
Hi,
Thanks for your kind reply. It really works!!! I never image it can that easy to create an animation... Actually I spent a long time writing script and trying to make it work... Thanks greatly Last edited by LieyuShi; March 10, 2016 at 14:35. Reason: want to delete |
|
March 10, 2016, 14:37 |
|
#4 | |
New Member
Lieyu Shi
Join Date: Mar 2016
Posts: 3
Rep Power: 10 |
Hi,
Thanks greatly. I never imagine it to be this easy. Actually I spent days in writing the script file to manage load, transformation and save.. Thanks man Best Lieyu Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[General] Generating isosurface from vtk file with python script | Leios | ParaView | 1 | March 26, 2018 13:33 |
[General] Paraview.simple python module and loading legacy vtk file timeseries | awa5114 | ParaView | 2 | July 17, 2017 09:40 |
[OpenFOAM] Python script to export animation images | mahyarv14 | ParaView | 10 | August 16, 2014 12:11 |
[General] VTK API: Working with values inside the python shell | Thoma | ParaView | 4 | January 10, 2013 15:35 |
CentFOAM Python Script Installation: Error | socon009 | OpenFOAM Installation | 2 | May 26, 2012 10:36 |