SimpleITK

Last updated
Developer(s) Insight Software Consortium
Stable release
2.3.0 / 13 September 2023;8 months ago (2023-09-13)
Written in C++, Python, R, Java, C#, Lua, Ruby, Tcl
Operating system Cross-platform
Type Library for image analysis
License Apache 2.0
Website www.simpleitk.org

SimpleITK is a simplified, open-source interface to the Insight Segmentation and Registration Toolkit (ITK). The SimpleITK image analysis library is available in multiple programming languages including C++, Python, R, [1] Java, C#, Lua, Ruby and Tcl. Binary distributions are available for all three major operating systems (Linux, macOS and Microsoft Windows).

Contents

Developed at the National Institutes of Health (NIH) as an open resource, its primary goal is to make the algorithms available in the ITK library accessible to the broadest range of scientists whose work includes image analysis, irrespective of their software development skills. [2] As a consequence, the SimpleITK interface exposes only the most commonly modified algorithmic settings of the ITK components. Additionally, the library provides both an object oriented and a procedural interface to most of the image processing filters. The latter enables image analysis workflows with concise syntax. A secondary goal of the library is to promote reproducible image analysis workflows [3] by using the SimpleITK library in conjunction with modern tools for reproducible computational workflows available in the Python (Jupyter notebooks) and R (knitr package ) programming languages.

Software development is centered on GitHub using a fork and pull model. The project is built using the CMake tool, with nightly builds posted to the project's quality dashboard.

Multiple medical image analysis applications and libraries incorporate SimpleITK as a key building block, as it provides a wide range of image filtering and image IO components with a user friendly interface. Examples include the pyOsirix [4] scripting tool for the popular Osirix application, the pyradiomics python package for extracting radiomic features from medical imaging, [5] the 3DSlicer image analysis application, the SimpleElastix medical image registration library, [6] and the NiftyNet deep learning library for medical imaging. [7]

History

The initial development of SimpleITK was funded by the United States National Library of Medicine under the American Recovery and Reinvestment Act (ARRA) program as a collaboration between The Mayo Clinic, Kitware Inc, The University of Iowa and NLM's intramural program. The first major release of the toolkit was announced in April-May 2017. The second major release was announced in September 2020.

Between 2013 and 2019, SimpleITK development was primarily carried out as part of the intramural research program of the National Library of Medicine with collaborators at The University of Iowa and Monash University. Since 2019, SimpleITK development is primarily carried out under the Office of Cyber Infrastructure and Computational Biology at the National Institute of Allergy and Infectious Diseases. In April 2020 the toolkit changed its logo to a more modern design.

Examples

Gaussian smoothing

Short Python scripts illustrating image reading, blurring, and writing. Using the object oriented interface:

importSimpleITKassitkimportsysiflen(sys.argv)<4:print("Usage: SimpleGaussian <input> <sigma> <output>")sys.exit(1)reader=sitk.ImageFileReader()reader.SetFileName(sys.argv[1])image=reader.Execute()pixelID=image.GetPixelID()gaussian=sitk.SmoothingRecursiveGaussianImageFilter()gaussian.SetSigma(float(sys.argv[2]))image=gaussian.Execute(image)caster=sitk.CastImageFilter()caster.SetOutputPixelType(pixelID)image=caster.Execute(image)writer=sitk.ImageFileWriter()writer.SetFileName(sys.argv[3])writer.Execute(image)

A more concise version using the procedural interface:

importSimpleITKassitkimportsysiflen(sys.argv)<4:print("Usage: SimpleGaussian <input> <sigma> <output>")sys.exit(1)image=sitk.ReadImage(sys.argv[1])pixelID=image.GetPixelID()image=sitk.Cast(sitk.SmoothingRecursiveGaussian(image,float(sys.argv[2])),pixelID)sitk.WriteImage(image,sys.argv[3])

Multi-modality Rigid Registration

Short R script illustrating the use of the library's registration framework for rigid registration of two 3D images:

