Hi all,<div><br></div><div>I&#39;m trying to visualise a time varying field on a static geometry using vtk in python. My code parses some files exported from a commercial system, and I have successfully implemented code to create a vtkUnstructuredGrid and visualise this field for single time points.</div>
<div><br></div><div>All the information I can find online about temporal data sets either involves an example class where data is provided from an algorithm, or where the time varying data is read using a .pvd file and the reader handles the creation of the temporal data set in the background (from what I understand). Obviously, I could write out my data as a stack of .vtu files and read them back in, but this is a slow and inelegant solution.</div>
<div><br></div><div>My current code is:</div><div><br></div><div><div>testEsi = ensite()</div><div>testEsi.readVirtuals({&#39;test&#39;: &#39;/path/to/file.txt&#39;})</div><div>mesh = testEsi.returnVtkMesh()  #Returns a vtkUnstructuredGrid</div>
<div><br></div><div>timeDataSet = vtkTemporalDataSet()</div><div>timeDataSet.SetNumberOfTimeSteps(3)</div><div>timeDataSet.SetTimeStep(0, mesh)</div><div>timeDataSet.SetTimeStep(1, mesh)</div><div>timeDataSet.SetTimeStep(2, mesh)</div>
<div><br></div><div>tempDataSetCache = vtkTemporalDataSetCache()</div><div>tempDataSetCache.SetInput(timeDataSet)</div><div><br></div><div>timeDataSet.UpdateInformation()</div><div><br></div><div>executive = tempDataSetCache.GetExecutive()</div>
<div>tempDataSetCache.UpdateInformation()</div><div><br></div><div>executive.SetUpdateTimeStep(0,0.0)</div><div>tempDataSetCache.Update()</div></div><div><br></div><div>When I run it, I get the error on executing the last line:</div>
<div><div>ERROR: In /build/buildd/vtk-5.2.1/Filtering/vtkStreamingDemandDrivenPipeline.cxx, line 711</div><div>vtkCompositeDataPipeline (0x1e7a130): No time steps or time range been set in the information for output port 0 on algorithm vtkTemporalDataSetCache(0x3e875a0).</div>
</div><div><br></div><div>I get a similar error if I run timeDataSet.Update() . I assume that this is due to my lack of knowledge of how these classes are supposed to interact. If anyone could point me in the right direction of how to fix it or correctly implement a time varying data set in vtk python, I would greatly appreciate it.</div>
<div><br></div><div>Best wishes,</div><div><br></div><div>Andrew</div>