Kitware / vtk-js

Visualization Toolkit for the Web
https://kitware.github.io/vtk-js/
BSD 3-Clause "New" or "Revised" License
1.23k stars 371 forks source link

Paraview export scene macro does not support translation, axes, legends #292

Open MariDani opened 7 years ago

MariDani commented 7 years ago

Hi all, I am using python macro "export-scene-macro" to export my scenes from Paraview so I can load them via vtk-js. I noticed that the macro does not keep translation values from Paraview - so when I load it in vtk-js some of objects are shifted to their "default" position. Also, the legends and the axes grid are not exported. Is there any way how to keep these features, especially translation values, while exporting the scene?

Here is an example of a scene in Paraview which I exported and load via vtk js: Paraview paraview

vtk js vtkjs

Thank you Mariana

jourdain commented 6 years ago

Legend and axes are not yet supported in vtk.js but transform on actors are. Now the exporter is missing those transformation in the exported data.

weidonglian commented 6 years ago

Is there any plan to support legend? It looks a bit wired to see the plot without the legend, say a surface plot with strain, stress, and displacements as such. Could you please shed any light?

jourdain commented 6 years ago

There is a plan for it but since we don't have direct funding for that specific topic, I can't give you a timeline for it. But if you create your own viewer, it could be fairly easy to implement in pure HTML as an overlay.

weidonglian commented 6 years ago

@jourdain thanks. I will think to implement it separately with pure html as an overlay.

jourdain commented 6 years ago

Here is an example on how to covert the lookup table into an image.

https://github.com/Kitware/pv-web-viewer/blob/master/Sources/properties/LookupTableProperty/index.js#L9-L21