I have a netCDF file with geospatial temporal data. From the vtk NETCDF reader, without having to do an Update() on the reader, I am able to get the scalars from different time points using the following code:
timeIndex = 56231 # This way I have 20 different timeIndex values.
reader.GetOutputInformation(0).Set(vtk.vtkStreamingDemandDrivenPipeline.UPDATE_TIME_STEP(), timeIndex)
scalarData = reader.GetOutput().GetCellData().GetArray(0)
I have around 20 different time points and that means I have 20 scalar arrays under one name. I am displaying the data on a spherical globe and I dont know how to efficiently store all the 20 scalar values in the polydata of the sphere. Instead of reading the arrays from the reader and adding arrays to the polydata, is there a way to simply point the SetActiveScalars to the reader’s scalar data array?