Extract data from VTM multi block file at given position and convert it to a numpy array.


I am working on a VTM multiblock dataset. I’m trying to extract data (the field values) at given positions (Paraview requires interpolation) and convert them to a Numpy array (matrix). I’m trying to develop a Python script; however, I don’t know how to do it.

I am wondering if someone can guide me through this problem.


To manipulate the actual data, you need a VTK python script and not a ParaView one. ParaView scripting is at higher level, about creating a pipeline. In ParaView, you can use the Programmable Filter to put some VTK scripting in it.

Some doc here about VTK python and numpy : 6. Using NumPy for processing data — ParaView Documentation 5.11.0 documentation

Here about what is ParaView scripting: 1. Introduction to ParaView — ParaView Documentation 5.11.0 documentation