[Paraview] Programmed generation of ParaView state file ?

Florian Hoffmann florian.hoffmann at inutech.de
Fri Oct 28 04:21:57 EDT 2016


Dear all,


Has anybody ever tried to automatically (=by a program) generate a PV state file for a known pipeline with known settings ?

My code is writing its simulation results into a HDF5 file. In an additional step I am processing this file in order to generate a/several corresponding XDMF file(s) in order to visualize the data with ParaView.
That means, during creation of these XDMF files I know WHAT and HOW  I would like to show it in PV later. I am thinking about generating a corresponding state file which would load the generated XDMF files into PV and apply certain default but useful settings:
For example XDMF files representing solid structures should be shown using 'Surface With Edges' representation and be colored by solid color, whereas XDMF files representing particle data (=particle centers) should be glyphed with a sphere and colored by their radius.
I am aware of the absolute path issue in PV state files. But at the moment this is not a problem for me. My intention is to create this STATE file next to the generated XDMF files, allowing the user to open ‚The Case‘ in PV with two clicks in comparison with having to first open the XDMF files and then apply certain commonly used settings himself.


1) Does anybody has experience with this ?

2) When experimenting with the state file, I noticed that it contains a lot of items that can be removed without creating (obvious) problems. I assume if not specified in the state file, default settings are used for example for background color, etc. Is there some example of a ‚MINIMAL state file‘ that stores only the really relevant settings ?


I know that this can also be achieved with python scripts. If anybody can report positive experience with state files I would opt for this one first.


Thank you very much.

Best regards,

Florian


More information about the ParaView mailing list