Overview

SimpleITK is a simplified programming interface to the algorithms and data structures of the Insight Toolkit (ITK) for segmentation, registration and advanced image analysis. It supports bindings for multiple programming languages including C++, Python, R, Java, C#, Lua, Ruby and TCL. Combining SimpleITK’s Python bindings with the Jupyter notebook web application creates an environment which facilitates collaborative development of biomedical image analysis workflows.

In this tutorial, we will use a hands-on approach utilizing Jupyter notebooks to explore and experiment with various SimpleITK features in the Python programming language. Participants will follow along using their personal laptops, enabling them to explore the effects of code changes and parameter settings not covered by the instructor. We will start with a short introduction to the toolkit’s two basic data elements, Images and Transformations. Combining the two classes we show how to use SimpleITK as a tool for image preparation and data augmentation for deep learning via spatial and intensity transformations. We will then present various features available in the toolkit’s registration framework and components for constructing a segmentation workflow. Finally, we will show how to use the toolkit for qualitative, visual, and quantitative evaluation of segmentation and registration results.

Beyond the notebooks used in this course you can find the main SimpleITK notebooks repository on GitHub.

Instructors

  • Hans J. Johnson, University of Iowa.
  • Bradley C. Lowekamp, National Institutes of Health and Medical Science & Computing LLC.
  • Ziv Yaniv, National Institutes of Health and Medical Science & Computing LLC.

Prerequisites

If you encounter problems or have questions, please post using this repository's GitHub issue reporting system (requires a GitHub user account).

In this course we will use the Anaconda Python distribution. Please follow the instructions below to setup the environment we will use during the course. All commands below are issued on the command line (Linux/Mac - terminal, Windows - Anaconda Prompt).

  1. Download and install the Fiji image viewer. This is the default image viewer used by SimpleITK:
    • On Windows: Install into your user directory (e.g. C:\Users\[your_user_name]\).
    • On Linux: Install into ~/bin/ .
    • On Mac: Install into /Applications/ .
  2. Download and install the most recent version of Anaconda for your operating system. We assume it is installed in a directory named anaconda3. Regardless of the installer, we will be working with Python 3.7
    • On Windows: open the Anaconda Prompt (found under the Anaconda3 start menu).
    • On Linux/Mac: on the command line source path_to_anaconda3/bin/activate base
  3. Update the base anaconda environment and install the git version control system into it.
    conda update conda
    conda update anaconda
    conda install git
    
  4. Clone this repository:
    git clone https://github.com/SimpleITK/ISBI2020_TUTORIAL.git
    
  5. Create the virtual environment containing all packages required for the course:
    conda env create -f ISBI2020_TUTORIAL/environment.yml
    
  6. Activate the virtual environment:
    • On Windows: open the Anaconda Prompt (found under the Anaconda3 start menu)
      conda activate sitkpyISBI20
    • On Linux/Mac: on the command line
      source path_to_anaconda3/bin/activate sitkpyISBI20
  7. Go over the setup notebook (requires internet connectivity). This notebook checks the environment setup and downloads all of the required data.
    cd ISBI2020_TUTORIAL
    jupyter notebook setup.ipynb

Program

Click the launch binder button to try things out without installing (some display functions will not work):

  • [8:30AM - 9:30AM] History and overview [ppt]. Spatial transformations, images and resampling.
  • [09:30AM- 10:00PM] Data augmentation for deep learning.
  • [10:00AM - 10:30AM] Break.
  • [10:30AM - 11:30AM] Registration and segmentation.
  • [11:30AM - 12:00PM] Segmentation evaluation and results visualization.

Supplementary Material

For those interested in reading more about SimpleITK (Python and beyond):

If you find that SimpleITK has been useful in your research, you can cite it via citations.bib.