paraview.simple.reader to VTK object?

I am reading a binary TecPlot file in Python. I tried to use vtk.vtkTecplotReader, but this crashes. Instead, I have shifted my approach to use paraview.simple.VisItTecplotBinaryReader.

Ultimately I would like to use VTK filters on this data (for example, vtk.vtkMassProperties())

Is there any way to get from an instance of VisItTecplotBinaryReader directly to a VTK data type such as vtkUnstructuredGrid? Right now I am using paraview.simple.SaveData to write the data to disk and then reloading it via vtkXMLUnstructuredGridReader. This is far from ideal.

from paraview.simple import *
import vtk

r = VisItTecplotBinaryReader(FileName=['data.plt'])
r.MeshStatus = ['Surface']
r.PointArrayStatus = []
SaveData('data.vtm', proxy=r)

r = vtk.vtkXMLUnstructuredGridReader()
r.SetFileName('data/data.i_0_0.vtu')
r.Update()
geom = r.GetOutput()

Welcome to the ParaView community, Phillip!

You can do this with the Fetch function:

from paraview import servermanager as sm
ugrid = sm.Fetch(r)

ugrid will be a vtkUnstructuredGrid.

Fetch() works even in client/server mode when the data resides on the server.

Thanks! In this case, ugrid is actually a vtkMultiBlockDataSet - although, I would like it as an unstructured grid.

vtk.GetBlock(0) returns me another vtkMultiBlockDataSet - how can I get an actual vtkUnstructuredGrid out of this?