library(SimpleITK)args=commandArgs(trailingOnly=TRUE)if(length(args)<2){cat("Usage: registration <fixed_image> <moving_image> <output_transform>\n")quit(save="no",status=1)}fixed_image<-ReadImage(args[1],"sitkFloat32")moving_image<-ReadImage(args[2],"sitkFloat32")initial_transform<-CenteredTransformInitializer(fixed_image,moving_image,Euler3DTransform(),"GEOMETRY")reg<-ImageRegistrationMethod()reg$SetMetricAsMattesMutualInformation(numberOfHistogramBins=50)reg$SetMetricSamplingStrategy("RANDOM")reg$SetMetricSamplingPercentage(0.01)reg$SetInterpolator("sitkLinear")reg$SetOptimizerAsGradientDescent(learningRate=1.0,numberOfIterations=100)reg$SetOptimizerScalesFromPhysicalShift()reg$SetInitialTransform(initial_transform,inPlace=FALSE)final_transform<-reg$Execute(fixed_image,moving_image)WriteTransform(final_transform,"final_transform.tfm")

Related Research Articles

<span class="mw-page-title-main">Fox toolkit</span>

The FOX toolkit is an open-source, cross-platform widget toolkit, i.e. a library of basic elements for building a graphical user interface (GUI). FOX stands for Free Objects for X.

Phase correlation is an approach to estimate the relative translative offset between two similar images or other data sets. It is commonly used in image registration and relies on a frequency-domain representation of the data, usually calculated by fast Fourier transforms. The term is applied particularly to a subset of cross-correlation techniques that isolate the phase information from the Fourier-space representation of the cross-correlogram.

In computer programming, an entry point is the place in a program where the execution of a program begins, and where the program has access to command line arguments.

<span class="mw-page-title-main">Orange (software)</span> Open-source data analysis software

Orange is an open-source data visualization, machine learning and data mining toolkit. It features a visual programming front-end for explorative qualitative data analysis and interactive data visualization.

ITK is a cross-platform, open-source application development framework widely used for the development of image segmentation and image registration programs. Segmentation is the process of identifying and classifying data found in a digitally sampled representation. Typically the sampled representation is an image acquired from such medical instrumentation as CT or MRI scanners. Registration is the task of aligning or developing correspondences between data. For example, in the medical environment, a CT scan may be aligned with an MRI scan in order to combine the information contained in both.

GenePattern is a freely available computational biology open-source software package originally created and developed at the Broad Institute for the analysis of genomic data. Designed to enable researchers to develop, capture, and reproduce genomic analysis methodologies, GenePattern was first released in 2004. GenePattern is currently developed at the University of California, San Diego.

The Simple API for Grid Applications (SAGA) is a family of related standards specified by the Open Grid Forum to define an application programming interface (API) for common distributed computing functionality.

<span class="mw-page-title-main">IPython</span> Advanced interactive shell for Python

IPython is a command shell for interactive computing in multiple programming languages, originally developed for the Python programming language, that offers introspection, rich media, shell syntax, tab completion, and history. IPython provides the following features:

<span class="mw-page-title-main">ITK-SNAP</span> Medical imaging software

ITK-SNAP is an interactive software application that allows users to navigate three-dimensional medical images, manually delineate anatomical regions of interest, and perform automatic image segmentation. The software was designed with the audience of clinical and basic science researchers in mind, and emphasis has been placed on having a user-friendly interface and maintaining a limited feature set to prevent feature creep. ITK-SNAP is most frequently used to work with magnetic resonance imaging (MRI), cone-beam computed tomography (CBCT) and computed tomography (CT) data sets.

<span class="mw-page-title-main">3D Slicer</span> Image analysis and scientific visualization software

3D Slicer (Slicer) is a free and open source software package for image analysis and scientific visualization. Slicer is used in a variety of medical applications, including autism, multiple sclerosis, systemic lupus erythematosus, prostate cancer, lung cancer, breast cancer, schizophrenia, orthopedic biomechanics, COPD, cardiovascular disease and neurosurgery.

A scientific workflow system is a specialized form of a workflow management system designed specifically to compose and execute a series of computational or data manipulation steps, or workflow, in a scientific application.

<span class="mw-page-title-main">MeVisLab</span>

MeVisLab is a cross-platform application framework for medical image processing and scientific visualization. It includes advanced algorithms for image registration, segmentation, and quantitative morphological and functional image analysis. An IDE for graphical programming and rapid user interface prototyping is available.

ilastik is a user-friendly free open source software for image classification and segmentation. No previous experience in image processing is required to run the software. Since 2018 ilastik is further developed and maintained by Anna Kreshuk's group at European Molecular Biology Laboratory.

<span class="mw-page-title-main">RStudio</span> Integrated development environment for R

RStudio IDE is an integrated development environment for R, a programming language for statistical computing and graphics. It is available in two formats: RStudio Desktop is a regular desktop application while RStudio Server runs on a remote server and allows accessing RStudio using a web browser. The RStudio IDE is a product of Posit PBC.

