AHM2013-Simple-ITK
Back to AHM_2013 Agenda
Presenters: Bradley Lowekamp
Contents
Background
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.0rc01 is currently available as a binary download.
Summary
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.
Attendee Preparation
Attendees are encouraged to setup a python environment to follow along during this session.
Under the best of circumstances (tested on OSX 10.8) this environment can be setup with the following:
sudo pip install virutalenv 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.6rc1
Download the built egg for your system from Source Forge: http://sourceforge.net/projects/simpleitk/files/SimpleITK/0.6.rc1/Python/
Use easy_install to install or upgrade:
~/sitkpy/bin/easy_install -U easy_install -U SimpleITK-0.6.0.rc1_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 git@github.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.
http://www.spl.harvard.edu/publications/item/view/2037
Run the environment
To launch:
~/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.