For additional details see the Jupyter Notebook Quick Start Guide.
Check that SimpleITK and auxiliary program(s) are correctly installed in your environment, and that you have the SimpleITK version which you expect (requires network connectivity).
You can optionally download all of the data used in the notebooks in advance. This step is only necessary if you expect to run the notebooks without network connectivity.
The following cell checks that all expected packages are installed.
# check that all packages are installed (see requirements.txt file)
required_packages <- c("SimpleITK", "rPython", "scatterplot3d", "tidyr", "ggplot2", "xtable", "purrr")
missing_packages <- required_packages[!unlist(lapply(required_packages, require, character.only = TRUE, quietly = TRUE))]
library(SimpleITK)
source("downloaddata.R")
print(Version())
We expect that you have an external image viewer installed. The default viewer is Fiji. If you have another viewer (i.e. ITK-SNAP or 3D Slicer) you will need to set an environment variable to point to it.
# Retrieve an image from the network, read it and display using the external viewer.
# The show method will also set the display window's title and by setting debugOn to TRUE,
# will also print information with respect to the command it is attempting to invoke.
# NOTE: The debug information is printed to the terminal from which you launched the notebook
# server.
Show(ReadImage(fetch_data("SimpleITK.jpg")), "SimpleITK Logo", debugOn=TRUE)
Download all of the data in advance if you expect to be working offline (may take a couple of minutes).
fetch_data_all(file.path("..","Data"), file.path("..","Data","manifest.json"))