by Ziv Yaniv
TAJ Technologies Inc. and National Institutes of Health, USA
If you are analyzing bio-medical images, then most likely you have already used the Insight Segmentation and Registration Toolkit (ITK), either indirectly via programs such as 3D Slicer or ITK-SNAP, or possibly written your own C++ code using components from ITK. Experience has shown that mastering ITK requires a significant amount of effort. One needs to understand the intricacies of C++ templates and the toolkit’s unique pipeline architecture. For many researchers ITK is a means to an end, their goal is to answer a scientific question via image analysis. The time investment required to master ITK does not contribute towards this goal. In addition, over the past decade the teaching and usage of C++ in the research domain has become less common with interpreted languages such as MATLAB, Python and R becoming more dominant, making ITK less accessible to many researchers.
SimpleITK is a simplified, free open source, interface to ITK aiming to address these issues in several ways. First the ITK pipeline architecture is no longer exposed, with filtering operations performed one at a time. An approach that is more familiar to most software developers. Second, the toolkit only supports 2D, 3D and optionally 4D (3D+time) images, unlike ITK’s nD images. Note that this restriction refers to spatio-temporal image dimensions, not to those of the pixels that can still be arbitrary length vectors. Additionally, software components are no longer configured via template parameters; the toolkit provides a subset of the possible ITK components using the most common image type combinations as the template parameters. For example, registration requires that the input images’ pixel type be floating point, as compared to ITK which can accommodate for all combinations of image pixel types. Finally, SimpleITK is made available in multiple programming languages including: Python, R, Java, C#, C++, Lua, Ruby, and TCL. The specific language bindings are generated using the SWIG interface compiler. Consequentially, in principle, SimpleITK can be made available in any language supported by SWIG. To encourage adoption of the toolkit, it is provided with “no assembly required”, you can start using it immediately without any compilation, as binary distributions for the Linux, OS X, and Windows operating systems are available.
The toolkit’s development process follows best software engineering practices including code reviews and continuous integration testing, with results displayed online allowing everyone to gauge the “health” of the current code and any code that is under consideration for incorporation into the toolkit. User support is available through a dedicated mailing list and the project’s Wiki, the recommended starting point for SimpleITK newcomers. The Application Programming Interface (API) documentation is generated nightly using the doxygen tool and is available online. While this documentation describes SimpleITK’s C++ API, it is easily mapped to the various wrapped languages. For some of the wrapped languages information is also available using the language specific conventions. For example, in Python the API documentation is accessible via the standard help() function. Typing “help(SImpleITK.Image)” will display the API documentation for the Image class.
In addition to the examples available as part of the toolkit’s source code we have developed freely available educational material to support learning and teaching of SimpleITK. This material consists of Jupyter notebooks written primarily in the Python programming language and spanning the gamut from simple tasks such as image input and output to complex tasks such as multi-modal image registration. Jupyter notebooks enable us to use a literate programming approach, mixing textual information, mathematical formulas and executable code all in the same document. Additionally, as the notebooks are viewed using a web browser we can easily incorporate GUI components as part of the document, allowing the user to interactively modify parameters and immediately see how they affect algorithm performance.
Developers of all experience levels can benefit from using SimpleITK, either as a rapid prototyping tool or as a tool for efficient data exploration and analysis. For the educators amongst us, SimpleITK will allow you to develop assignments in which your students’ focus is on the algorithmic aspects of image analysis and less on the programmatic aspects of C++ as is often the case when using ITK. Note that Jupyter notebooks are also convenient for homework assignments with the assignment text, instructor supplied code, and the student’s solution all in one document.
If you would like to contribute code to the toolkit, please follow the instructions provided here, or if you are interested in contributing examples and exercises in the form of Jupyter notebooks, please fork our github repository and create a pull request.
Enjoy SimpleITK!
Acknowledgments SimpleITK is a community effort, primarily developed and supported by the Intramural Research Program of the U.S. National Institutes of Health, National Library of Medicine. The project’s lead developer is Bradley Lowekamp, with support and contributions from the following individuals: Richard Beare, Daniel Blezek, David Chen, David Cole, David, Doria, Jean-Christophe Fillion-Robin, Arnaud, Gelas, Ali Ghayoor, Gabe Hart, Luis Ibanez, Hans Johnson, Brad King, Kasper Marstal, Matt McCormick, Dan Mueller, Cory Quammen, Kent Williams, Ziv Yaniv, Terry Yoo.
Leave a Reply