itk-vtk-viewer icon indicating copy to clipboard operation
itk-vtk-viewer copied to clipboard

Visualising a time series of mesh-based data

Open timokoch opened this issue 5 years ago • 4 comments

I'm using the embedded viewer via CDN to visualise some unstructured grid data. The reader works great. Thanks for this cool tool.

However, most of my data will be time series data. I thought of using a simple solution with an external controller that allows to click through the data files and on-click changes the data-url attribute of the itk-vtk-viewer div. However that doesn't seem to trigger a reload of the source data. Also changing the data-loaded attribute back to false doesn't seem to have any effect. Moreover, for viewing time series data this way I would need to have control over some viewer option, e.g. if a certain data field was selected and the source file changes, the new data should be also loaded with the same data field enabled.

Is there a way to achieve what I'm trying to do? I saw there is a publicAPI which is not documented. Is it possible to modify the viewer using that API?

Is there a much better way to realise time-series data visualisation currently?

Any pointers are highly appreciated.

timokoch avatar Jul 17 '20 17:07 timokoch

I'm using the embedded viewer via CDN to visualise some unstructured grid data. The reader works great. Thanks for this cool tool.

Thank you for the kind words -- they are appreciated!

Is there a way to achieve what I'm trying to do? I saw there is a publicAPI which is not documented. Is it possible to modify the viewer using that API?

Yes, to update the mesh, use setGeometries. If the data is a File, readFiles may be helpful.

Is there a much better way to realise time-series data visualisation currently?

We are also adding zarr support for meshes, which allows them to be loaded quickly for time series visualization. Consider using that once available.

thewtex avatar Jul 19 '20 13:07 thewtex

Has zarr support landed yet? Is there an example time series visualization? Maybe @timokoch could share something from his experiments?

renefritze avatar Nov 17 '22 09:11 renefritze

@renefritze Looking at setGeometry and readFiles helped a lot to understand what is possible. But we ended up using vtk.js directly (plus the ITKPolyDataReader and itk/readPolyDataArrayBuffer) to realize a simple time series viewer in a react frontend (https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-web-app/-/blob/master/services/client/react-frontend/src/components/VTKViewer/index.jsx). So, unfortunately, I haven't followed up on using itk-vtk-viewer for this.

timokoch avatar Nov 17 '22 10:11 timokoch

My goal is viewing time series data in a jupyter notebook/lab setup. Your example could still be helpful if I get a ipywidgets<->vtk.js bridge working (again). So thanks for the link @timokoch !

renefritze avatar Nov 17 '22 10:11 renefritze