I want to get the current timestep (as selected in ParaView) within a filter. Looking into other VTK filters and trying to understand what UPDATE_TIME_STEP is for, I think I should do this by getting UPDATE_TIME_STEP from the output information.
vtkInformation* outInfo = outputVector->GetInformationObject(0); double time outInfo->Get(vtkStreamingDemandDrivenPipeline::UPDATE_TIME_STEP());
So far things are fine, but now I’m trying to use this in my real world filter which has multiple output ports and I have observed several difficulties. Only the first (visible) output port shows the currently selected time from ParaView in UPDATE_TIME_STEP, all other visible ports have the previously selected time step. Further, invisible output ports never have any update to UPDATE_TIME_STEP.
To make things more complicated even what is the “first” output port changes to whatever output port is selected first in ParaView.
How can I know which is the output port with the currently selected time or how can I get the current time independently from the output ports?
I have observed the input information within
RequestUpdateExtent has UPDATE_TIME_STEP set and the value seems to be always the correct one, but is it save and intended to request this from the input?
Maybe as context, I’m also using a streaming demand driven pipeline and I want to stream data from timestep 0 up until the currently selected timestep. Therefore I’m overwriting the UPDATE_TIME_STEP from the input port in
RequestUpdateExtent to select a time step. This is what makes me feel I should not read UPDATE_TIME_STEP from the input as it is meant to propagate time step information to the source and later in
RequestData it only contains my overwritten value anyway.