2013 Project Week Breakout Session: SimpleITK
Presenters: Hans Johnson & Bradley Lowekamp
SimpleITK is an abstraction layer on top of ITK which provides Python bindings for many of the algorithms in ITK. The tool is under active development and recent additions have focus on providing a more Pythonic interface to the Image class, numerous additional algorithms, along with the addition of transforms and interpolators.
SimpleITK is currently a build option in Slicer3D when using ITKv4. It can provide access to many powerful algorithms in Slicer as python modules or SimpleITK can be used in the Python Interactor for image manipulation and segmentation.
Version 0.6.1 is currently available as a binary download, and is also being incorporated into Slicer.
This session will consists of interactive demonstrations of the fundamental concepts and style of SimpleITK along with showing the latest features in the 0.6 release. The presentation will make use of matplotlib and the Scientific Python environment to illustrate a Pythonic workflow to perform common image tasks and segmentation.
You can set up your own environment or you can use a server that has been set up for the group in the conference room.
Setting up your Own Environment
Follow the instructions below to set up your own environment.
Attendees are encouraged to setup a python environment to follow along during this session.
Under the best of circumstances (tested on OSX 10.8 and 10.7.5) this environment can be setup with the following:
sudo pip install virtualenv virtualenv ~/sitkpy --no-site-packages ~/sitkpy/bin/pip install ipython ~/sitkpy/bin/pip install ipython[zmq] ~/sitkpy/bin/pip install tornado ~/sitkpy/bin/pip install numpy ~/sitkpy/bin/pip install matplotlib
Install SimpleITK 0.6.1
Download the built egg for your system from Source Forge: http://sourceforge.net/projects/simpleitk/files/SimpleITK/0.6.1/Python/
Use easy_install to install or upgrade:
~/sitkpy/bin/easy_install -U SimpleITK-0.6.1_gc9d89-py$(python version)-$(OS)-$(arch).egg
If there is not a built distribution for your system you will need to build SimpleITK: http://www.itk.org/Wiki/ITK_Release_4/SimpleITK/GettingStarted#Build_It_Yourself
Download the course material
The "notebooks" are available for download as a git repository:
git clone email@example.com:SimpleITK/SimpleITK-Notebooks.git
Additionally the SPL's "Multi-modality MRI-based Atlas of the Brain" should be downloaded and extracted into the SimpleITK-Notebooks/Data directory.
Run the environment
cd SimpleITK-Notebooks ~/sitkpy/bin/ipython notebook --pylab=inline
Note: On Linux platforms you may be able to obtain many of these packages as system packages which may suffice ( Ubuntu 12+). Note: On Window platforms some of these packages should be obtained as binary downloads and installed.