Paraview:在python中访问Timeseries Min/Max

2024-05-13 22:36:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试导出一组timeseries的摄影机透视视图,并希望能够将RescaleTransformFunction设置为timeseries的全局最小/最大值。我无法找到一种方法来访问这些最小/最大值,而不迭代每个时间步并比较它们

有没有更好的方法?当我记录一个轨迹时,paraview似乎神奇地拥有了这些值

# Set up the Color map
lut_rdr = lookuptable.vtkPVLUTReader()
arr = model.PointData.GetArray('Temperature_(K)')  # only gives the range for the current timestep
rng = arr.GetRange()
lut = lut_rdr.GetLUT(arr, 'Grayscale')
lut.RescaleTransferFunction(rng[0], rng[1])

dp.ColorArrayName = 'Temperature_(K)'
dp.LookupTable = lut

Render()

Tags: the方法视图记录时间全局dptimeseries