我想通过使用 python-vtk 的阈值来过滤压力
import vtk
filename = "a.foam"
reader = vtk.vtkOpenFOAMReader()
reader.SetFileName(filename)
reader.CreateCellToPointOn()
reader.DecomposePolyhedraOn()
reader.EnableAllCellArrays()
reader.Update()
tArray = vtk_to_numpy(reader.GetTimeValues())
reader.UpdateTimeStep(tArray[-1])
reader.Update()
filter_threshold = vtk.vtkThreshold()
filter_threshold.SetInputConnection(reader.GetOutputPort())
我应该如何在过滤器类上选择“压力”?