Skip to content

Commit af25bac

Browse files
authored
Update README.md
1 parent ff67671 commit af25bac

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ You can use this option for a quick start. No installation or setup is needed, j
1515

1616
When you click on the link, Binder launches 3D Slicer with SlicerJupyter extension on their cloud servers. Binder is a free service and server resources are quite limited. Also, there is no interactive access to the graphical user interface. Therefore, this option is only recommended for testing, demos, or simple computations or visualizations.
1717

18-
## Option 2. Run Slicer and Jupyter on your own computer
18+
## Option 2. Run using docker on your computer
1919

20-
### Setup
20+
- Install [docker](https://www.docker.com/)
21+
- Run the docker image as described [here](https://github.com/Slicer/SlicerDocker/blob/master/README.rst#usage-of-slicer-notebook-image)
22+
23+
## Option 3. Install Slicer and Jupyter on your own computer
2124

2225
* Install [3D Slicer](https://download.slicer.org/), start it, and install SlicerJupyter extension in its Extension Manager, restart 3D Slicer
23-
* Install Python packages **in 3D Slicer's Python console** by copy-pasting these lines:
26+
* Install Python packages by copy-pasting these lines **in 3D Slicer's Python console**:
2427
```
2528
import os
2629
if os.name=='nt':
@@ -31,36 +34,36 @@ else:
3134
pip_install('--upgrade pillow --force-reinstall')
3235
pip_install("ipywidgets pandas ipyevents ipycanvas")
3336
```
34-
* Install a Python distribution and Jupyter
37+
* If you don't have Python and Jupyter installed on your computer already, then install them by following the steps below. We will refer to this as the **External Python environment**.
3538
* Install [Anaconda](https://www.anaconda.com/products/individual) (recommended) or any other Python distribution (see installation instructions [here](http://jupyter.org/install))
3639
* You can choose any Python version and any bitness (Python 3, 64-bit is recommended)
3740
* Adding Python to your PATH environment variable or registering as default Python is not required
3841
* Start a command prompt in the Python environment
39-
* Install widget support by running these commands in the Python command prompt:
42+
* Install Jupyter widget support by running these commands in the **External Python environment**:
4043
```
4144
python -m pip install jupyter ipywidgets pandas ipycanvas ipyevents
4245
jupyter nbextension enable --py widgetsnbextension
4346
jupyter nbextension enable --py ipyevents
4447
```
45-
* For Jupyter lab, run these additional commands:
48+
* For Jupyter lab, run these additional commands in the **External Python environment**:
4649
```
4750
conda install -c conda-forge nodejs
4851
pip install ipywidgets ipyevents ipycanvas
4952
jupyter labextension install @jupyter-widgets/jupyterlab-manager
5053
jupyter labextension install @jupyter-widgets/jupyterlab-manager ipycanvas
5154
jupyter labextension install @jupyter-widgets/jupyterlab-manager ipyevents
5255
```
53-
* Install Slicer kernel in the Python command prompt:
56+
* Install Slicer kernel in in the **External Python environment**:
5457
* Switch to JupyterKernel module in 3D Slicer
5558
* Click "Copy command to clipboard" to copy the kernel installation command to the clipboard
5659
* Paste the command in the Python command prompt (not in Slicer's Python console)
57-
* Start Jupyter notebook. For example, by runnning _jupyter-notebook_ executable.
60+
* Start Jupyter notebook. For example, by runnning _jupyter-notebook_ executable in the **External Python environment**.
5861

5962
See video of installation steps using Anaconda here:
6063

6164
[![](doc/InstallVideoThumbnail.png)](https://youtu.be/jcRsRw6RC2g)
6265

63-
## Using Slicer from a notebook
66+
# Using Slicer from a notebook
6467

6568
* Create a new notebook, selecting _Slicer 4.x_ kernel (for example, _Slicer 4.11_). Jupyter will open a new Slicer instance automatically when kernel start is requested. This Slicer instance will be automatically closed when kernel shutdown is requested.
6669

@@ -87,7 +90,7 @@ slicernb.ViewInteractiveWidget()
8790

8891
![Hit Shift-Tab key to inspect](doc/Inspect.png)
8992

90-
## Examples
93+
# Examples
9194

9295
You can get started by looking at [example Slicer notebooks here](https://github.com/Slicer/SlicerNotebooks).
9396

0 commit comments

Comments
 (0)