Jupyter notebooks are now usable in 3D Slicer

We worked hard with @jcfr during the during Slicer project week in Gran Canaria and we are excited to share one of the newest developments: Jupyter notebook support.

You can create interactive Python notebooks to run Slicer code and show resulting text data or slicer/3D view content in the notebook. Great for experimenting and sharing code and results with others.

See an example notebook here, which shows loading of a sample data set, display of a slice view, creation and display of a surface model. See information about how to set up and use notebooks here.

There are still a number of limitations (currently the extension is only available for Windows - will be fixed within a week; auto-complete is not implemented yet; display options are limited, etc.), but it would be great to hear from you, to keep us motivated and help us decide where to focus our efforts.

7 Likes

This is awesome, looking forward to trying as soon as it’s ready for other platforms!

A post was split to a new topic: How to start Slicer Jupyter kernel?

Dear Andras,
Could you please tell me why auto complete is not working for jupyter. I am using nightly version?

thank you

Regards,
Saima Safdar

In recent nightly builds, with great help from @ihnorton, we added auto-complete (press Tab key):

We also added inspection (press Shift-Tab) to get quick documentation on a Python methods. Currently, limitation is that documentation can only retrieved for native Python code, but we’ll work on extending this to wrapped C++ methods, too (you can track progress of this task here).

To get these features:

  • install a recent nightly version of Slicer
  • install SlicerJupyter extension from the extension manager
  • go to JupyterKernel module
  • click “Install Slicer kernel in Jupyter” button
2 Likes

5 posts were split to a new topic: Slicer Jupyter notebooks can be launched using just a web browser