Get render window in jupyter and integrate it with ipyvtk
See original GitHub issueHello,
It seems that ipyvtk-simple supports all vtk-based viewers in jupyter notebooks. What kind of code would allow embedding a plot made with vedo inside ipyvtk?
It seems to work with Paraview and pyvista. I tried to plug plot.window into ipyvtk but I got none.
Is there a way to retrieve the window from plot.show()
in jupyter notebook?
from vedo import *
from ipyvtk_simple.viewer import ViewInteractiveWidget
# embedWindow(False) # ideally, we would specify ipyvtk here
plot = Plotter()
obj = load(datadir+"cessna.vtk")
plot.show(obj)
# After show, I should have access to window property
print(plot.window) # yields None
ViewInteractiveWidget(plot.window) # So this won't work obviously
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
ipyvtk-simple - PyPI
The goal is to enable this widget to work with any server side vtkRenderWindow This render window could be from VTK Python, ParaView,...
Read more >IPython Notebook & VTK - PyScience - WordPress.com
This post will show the only, currently available, way to integrate those beautiful renderings you might create with VTK into an IPython ......
Read more >Using ipyvtklink with PyVista
This feature works by streaming the current render window to a canvas within JupyterLab and then passing any user actions from the canvas...
Read more >vtk in jupyter - Web - VTK Discourse
Hi.I've integrated Python vtk in Jupyter lab, however, executing the code opens the renderer window at the server machine not embedded inside Jupyter...
Read more >Working with Jupyter Notebooks in Visual Studio Code
If you have an existing Jupyter Notebook, you can open it by right-clicking on ... The Python Jupyter Notebook Editor window has full...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A note here: ipyvtk-simple was renamed to ipyvtklink. Please include the renaming in your next update. 😃
It does work! I haven’t checked the releases recently so I had no idea. Thanks a lot for making that work! As a side-note, if like me you have some commented code below the line
ViewInteractiveWidget(plot.window)
, the viewer will not appear in the notebook and instead you will have what’s in the comments printed. Just remove any comment below that line and it works like a charm.Edit More precisely: only multi-line comments after that line prevent the viewer from being shown. Comments with a sharp sign do not alter the viewer.