Plugin porting from ParaView Desktop to ParaView Glance

Hello,

We have already developed a ParaView Desktop plugin in order to support an additional file format. Now, we aim to develop a web-based visualization application in order to support this format in a web browser (we go for client-side rendering).

From my understanding, VTK.js is the library you will support going forward for web-based visualization. According to a brief description on GitHub, “ParaView Glance already can serve as a foundation for building custom web-based visualization applications involving ITK.js and VTK.js”. However, it is unclear for us how easy it is to customize Glance in order to support our file format (a nice customization would include both the capability to open such files and new pieces of UI dedicated to the exploration of the files content). In particular, from my understanding, Glance does not seem to be “plugin-based”.

Is there a convenient way to transpose our existing plugin from ParaView Desktop to Glance? Does VTK.js/Glance is the most appropriate choice in this case? We also had a look at ParaViewWeb applications.

Best, Mathieu

Glance does not have a plugin infrastructure per-say, but by design have it for the readers part. Technically itk.js is treated as a plugin since Glance can be used without it.

In other words, you can load another JS script that will register more readers if need be but we don’t really have a dynamic infrastructure for dealing with UI elements.

One approach could be to use the itk.js infrastructure to expose your C++ reader into a wasm module than can then be used inside Glance.

The other option, could be to implement your reader in plain JS.

Then is Glance a good approach for what you are trying to do?

  1. I don’t know, it really depend if you have 3D cells and if you plan to do processing on the client side. If so, then Glance is probably not the best approach.

  2. ParaViewWeb/vtk.js could be used to do the processing on the server side and let the client render the geometry assuming the geometry is small enough to be send over the network.

  3. ParaViewWeb/vtk.js can also be used when processing and rendering are happening on the server side.

Thanks for your enlightening answer.

However, item 1 confuses me a bit since from my understanding, everything is precisely client side in Glance. Maybe your concern is about the size of the data?

For 1) I mean that if you plan to use vtk.js/Glance to process unstructured grid (clip, slice, contour) you will be out of luck as none of the filters dealing with 3D cells are available.

Hope that clarify what I mean by 3D cells.

If you just plan to render pre-computed results, then the size would indeed be the only concern.

Sure, thank you!