Is it possible plot 3D Mesh file or to add the VTK/ Pyvista window inline streamlit?

I find Streamlit impressive. Outstanding work!

I have a 3d mesh file. I am able to plot the 3d mesh file using pyvista library, ITK widgets, and see it in the notebook interactively.

I would like to show this 3D plot in Streamlit interactively. Is it possible to do it? If there is an example, it would be very helpful.

Kind regards,
Hemanand

Hello @Hems, welcome to the community.

With Components coming really soon, which will enable you to run arbitrary HTML/JS code in Streamlit, we should be able to replicate part of ITKWidget’s code, which is passing a JS representation or file upload of your mesh read through Pyvista into itk-vtk-viewer / vtk.js to visualize it in Streamlit.

I believe that’s an excellent example off custom component where you can have a quick prototype working, if you want to try it out when it’s live :wink:

Fanilo

Hi,
Thanks for pointing me towards the right direction. It is very interesting. I’ll try it.

Regards,
Hems

1 Like

Well now it’s out :slight_smile:

1 Like