Announcement
SimpleITK 2.0 has been released! This major version update to SimpleITK includes updating to ITK version 5, significant code improvements, performance enhancements, and API changes.
Installing SimpleITK
Complete instructions on getting started with SimpleITK including downloading binaries or building SimpleITK can be found on the SimpleITK Read the Docs web page.
Python Binary Downloads
- Python binary wheels are available for download from PyPI. It is important to have the latest version of pip for correct wheel compatibility and installation. To install the latest SimpleITK package:
python -m pip install --upgrade pip
python -m pip install SimpleITK
Anaconda Binary Downloads
Conda packages are available from Anaconda Cloud on the SimpleITK channel. These can be installed with:
conda install -c simple simpleitk
2.0 Documentation
To learn more about SimpleITK go to simpleitk.org.
Highlights
- Now using ITK version 5.1 with all the new improvements from ITKv5!
- 5D
Imagesupport for improved support of time series, and multi-channel images commonly used in microscopy.- The default and distributed configurations now support image dimensions from 2 to 5 dimensions. The following filters are also instantiated in 4 and 5 dimensions:
ExtractImageFilter,JoinSeriesImageFilter,PasteImageFilter,HashImageFilter,ImageFileReader,ImageFileWriter,ImageSeriesWriter.
- The default and distributed configurations now support image dimensions from 2 to 5 dimensions. The following filters are also instantiated in 4 and 5 dimensions:
- Python’s Image class has improved set item for assignment operations with a slice indexed sub-region on the left hand side. Also assignment of a constant value to a sub-region is supported.
- Please see the Slice by Slice example for details.
- Python pickling of
ImageandTransformclasses. Please note this is designed for operations such as interprocess communications; the standard ITK IO formats should be used as portable storage formats. - The
Showprocedure calls theImageViewerclass interface which utilizes the class’s defaults and configuration. - Modernization of C++ code base with C++11, and clang tidy
- In C++, temporary images or Rvalue References as arguments automatically enable filters to execute “in-place”.
- Please see the In Place example for details.
Release Notes
API and Compatibility Changes
-
The environment variables related to the
Showprocedure are only checked once. TheShowmethod now is a wrapper for theImageViewerclass, and the behavior changed. TheSITK_SHOW_EXTENSIONandSITK_SHOW_COMMANDenvironment variables if defined initialize the corresponding global defaults only the first time accessed. The environment variablesSITK_COLOR_COMMANDandSITK_SHOW_3D_COMMANDare removed as theImageViewerclass allows for direct configuration of the command. -
Remove from all filters the
Executemethod with filter parameters as arguments. TheExecutemethod with the input images remains. -
Remove
AddTrialPointsandClearTrialPointsmethods fromFastMarchingImageFilterdue to consolidation of code generation templates. -
With Java wrapped
Vectortypes whose C++ element type is an unsigned integer, the wrapped element type changed to the next larger Java signed integer type ( see 618d89 ). -
Removed procedural methods taking scalar radius from the following ( see 444f9a ):
- BinaryClosingByReconstruction
- BinaryDilate
- BinaryErode
- BinaryMorphologicalClosing
- BinaryMorphologicalOpening
- BinaryOpeningByReconstruction
- BlackTopHat
- ClosingByReconstruction
- DilateObjectMorphology
- ErodeObjectMorphology
- GrayscaleDilate
- GrayscaleErode
- GrayscaleMorphologicalClosing
- GrayscaleMorphologicalOpening
- MorphologicalGradient
- OpeningByReconstruction
- WhiteTopHat
-
Dropped Python 3.4 support due to end of life.
-
Remove the
sitk::ImageFiltertemplate parameter because it is no longer utilized. -
The Python installation command using
setup.pychanged with the location ofsetup.py. To install see updated Sphinx documentation. -
Remove
Transform::AddTransformandTransform::FlattenTransformmethods. Use theCompositeTransformclass.
New Features
-
Rewrote
Showto useImageViewerclass. -
For ImageViewer add user’s Application folder to search path.
-
Use
NPasteImageFilterfrom the SimpleITKFilters remote ITK module to replacePasteImageFilter. -
Add to SimpleITK’s
PasteImageFilter:-
DestinationSkipAxesparameter - Support for pasting lower dimension to higher dimension image e.g 2D slice into 3D volume
- Ability to use a constant value as input instead of image
-
-
Add method to
ImageFileReader::GetImageIOFromFileNameget the ITK ImageIO automatically used for file. -
Update superbuild Swig version to 4.0.2. SWIG >= 4 is now required.
-
Update ITK version to 5.1.1.
-
Disable ITK 4 legacy behaviors.
-
Add
SignedDanielssonDistanceMapImageFilter::GetVoronoiMapmethod. -
Add wrapping for
CannySegmentationLevelSetImageFilter. -
Update levelset segmentation filters to support named inputs.
-
Add 4D support to
SliceImageFilterand to the Python slice indexing. -
Add complex pixel support to
Image::GetBufferAs...methods. -
Add wrapping for
BinaryPruningImageFilter. -
Add per label measurements to
LabelOverlapMeasuresImageFilter. -
ResampleImageFilteradd option to use nearest neighbor extrapolation. -
Add
ReturnBinMidPointparameter toOtsuThresholdImageFilter. Defaults to false which may change results. -
Add support to specify compression level and compression algorithm to
ImageFileWriterandImageSeriesWriterclasses. -
BSplineTransformPython support construction andSetCoefficientImagewith list-like series of Images. -
MeanImageFilterdirectly filters vector images, improving performance. -
Add to
LabelShapeStatisticsImageFilterper label methodGetIndexesandGetRLEIndexes. -
Add
Image::IsUniquemethod. -
Add wrapping for
DICOMOrientImageFilter. -
Add complex pixel type support to
GetBufferAsmethods. -
Improve checking and error messages when
Imageinputs require the dimensions, sizes or pixel types to match. -
Add
LevelSetMotionRegistrationImageFilter::InitialDisplacementFieldmethod. -
Refactor of the template code generation system to enable numerous new features and C++ style enhancements.
-
Add boolean
in_placefield to all JSON filter descriptions. -
Add C++ automatic “in place” ITK filter execution with r-value image input.
-
Add C++
Imageoperators with automatic in-place filter execution with r-valueImageclasses. -
Use native SWIG/R enumeration support.
-
Add named filter inputs to morphological reconstruction image filters.
-
Replace the CMake configuration option of “SimpleITK_4D_IMAGE” with “SimpleITK_MAX_DIMENSION”
-
Default configuration now include 5D Image support.
-
The following filters support up to “SimpleITK_MAX_DIMENSION”:
- ExtractImageFilter
- JoinSeriesImageFilter
- PasteImageFilter
- HashImageFilter
- ImageFileReader
- ImageFileWriter and ImageSeriesWriter
-
Refactored MemberFunctionFactory’s hashing function.
-
Add
ExtractImageFiltersupport to extract an abitrary dimension e.g. 3D image from 5D image. -
Add
sitkScaleVersorenum. -
Add
Transform::GetTransfromEnummethod. -
Add
CompositeTransformclass. -
Update to ITKv5 threading model behaviors for the following
ProcessObjectmethods:-
SetGlobalDefaultThreaderandGetGlobalDefaultThreader -
SetGlobalDefaultNumberOfThreadsandGetGlobalDefaultNumberOfThreads -
SetNumberOfWorkUnitsandGetNumberOfWorkUnits
-
Python
- Add custom Python procedures for
DiscreteGaussian,SmoothingRecursiveGaussian,ReadImageandWriteImageto support keyword arguments. - Add to the
WriteImagePython procedure the keyword only argumentsimageIOandcompressor. - Add Python
__setitem__for [] operator support:- assignment constant to a sliced indexed region
- assignment of lower dimension image to matching sliced indexed region
- Add Python support for complex pixels to
GetArrayFromImage,GetImageFromArrayandGetArrayViewFromImagemethods. - Add Python deepcopy support to
Imageclass, ensuring the copy is unique with lazy copying implementation. - Add Python pickling support for
ImageandTransformclasses. - Add Python keyword argument support for
Resampleprocedure. - Improve Python
Imageclass’s in-place operators to use C++ in-place operators. - Improve Python keyword arguments for procedural methods due to removal of overloaded methods.
- Add Python slice indexing for arbitrary dimension extracting.
- Add Python
__setitem__support for assigning sub-regions via the PasteImageFilter. - Refactor Python SWIG code to separate classes and add Python code as modules.
- Add Python
Transform.Downcastmethod. - Applied PEP 8 style to Python examples.
CSharp
- Add C# constant image buffer access methods of the form
GetConstBufferAs....
Bug Fixes
-
Fix the
ImageRegistrationMethodexception to useGetPixelIDTypeAsString -
Update
ndarray.tostringtotobyte(tostringdeprecated in numpy 1.19.0 ) -
Add missing deepcopy implementation for Image with RLE “Label” pixel types.
-
Fixed Python pickling for missed transform classes.
-
Refactored
GetImageFromVectormethod to retain reference to original container with a command object. Fixing image buffer aliasing withBSplineTransformandDisplacementFieldTransform. -
Make
TranslationTransformconversion constructor explicit. -
Remove implicit conversion from
ImagetoTransformclass. -
Update
StatisticsImageFilterinput convention for ITKv5. -
Remove
WarpImageFiltermatching image size requirement. -
The results of the
LiThresholdImageFilterchanges with ITK, baseline test results were updated. ( See ITK commit e3ce37 for details. ) -
Add additional baseline images for registration results, due to change in ImageRegistration’s smoothing algorithm. ( See ITK commit 569a47 for details. )
-
Correct
LabelShapeStatisticsbaseline forOrientedBoundingBoxVerticesresults. ( See ITK commit 50c695 for details. ) -
Fix potential double memory free of pixel container in results from internal image to vector image conversions.
-
Fix
RelabelComponentImageFilterincorrect object size computation with sorting enabled. ( See ITK commit 162101 for details. ) -
Fix potential ITK pipeline execution error when a filter execute on a vector image by per component.
-
Add C++11 move semantics support to the Image class.
-
Add direct support for C++11 lambda command to the
ProcessObjectclass. -
Add
GetBufferAsVoidmethod to the Image class. -
Add
Decayparameter to theMirrorPadImageFilter.
Documentation
-
Update doc strings for Python and JAVA from JSON filter descriptions.
-
Update examples to use slice based assignment instead of
PasteImageFilter. -
Update the tutorials page.
-
Update FAQ.
-
Improve
WriteImageDoxygen documentation. -
Update RTD
Showprocedure documentation. -
Add custom HTML Doxygen header with dynamic timestamp insertion, and privacy policy.
-
Add procedural example to IO page.
-
Updating the main Doxygen page.
-
Update Sphinx filter list.
-
Add example for reading raw image files.
-
Add DICOM series writing example with floating point pixels.
-
Add FAQ entry for the differences between ITK and SimpleITK.
-
Rename Sphinx “installation” page to “getting started”.
-
Update examples from using scalar radius to vector.
-
Use Doxygen interactive SVG output, and enable client side MathJax for Latex rendering.
-
Add C++ CMake example for using SimpleITK.
-
Update examples to use
CompositeTransform. -
Update copyright to NumFOCUS.
-
Add casting to N4BiasFieldCorrection example.
-
Typo fixes.
-
Create Docker images for generating Doxygen.
-
Add C#
ConnectedThresholdSegmentationexample. -
Remove references to next branch in documentation.
-
Update R installation instructions.
-
Add C#
ImageReistrationMethod2example. -
Add multi-lingual examples for
FastMarchingSegmentationImageFilter. -
Uset stopping time parameter in
FastMarchingSegmentationexamples. -
Add C#
CannySegmentationLevelSetImageFilterexample. -
Improve documentation to
GetImageFromArrayaboutisVectorparameter. -
Update referenced tutorials.
-
Add acknowledgment section to readme.
-
Update Java and CSharp installation instructions.
-
Move Doxygen pages to Sphinx documents, remove other out dated pages.
-
Move Sphinx documentation to docs directory.
Compilation
-
Address signed to unsigned comparison compiler warnings.
-
Fix
PYTHON_EXECUTABLEbeing undefined in CMake for Doxygen. -
Add Doxygen MathJAX URL as CMake option.
-
Continue to address compilation warnings.
-
Pin Sphinx version for Read-The-Docs.
-
Remove EXPORT specification for static member function declaration.
-
Support pass TBB_DIR to ITK in the Superbuild.
-
Require C++11 standard for compilation.
-
Replace C++ tr1 usage with standard C++11 classes.
-
Replace compiler depended defines with C++11 keywords.
-
Prefer using C++11 lambda over
std::bindwhenstd::placeholdersare not needed. -
Improve support on OSX for isysroot flag and
CMAKE_OSX_SYSROOTvariable. -
Support additional
CMAKE_GENERATOR_*,CMAKE_VS_PLATFORM_TOOLSET_*variables is superbuild. -
Added AWS S3 buckets for data mirroring.
-
Use SHA512 hash files as index for downloaded source code.
-
Use CMake for creating zip archives.
-
Improve finding of Lua interpreter.
-
Update Lua superbuild version to 5.3.5, require Lua version 5.2 or 5.3 for code generation.
-
Update PCRE superbuild version to 8.43.
-
Add
USE_CCACHEcmake option to automatically use ccache as launcher if available. -
Enable GNU gold linker by default if available.
-
Update GTest vesrion to 1.10.0 in superbuild.
-
Fix incorrect version of virtualenv detected.
Miscellaneous
- Update SimpleITK logo.
- Test the
ImageViewerclass andShowprocedure. - Update and add more testing for Python
ImageReadandImageWriteprocedures. - Prefer using absolute imports in Python.
- Updates to manylinux Dockerfile including updating CMake and openssl versions.
- Write testing output with compression enabled.
- Use C++11
nullptrover NULL. - Update classes to use C++11 inline class initializaton.
- Use C++11 default class constructors.
- Use C++11 type alias over typedefs.
- Use clang-tidy to improve code with:
- modernize-redundant-void-arg
- modernize-use-equals-default
- modernize-use-override
- modernize-use-emplace
- readability-container-size-empty
- Continuing updates and improvements to the testing, build and packaging infrastructure.
- Update set parameter methods to use std::vector by value with C++ std::move internally.
- Add CI for running flake8.
- Continuing updates and improvements to the testing, build and packaging infrastructure.
- Add tolerance for testing BSpline domains.
- Update setup for development scripts to support github workflows.
- Add Insight Software Consortium Code of Conduct.
- Archive SHA512 in distributed data archive.
- Disable ITK’s automatic advanced architecture compilation settings in packaging builds.