Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (27 sloc) 2.2 KB

Back to Projects List

Improve usability of Slicer from Python

Key Investigators

Project Description

Python is getting the most widely used platform for medical image computing. It is important to make it easy to use and extend Slicer using Python.

Jupyter notebook is an interactive shell for executing scripts and viewing execution results. During last project week in Gran Canaria, we have implemented SlicerJupyter extension, which allows creating Jupyter notebooks that use Slicer.

Objective

Improve Python IDE, debugging, and Jupyter support.

Approach and Plan

  1. Improve PyCharm auto-complete and debugging
  2. Improve SlicerJupyter: fix build/packaging errors on Linux and macOS, implement auto-completion, set up a docker image to run Slicer kernels online using binder.

Progress and Next Steps

  • Updated Slicer's Python interpreter to be usable from PyCharm (https://github.com/Slicer/Slicer/pull/993)

    • Debugging of standalone Python scripts work (runs in the debugger same way as in Slicer)
    • Slicer's Python console can be used as a regular Python console (tested on linux only)
    • Auto-completion in editor (without debugging) does not work yet
  • SlicerJupyter: decided to fix build errors and auto-complete for now and leave more advanced features for later. Probably will not switch to IPython, but it is an option after Slicer switched to Python3.

Illustrations

PyCharm auto-complete and documentation works great during debugging

PyCharmAutoComplete

Background and References