ImageData with Time-series (alternative of vtkTemporalDataSet?)

I am dealing with time series vector data. The 3-directional velocity vector in 3D space varies through time. I came to know that there are wonderful filters for pathline and streakline, but I could not find the appropriate data source structure to store time-series data.

I referred to this blog post, make a subclass of VTKPythonAlgorithmBase and implemented RequestInformation and RequestData to support TIME_STEPS and TIME_RANGE.

Is this the only way to use time-series data? I found that once there was vtkTemporalDataSet, but soon it has been deprecated. Is there any alternative for vtkTemporalData? Is there any way to use vtkMultiBlockDataSet for this purpose?

1 Like

Is there anyone who has experience on time-series data?
I read this from vtkMultiTimeStepAlgorithm document.

The child class uses UPDATE_TIME_STEPS to make the time requests and use set of time-stamped data objects are stored in time order in a vtkMultiBlockDataSet object.

So I think there should be a way to set time-stamp to each block of multi-block data set, but I don’t know how to.

1 Like

You can manage temporal data sets at the application level.

For example, in 3D Slicer, we have implemented time series support by adding a sequence class that can store multiple VTK data objects (volume, polydata, unstructured grid, transform, table, text, segmentation, measurement, etc.), one for each time point; and a sequence browser class, which is responsible for bringing data objects into the scene that correspond to the selected time point. It is less elegant than a time-aware pipeline, but we have been using it for over 5 years in many projects, for various use cases and data types, and it works well enough.

Thanks for the answer.

If I store temporal data into a custom class at the application level, I don’t think it can be used for pathline and streakline generation using existing vtkParticleTracer, vtkParticlePathFilter, and vtkStreaklineFilter, and also vtkTemporalInterpolator.

So… it seems that there is no existing class that can be used for time-series data.

You can create a simple adaptor class as you can see in TestParticleTracers.

Thanks. I am using VTK with python, so I implemented similar class with VTKPythonAlgorithmBase rather than subclassing vtkAlgorithm. I am happy that I am in the right way.
I am attaching my time-series source class for someone who might need an example in python.

StaticSphereSource.py (3.8 KB)

2 Likes

I have tried doing this in c++ but I am struggling to figure out how to make the pipeline update.

following the examples it will execute RequestData once, but then not again. I am not sure I know where I need to add the magic that tells the instance that something has changed? I know that’s the issue, but not sure what I am missing. Is there an up to date full blown example out there?