ITK 5.0 Release Candidate 2: Spatial Object’s

We are happy to announce the Insight Toolkit (ITK) Release Candidate 2! This will be the final release candidate before the 5.0.0 release, and the community is encouraged to adopt 5.0 RC 2 in ITK-based applications.

Python Packages

ITK Python packages can be installed by running:

Library Sources

Testing Data

Unpack optional testing data in the same directory where the Library Source is unpacked.



Image denoising with the new ITKTotalVariation remote module. Left: Transmission electron microscopy image of pectin. Right: Denoised image.

This release features a major upgrade to the ITK Spatial Object framework, led by Stephen Aylward, with contributions from Hastings Greer, Forrest Lee, Niels Dekker, Dženan Zukić, and Hans Johnson. In ITK, a itk::SpatialObject provides a representation of objects and the mechanism to specify their spatial relationship relative to other objects in a scene. Objects can be images but also abstract, parametric entities, such as a ellipse, box, or arrow, or point-based, such as a tube, contour, or surface. Objects can be organized into spatial hierarchies.SpatialObjects are key for model-based registration, integration of segmentation results in multiple formats, conversions to and from images, and capturing spatial relationships between structures.

In ITK 5, the SpatialObject framework was refactored to improve consistency in the the programming interface and simplify implementation and usage. As a result, incorrect or unexpected behaviors are avoided. Complexity and dependency were reduced by removing a dependency on the VNL tree data structures. Additionally, IndexSpace was removed from the API of all SpatialObjects to prevent ambiguity while providing a consistent and intuitive interface. Only two reference spaces are consistently and explicitly available in the API: ObjectSpace and WorldSpace. ObjectSpace is the space local to each object, where the object’s parameters are defined. WorldSpace is the coordinate system defined by the top-level SpatialObject in a hierachy, which is defined by parent-child object relationships. Only two transforms are now consistently and explicitly available in the API: ObjectToParent transform and ObjectToWorld transform. The ObjectToParent transform moves an object within its parent’s ObjectSpace. The ObjectToWorld transform is derived from component ObjectToParent transforms and is provided for convenience and to reduce redundant computations. The API is now more explicit regarding the space that an operation applies to. For instance, IsInside(point) is now IsInsideInObjectSpace(point) or IsInsideInWorldSpace(point). For more information on the SpatialObjects changes, see the ITK 5 Migration Guide.

The Python package synchronization infrastructure for static global variables was refactored to support more variables and permit future additions to the singleton. This will prevent the need to rebuild remote module binary Python packages following future releases of ITK 5. However, current remote module Python packages that use ITK 5 should be rebuilt and republished for ITK 5.0 RC 2.

For an overview of ITK 5’s transition to modern C++, performance-related changes, the new, Pythonic API, the project’s migration to GitHub, and Mesh improvements, see the ITK 5 Alpha 1: Modern C++, ITK 5 Alpha 2: Performance, ITK 5 Beta 1: Pythonic Interface, ITK 5 Beta 3: GitHub and ITK 5 Release Candidate 1: Meshes release announcements.


Tomographic phantom reconstruction with the new Reconstruction Toolkit (RTK) remote module.

New Remote Modules

  • ITKIOScanco: read and write Scanco microCT .isq files.
  • ITKTotalVariation: total variation image denoising.
  • ITKRTK: the Reconstruction Toolkit provides high performance implementations of advanced tomographic image reconstruction algorithms.
  • ITKThickness3D: compute the skeleton and thickness transform from 3D images.

Performance Improvements

  • Add MetaDataDictionary move support.
  • MetaDataDictionary uses copy-on-write.
  • itk::Barrier is now deprecated: replace with the new multi-threading functions.
  • Range-based for loops supported in itk::FixedArray.
  • Major performance improvements to TimeProbe, ResourceProbe constructor (issue #350).


  • Repository README files were migrated to Markdown.


  • Continuous code coverage builds from Azure Pipelines.
  • Better support for unicode in KWSys.
  • itksys::hash_map and itksys::hash_set are deprecated in favor of std equivalents.
  • New GitHub pull request templates and issue templates.
  • New scripts added to update ITK remote modules.


  • itk::SpatialObject framework refactored (see release notes introduction).
  • Initial streaming support added to itk::ResampleImageFilter for linear transforms.

Third Party

  • Eigen 3 updated to the latest version.
  • Better support for building against a system Eigen.
  • GDCM updated to the latest version.
  • HDF5 updated to 1.10.4.
  • ITKVtkGlue support for VTK with VTK_RENDERING_BACKEND set to None.
  • KWSys updated to the latest version.
  • MetaIO updated to the latest version.
  • VXL updated to the latest version.
  • MINC updated to the latest version.


  • Static variable synchronization method refactored; ITK 5 remote module Python packages need to be rebuilt against 5.0 RC 2.
  • Add wrapping for itk.PCAShapeSignedDistanceFunction.
  • Docstrings added to snake case functions.
  • Python tests should now be defined in /wrapping/test/CMakeLists.txt to exclude their definition when wrapping is not enabled.
  • Conversion between ITK matrices and NumPy arrays is now supported.
  • Additional wrapping types for itk.ImageDuplicator.
  • Additional types supported for NumPy <-> ITK Image conversion.
  • Additional wrapping and typemaps for std::vector<itk::Image<...>::Pointer>.
  • Add wrapping for itk.TriangleMeshToBinaryImageFilter.
  • Add wrapping for itk.ExtrapolateImageFunction.
  • Add wrapping for itk.WindowedSincInterpolateImageFunction.

To install the 5.0 Release Candidate 2 Python packages, run

What’s Next

There are many more improvements not mentioned above. For more details, please see the change log below. Congratulations and thank you to everyone who contributed to this release.

The ITK 5 Migration Guide is available to help transition a code base from ITK 4 to ITK 5. Please discuss your experiences on Discourse.

The ITK 5.0.0 final release is scheduled for May.

Enjoy ITK!

Questions or comments are always welcome!