Is it possible to add time steps in a Programmable Filter? For example, I have read a single static csv file with the normal delimited text reader and I want to iterate over each row of that file at different time steps.
My RequestInformation script: executive = self.GetExecutive() outInfo = executive.GetOutputInformation(0) #- Get number of rows in table and use that for num time steps pdi = self.GetInput() nrows = int(pdi.GetColumn(0).GetNumberOfTuples()) # Calculate list of time steps xtime = range(0,nrows) outInfo.Remove(executive.TIME_STEPS()) for i in range(len(xtime)): outInfo.Append(executive.TIME_STEPS(), xtime[i]) # Remove and set time range info outInfo.Remove(executive.TIME_RANGE()) outInfo.Append(executive.TIME_RANGE(), xtime[0]) outInfo.Append(executive.TIME_RANGE(), xtime[-1]) Then my Request Data script: pdi = self.GetInput() pdo = self.GetOutput() # grab coordinates for each part of boring machine at time idx as row executive = self.GetExecutive() outInfo = executive.GetOutputInformation(0) idx = outInfo.Get(executive.UPDATE_TIME_STEP()) print("Current time step: “, idx) # NOW I SHOULD BE ABLE TO USE IDX TO ITERATE OVER EACH ROW OF THE INPUT VTKTABLE The time steps printed in Request Data do not reflect the time steps set in Request Information. However if I add this little snippet to the Request Data call it prints out the expected time steps: print(self.GetExecutive().GetOutputInformation(0).Get(vtk.vtkStreamingDemandDrivenPipeline.TIME_STEPS())) Is there something I am missing, or can timesteps only be set this way in a Programmable Source?
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Search the list archives at: http://markmail.org/search/?q=ParaView Follow this link to subscribe/unsubscribe: https://public.kitware.com/mailman/listinfo/paraview