First of all, I thank Panel for supporting vtkjs. It supported PyVista plots and made me very happy.
However, vtkjs is not the same as vtk in Python, as mentioned in past discussions.
Recently, Kitware has started developing a component called trame which aims to be fully compatible with vtk.
Do you have any ideas on how to use this project with panel?
I took a look at the repository Kitware/trame and its not much that I can infer from that. As they support Jupyter environments you could try to see if they can be used via Panels built in support for Ipywidgets?
@Marc hanks for your comment, Trame supports the Jupyter backend so if we can use Jupyter results we can fully support vtk results. I don’t understand how ipywidget can use jupyter results so I will study it.
Additional reports:
PyVista has a method that returns the result of Trame as ipywidgets.widgets.HTML, but I am not sure how to integrate this into the panel.
Thank you for your comment. PyVista’s show method provides an ipywidget that can be used with Jupyter (see this tweet). I am not sure how this should be provided on the Panel side, because I am new to Panel. In any case, vtk.js is not being developed diligently and will need to be migrated to trame in the future. I would really appreciate ideas on how to incorporate the sample scripts into the Panel design.
Sorry to get ahead of myself, but I created an issue on this.
I guess I’m a new comer here and was looking around as I will have some question on improving the comm for trame to use pyviz_comms but I will open another topic…
But as a comment for your trame interest. I would say that you can easily create side UI for controlling in a reactive manner anything on your Python side as well.
On top of that even if trame allow you to do remote rendering and get the full power of VTK, the local rendering option still rely on vtk.js.
Thanks for your comments, Trame is a great project. For the record, I would like to add my understanding.
As you mentioned, local rendering relies on vtk.js, so we are not able to reproduce VTK perfectly. Switching to remote rendering can be done by pressing the blue highlighted button in the image. This is derived from PyVista’s Jupyter support (derived from Trame’s Jupyter support maybe). In this mode, VTK is fully reproduced, but operations such as moving objects require resources.