SimpleITK is a simplified, open-source interface to the Insight Segmentation and Registration Toolkit. The SimpleITK image analysis library is available in multiple programming languages including C++, Python, R, Java, C#, Lua, Ruby and Tcl. Binary distributions are available for all three major operating systems. Developed at the National Institutes of Health 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. 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 by using the SimpleITK library in conjunction with modern tools for reproducible computational workflows available in the Python and R 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 . 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 scripting tool for the popular Osirix application, the pyradiomics python package for extracting radiomic features from medical imaging, the 3DSlicer image analysis application, the SimpleElastix medical image registration library, and the NiftyNet deep learning library for medical imaging.
Short Python scripts illustrating image reading, blurring, and writing. Using the object oriented interface: import SimpleITK as sitk import sys if len < 4: print sys.exit reader = sitk.ImageFileReader reader.SetFileName image = reader.Execute pixelID = image.GetPixelID gaussian = sitk.SmoothingRecursiveGaussianImageFilter gaussian.SetSigma image = gaussian.Execute caster = sitk.CastImageFilter caster.SetOutputPixelType image = caster.Execute writer = sitk.ImageFileWriter writer.SetFileName writer.Execute
A more concise version using the procedural interface: import SimpleITK as sitk import sys if len < 4: print sys.exit image = sitk.ReadImage pixelID = image.GetPixelID image = sitk.Cast sitk.WriteImage
Multi-modality Rigid Registration
Short R script illustrating the use of the library's registration framework for rigid registration of two 3D images: library args = commandArgs if fixed_image <- ReadImage moving_image <- ReadImage initial_transform <- CenteredTransformInitializer, "GEOMETRY" ) reg <- ImageRegistrationMethod reg$SetMetricAsMattesMutualInformation reg$SetMetricSamplingStrategy reg$SetMetricSamplingPercentage reg$SetInterpolator reg$SetOptimizerAsGradientDescent reg$SetOptimizerScalesFromPhysicalShift reg$SetInitialTransform final_transform <- reg$Execute WriteTransform