Add a datafile type reader to paraview using pvpython
Asked Answered
B

2

6

I'm aware that you can add readers for different datafile types to paraview, however, that all talks about doing a bunch of VTK stuff in c++ and (maybe worse) re-compiling paraview to make it aware of your datafile format. On the other hand, paraview also supports scripting in python. Maybe it is my lack of familiarity with VTK, but, to me it looks like I can only manipulate VTK objects from pvpython. Is there any way to dynamically add a reader to paraview using pvpython?

Bengali answered 8/4, 2013 at 20:52 Comment(0)
T
3

What you want is a "Python Programmable Filter. Refer to ParaView Wiki. This wiki page shows how to write a CSV reader in Python.

Tad answered 27/8, 2014 at 12:34 Comment(0)
A
0

As time has passed, ParaView has new options to achieve this.
It's worth looking at the recently added Python Algorithm feature in ParaView.
Examples are given in the source code.

Attenuate answered 11/11, 2020 at 9:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.