<span class="mw-page-title-main">Notebook interface</span> Programming tool blending code and documents

A notebook interface or computational notebook is a virtual notebook environment used for literate programming, a method of writing computer programs. Some notebooks are WYSIWYG environments including executable calculations embedded in formatted documents; others separate calculations and text into separate sections. Notebooks share some goals and features with spreadsheets and word processors but go beyond their limited data models.

<span class="mw-page-title-main">Project Jupyter</span> Open source data science software

Project Jupyter is a project to develop open-source software, open standards, and services for interactive computing across multiple programming languages.

Pegasus is an open-source workflow management system. It provides the necessary abstractions for scientists to create scientific workflows and allows for transparent execution of these workflows on a range of computing platforms including high performance computing clusters, clouds, and national cyberinfrastructure. In Pegasus, workflows are described abstractly as directed acyclic graphs (DAGs) using a provided API for Jupyter Notebooks, Python, R, or Java. During execution, Pegasus translates the constructed abstract workflow into an executable workflow which is executed and managed by HTCondor.

Elastix is an image registration toolbox built upon the Insight Segmentation and Registration Toolkit (ITK). It is entirely open-source and provides a wide range of algorithms employed in image registration problems. Its components are designed to be modular to ease a fast and reliable creation of various registration pipelines tailored for case-specific applications. It was first developed by Stefan Klein and Marius Staring under the supervision of Josien P.W. Pluim at Image Sciences Institute (ISI). Its first version was command-line based, allowing the final user to employ scripts to automatically process big data-sets and deploy multiple registration pipelines with few lines of code. Nowadays, to further widen its audience, a version called SimpleElastix is also available, developed by Kasper Marstal, which allows the integration of elastix with high level languages, such as Python, Java, and R.

CuPy is an open source library for GPU-accelerated computing with Python programming language, providing support for multi-dimensional arrays, sparse matrices, and a variety of numerical algorithms implemented on top of them. CuPy shares the same API set as NumPy and SciPy, allowing it to be a drop-in replacement to run NumPy/SciPy code on GPU. CuPy supports Nvidia CUDA GPU platform, and AMD ROCm GPU platform starting in v9.0.

References

  1. R. Beare, B. C. Lowekamp, Z. Yaniv, “Image Segmentation, Registration and Characterization in R with SimpleITK”, J Stat Softw, 86(8), 2018, doi:10.18637/jss.v086.i08.
  2. B. C. Lowekamp, D. T. Chen, L. Ibáñez, D. Blezek, "The Design of SimpleITK", Front. Neuroinform.,7:45, 2013, doi:10.3389/fninf.2013.00045.
  3. Z. Yaniv, B. C. Lowekamp, H.J. Johnson, R. Beare, "SimpleITK Image-Analysis Notebooks: a Collaborative Environment for Education and Reproducible Research", J Digit Imaging., 31(3):290-303, 2018, doi: 10.1007/s10278-017-0037-8.
  4. M. D. Blackledge, D. J.Collins, D-M Koh, M. O. Leach, "Rapid development of image analysis research tools: Bridging the gap between researcher and clinician with pyOsiriX", Comput Biol Med., 69:203-212, 2016, doi: 10.1016/j.compbiomed.2015.12.002
  5. J. J. M. van Griethuysen, A. Fedorov, C. Parmar, A. Hosny, N. Aucoin, V. Narayan, R. G. H. Beets-Tan, J. C. Fillon-Robin, S. Pieper, H. J. W. L. Aerts, "Computational Radiomics System to Decode the Radiographic Phenotype", Cancer Research, 77(21): e104–e107, 2017, doi: 10.1158/0008-5472.CAN-17-0339
  6. K. Marstal, F. Berendsen, M. Staring, S. Klein, "SimpleElastix: A User-Friendly, Multi-lingual Library for Medical Image Registration", IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), 574-582, 2016, doi:10.1109/CVPRW.2016.78
  7. E. Gibson, W. Li, C. Sudre, L. Fidon, D. I. Shakir, G. Wang, Z. Eaton-Rosen, R. Gray, T. Doel, Y. Hu, T. Whyntie, P. Nachev, M. Modat, D. C. Barratt, S. Ourselin, M. J. Cardoso, T. Vercauteren, "NiftyNet: a deep-learning platform for medical imaging", Comput Methods Programs Biomed., 158:113-122, 2018, doi: 10.1016/j.cmpb.2018.01.025