One of our customers asked for visualization of specific temporal geological datasets using ParaView. More specifically, they wanted to compare data between different time steps, and threshold data at any timestep using scalars from a specific time step. A solution was quickly put in place, using the current ParaView plugin ForceTime which uses vtkForceTimeFilter. For those who do not know this filter, it basically replaces any timestep request by one specific timestep.
Here is how it was supposed to work:
This way, the final output contains the initial reader output, plus a data array from time step 0, enabling any kind of comparison or threshold.
We should have taken a look at the vtkForceTimeFilter code first, because its implementation was definitely not supporting any kind of “diamond shape” pipeline, actually forcing the time in all the pipeline, in both branches.
The solution was a nice re-implementation of the vtkForceTimeFilter setting only the input time step in RequestUpdateExtent, then, in RequestData, deep copying the data into a cache, and putting up the CONTINUE_EXECUTING flag. This triggers a new pass of the pipeline, enabling us to set the correct input time steps back in the subsequent RequestUpdateExtent call. Then the cache is used as an output, always generating the same data, whatever timestep is asked.
This time-forced output could then be used in lots of ways, eg. with a multiple inputs calculator, enabling computation of rate based on data from a specific timestep, or even thresholding the dataset using data array from a specific dataset.
Along the way, and since this implementation is much more stable, we decided to put the class into VTK and expose it in ParaView filters.
3 comments to VTK : The multiple uses of the new ForceTime filter
This link isn’t working