brainrendercan be used with Jupyter notebooks in two ways:
- 1.you can embed a window with your rendered scene
- 2.you can have your scene be rendered in a pop-up window.
If you want to have your scene be rendered in a new window, then you just need to set this option before your create your
from vedo import embedWindow
after this everything will work exactly the same as usual, and you will have access to all of
When embedding renderings in Jupyter Notebook not all of
brainrender's functionality will work! If you want to support all of
brainrender's features you should not embed renderings in the notebooks.
Note that this is due to the backend (
k3d) used to embed the renderings not because of
If you want to embed your scene anyways, you can do that as either a
k3dpanel or a with
embedWindow('k3d') # or 'itkwidgets'
If you chose
k3dthen to rendered your scene:
from vedo import show
# scene.render now will prepare the scene for rendering,
# but it won't render anything yet
# to actually display the scene we use `vedo`'s `show`
# method to show the scene's actors
from ipywidgets import VBox, Button
Last modified 2yr ago