Closed MHadavand closed 3 years ago
vtu is for 3D cells, vtk.js does not support those cells and mainly focus on rendering which means that you need to run a GeometryFilter to extract the skin into a polydata for the rendering. Itk.js does have such reader that will do the conversion for vtk.js. But if your goal is to clip/slice/contour your data, that is still not the solution.
Thanks for the reply!
One quick question, is there an API from paraview glance that I can use and integrate to an application that uses VTKJS? It is important to be able to process unstructured grids for earth science models. I can convert them to uniform grid and export VTI volumes but would prefer to have the option to handle VTU.
Thanks
VTK/ParaView Web or WebAssembly could be the way to go as well.
ParaViewGlance is mainly vtk.js and mostly focus on providing a GUI to it.
Thanks! The reason I thought about ParaviewGlance is that I can upload a vtu file and it gets loaded correctly so I thought there should be an API to process VTU file format.
Glance integrate itk.js that is why.
That makes sense and as you mentioned, I cannot slice or clip the imported VTU file in glance.
Unstructured grid are not currently supported by VTK-JS.
vtu is for 3D cells, vtk.js does not support those cells and mainly focus on rendering which means that you need to run a GeometryFilter to extract the skin into a polydata for the rendering. Itk.js does have such reader that will do the conversion for vtk.js. But if your goal is to clip/slice/contour your data, that is still not the solution.
I'm interested in clipping/slicing data. From what I understand, HttpDataSetReader works with VTK.js only. So is HttpSceneLoader what I need? How can I export a scene from a C++ VTK app such that I can open/load it in VTK.js?
Once on the JS side, you won't be able to clip it as the transformation to vtkPolyData already happened.
You can see that such export is available within ParaView. The technology underneath is indeed HttpSceneLoader and on the VTK/C++ side, the code is here.
Thank you! In other words, VTK.js does not support 3D objects, but only vtkPolyData? In other words, clipping/slicing will need to happen in the C++ VTK app by passing mouse events from VTK.js to that app?
vtk.js will handle the display part of your data processing. But the processing will need to happen on a server or via some VTK/wasm magic.
You can find some cool examples doing that with a server using trame in plain VTK.
The examples all work based on vtkJSONRenderWindowExporter (C++) and HttpSceneLoader (VTK.js)?
The example provided use a different serialization method to enable incremental changes and caching rather than a standalone/single state. But some of the core components are the same. The vtk.js side use the SynchronizableRenderWindow.
I am not sure if this is an issue or lack of my knowledge about the API. I need to load vtu files (unstructured grids) but I cannot find a proper IO API for that. STL and VTP is pretty straightforward though.
Does it mean that vtu is not supported?
Thanks,