ITK 5.2 Release Candidate 2 available for testing

ITK 5.2 Release Candidate 2 Release Notes

We are happy to announce the Insight Toolkit (ITK) 5.2 Release Candidate 2 is available for testing! :tada: ITK is an open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration.

ITK 5.2 is a feature release that improves and extends interfaces to deep learning, artificial intelligence (AI) libraries, with an emphasis on Project MONAI, the Medical Open Network for AI. ITK 5.2 feature highlights include functional filter support for PyTorch tensors, Python dictionary interfaces to itk.Image metadata, NumPy-based pixel indexing, 4D Python image support, and improved multi-component image support.

Release Candidate 2 makes improvements to these new features, such as 4D Python support and torch tensor support, adds preliminary support for the new Apple M1 ARM64 system, and prepares updates to the ITK Sphinx Examples.

Downloads

Python Packages

Install ITK pre-release binary Python packages with:

pip install --upgrade --pre itk

Library Sources

Testing Data

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

Checksums

Features

MONAI-compatible itk.Image metadata dict and NumPy-indexing pixel set/get Python interfaces.

  print(image['0008|0008'])
  image['origin'] = [4.0, 2.0, 2.0]

or a dictionary can be retrieved with:

  meta_dict = dict(image)

For example:

In [3]: dict(image)
Out[3]:
{'0008|0005': 'ISO IR 100',
 '0008|0008': 'ORIGINAL\\PRIMARY\\AXIAL',
 '0008|0016': '1.2.840.10008.5.1.4.1.1.2',
 '0008|0018': '1.3.12.2.1107.5.8.99.484849.834848.79844848.2001082217554549',
 '0008|0020': '20010822',

For non-string keys, they are passed to the NumPy array view so array views can be set and get with NumPy indexing syntax, e.g.

In [6]: image[0,:2,4] = [5,5]

In [7]: image[0,:4,4:6]
Out[7]:
NDArrayITKBase([[    5,  -997],
                [    5, -1003],
                [ -993,  -999],
                [ -996,  -994]], dtype=int16)

Provides a Python dictionary interface to image metadata, keys are
MetaDataDictionary entries along with ‘origin’, ‘spacing’, and
‘direction’ keys. The later reverse their order to be consistent with
the NumPy array index order resulting from array views of the image.

Python functional filter support for PyTorch tensors

Similar to functional filter support for NumPy ndarray-like images, i.e. a numpy.ndarray, Dask Array or xarray.DataArrays, all itk.Image filters now support execution on PyTorch Tensor's.

For example:

import itk
import torch
import numpy as np

a = np.random.rand(50,50)
t = torch.from_numpy(a)
r = itk.median_image_filter(t)

Pythonic enhancements

itk.Image now provides an astype() method for casting to a NumPy dtype or itk pixel type.

In addition to since filtes or an image stack in a Python list, pass in a directory to itk.imread containing a DICOM series to obtain the appropriately ordered 3D image.

itk.vtk_image_from_image() and itk.image_from_vtk_image() for working with VTK.

We now generate .pyi Python interface files, providing better feedback in integrated development environments (IDE)'s like PyCharm.

Python code was modernized for Python 3.6, including some typehints. We now use the black Python style.

An itk.set_nthreads() convenience function is available to set the default number of threads. Support is now available for use in the Python multiprocessing module.

Python package layout improvements

Python support module organization has been organized into the itk.support.* package.

Python development was added for multi-config CMake generators, e.g. Visual Studio or multi-config Ninja, with the limitation that it only works with the most recently built configuration. When developing ITK Python wrapping or ITK remote modules, copy the WrapITK.pth build tree file to your virtual environment or conda environment site-packages to experiment with the wrapping.

Python package advances

Improved VectorImage and multi-component image support is available in the ITK Python packages.

NumPy is now a required package dependency.

Python packages are now built with interprodedural optimizations (IPO). Linux Python packages are built with the manylinux2014 toolchain.

Python packages are available for Python 3.6 to 3.9. Following CPython deprecation schedule, this is the last release to support Python 3.6.

C++ interface improvements

A new itk::FunctionCommand class is available, an itk::Command subclass that calls a std::function objects or lambda functions.

New itk::ReadImage, itk::WriteImage convenience functions are available for reading and writing image files with minimal code.

An itk::Image now supports operator== and operator!=.

A new itk::TernaryGeneratorImageFilter class is now available.

Third party library updates

Updates were made for the third party libraries:

  • GDCM
  • HDF5
  • double-conversion
  • pygccxml
  • castxml
  • swig
  • VXL
  • KWIML
  • KWSys
  • MetaIO
  • cuFFTW

Remote Module Updates

We added a new adaptive denoising remote module.

Many remote modules were updated: AdaptiveDenoising, AnalyzeObjectLabelMap, AnisotropicDiffusionLBR, BSplineGradient, BioCell, BoneEnhancement, BoneMorphometry, Cuberille, FixedPointInverseDisplacementField, GenericLabelInterpolator, HigherOrderAccurateGradient, IOFDF, IOMeshSTL, IOOpenSlide, IOScanco, IOTransformDCMTK, IsotropicWavelets, LabelErodeDilate, LesionSizingToolkit, MGHIO, MeshNoise, MinimalPathExtraction, Montage, MorphologicalContourInterpolation, MultipleImageIterator, ParabolicMorphology, PerformanceBenchmarking, PhaseSymmetry, PolarTransform, PrincipalComponentsAnalysis, RLEImage, RTK, SCIFIO, SimpleITKFilters, SkullStrip, SmoothingRecursiveYvvGaussianFilter, SplitComponents, Strain, SubdivisionQuadEdgeMeshFilter, TextureFeatures, Thickness3D, TotalVariation, TubeTK, TwoProjectionRegistration, and VariationalRegistration.
Their updates are included in the detailed changelog below.

Support for cross-platform C++ testing, Python package generation, and PyPI deployment with GitHub Actions was added to almost all remote modules.

Test coverage and bug fixes

A multitude of test code coverage improvements were made – our code coverage is now 89.86% with 126,591 lines tested.

Many more bug fixes and improvements have been made. For details, see the changelog below.

Congratulations

Congratulations and thank you to everyone who contributed to this release.

Of the 58 authors who contributed since v5.1.0, we would like to specially recognize the new contributors:

Horea Christian, Baptiste Depalle, David Thompson, Pierre Wargnier, Darren Thompson, Sebastien Brousmiche, Alexander Burchardt, Marco Nolden, Michael Kuczynski, MrTzschr, Bernhard M. Wiedemann, Charles Garraud, Lee Newberg, Bryn Lloyd, Gregory Lee, justbennet, Kenji Tsumura, Zhiyuan Liu, Jonathan Daniel, Moritz Schaar, Atri Bhattacharya, and Mon-ius.

And the new contributors since v5.2rc01:

Michael Jackson, Tom Birdsong, Michael Kuczynski, Alex Domingo, Laurent Malka, and Kris Thielemans.

What’s Next

We anticipate an additional release candidate following community testing before the 5.2.0 release. The following release candidates will improve related documentation and make further improvements. Please try out the current release candidate, and discuss your experiences at discourse.itk.org. Contribute with pull requests, code reviews, and issue discussions in our GitHub Organization.

Enjoy ITK!

ITK Changes Since v5.2rc01

Alex Domingo (1):

Bug Fixes

  • fix python module definition in VtkGlue wrap (5e28b1d05d)

Brad King (1):

Enhancements

  • Update to newer third-party update script from CMake (e0cd16a3c5)

Bradley Lowekamp (6):

Enhancements

  • Update ternary filter wrapping for generator base class (1fd685a12a)
  • Create ITK_DEFAULT_THREADER definition (0cb20b764c)
  • Add ITK_DEFAULT_THREADER as CMake configuration variable. (01183d763a)

Bug Fixes

  • Make OutputWindow instance a global singleton (40ec4c6b1b)
  • Fix JPEG200Test6 file output clobbering (e71e0e2961)

Style Changes

  • Prefer function of direct access of output instance. (3f5974a78c)

Christina Rossmanith (5):

Bug Fixes

  • read data arrays with intent NIFTI_INTENT_NONE for point or cell data (f2b9bc0fed)

Style Changes

Dženan Zukić (4):

Enhancements

  • Python wrapping fixes (dd6f608141)
  • updating remote modules using the script (affd3bb428)
  • supporting multi-channel tensors as inputs and outputs in Python (2cdc2b4026)

Platform Fixes

  • externally built remote module libs went in /lib or C (2be2531e1c)

Jon Haitz Legarreta Gorroño (2):

Enhancements

  • Check input and output image dimensionality matches (1b5c41c2f8)

Bug Fixes

  • Use appropriate dimensionality for image and components weights (0450e4c58f)

KWSys Upstream (1):

Miscellaneous Changes

Kris Thielemans (2):

Platform Fixes

  • Fix linking problems with external HDF5 (51740751a3)
  • use HDF5 targets preferentially if using a system HDF5 (df5f96179a)

Lee Newberg (3):

Enhancements

  • Add “long long” support to itkVTKImageImport (0ffe3e0e21)

Platform Fixes

  • remove warnings for template already defined (0ff09ab468)
  • remove CastImageFilter “template already defined” warnings (b013c717ea)

Mathew Seng (4):

Enhancements

  • Update SpatialObject and SpatialObjectPoint sphinx (c05c06f9d9)

Bug Fixes

  • Incorrect path for Sphinx Examples in Doxygen (22a6f94bc3)
  • Invalid urls to outside sources (e15b8ddf70)
  • Incorrect syntax for doxygen code block (cd61f093d7)

Matt McCormick (16):

Enhancements

  • Add ARM sources to libpng update from upstream script (377c4d009e)
  • Add libpng ARM sources (5a0e6dba71)
  • Generate a list of remote modules changed for release notes (a9b8d22368)
  • Set default dimension for SymmetricEigenAnalysisImageFilter (e262561b33)
  • Support alternate dim orders in image_from_xarray (e2f61927f6)
  • NumPy and XArray conversion for 4D images (211d453670)

Documentation Updates

  • Update macOS Python package Release build instructions (187eee8962)

Platform Fixes

  • Force runtime output with Visual Studio and Python wrapping (a3a8fef888)
  • Add ARM sources to libpng build (3199260db9)

Bug Fixes

  • Set runtime output path for external module binaries (aeae4665d0)
  • Do not assert module swig attribute for init_docstring (78fe087eca)
  • init_docstring with filter instance from the current module (029dd608cb)
  • Wrap MetaDataObject for Array and std (e635884fa5)
  • Test SymmetricEigenAnalysisImageFilter (d085f50ab6)

Style Changes

  • Add SymmetricEigenAnalysisImageFilter (b92944e838)
  • Add SymmetricEigenAnalysisImageFilter (2ebf40002c)

MetaIO Maintainers (1):

Miscellaneous Changes

Michael Jackson (1):

Platform Fixes

  • Detect Apple Silicon arch for Floating Point exceptions (856e237118)

Niels Dekker (3):

Enhancements

  • Array, OptimizerParameters constructors with size and initial value (73ce4ca9dd)
  • Support calling a const NumberToString, add GoogleTest unit tests (f3b3f69453)

Style Changes

  • Reduce buf size, remove builder.Reset() calls from NumberToString (c00531fe23)

Tom Birdsong (5):

Enhancements

  • Python wrapping for v4 optimizers (c5fdc6d2e0)
  • Relocate and test diff demons reg filter Python wrapping (2bac1995ca)
  • Wrap DisplacementFieldTransform for vector floats (c7f0244319)
  • Wrap GradientDescentOptimizerv4 for Python (8b9ec33c22)
  • Wrap CenteredTransformInitializer for template superclass (07ffb8bd8c)

ITK Examples Changes Since v5.2rc01

Mathew Seng (16):

Enhancements

  • Create Vector Dot Product Python Example (e4078190)
  • Create CovariantVector Python example (1ed36c6e)
  • Implement new breathelinkstruct Directive (2c48c45f)
  • Enable Documentation build for GitHub Actions (9fab61d5)

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (fb9b519a)

Bug Fixes

  • ITK runtime directory in PATH for Windows not specified (1d25bf44)
  • Fix various warnings when building documentation (b03f63ec)
  • Incorrect paths to Sphinx Documentation (c0dbf4c3)
  • Ignore Remote in toctree (dca5a2f8)
  • Incorrect path to itk classes (e49d27fc)
  • Fixes warnings for being unable to highlight code block (414af5be)
  • Incorrect bounds for python scripts in documentation (f6597c9d)
  • Fix LineSpatialObject example (070d9d26)

Style Changes

  • Fix spelling errors in documentation (dc0b0d99)
  • Put submodules in alphabetical order (3904cf24)
  • Move LevelSetV4Visualization examples to VTKGlue (eb3aad09)

Tom Birdsong (2):

Enhancements

  • Update ITK CI tags to v5.2rc02 (3e1a0189)

Bug Fixes

  • Disable MutualInformationAffine example (c6dd70ec)

Remote Module Changes Since v5.2rc01

AdaptiveDenoising:

Mathew Seng (2):

Enhancements

  • Update GitHub Actions with changes from ITKModuleTemplate This makes the following changes (a92cb14)
  • Bump package version to 0.2.0 (3a3aedb)

AnalyzeObjectLabelMap:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (5702df6)

BSplineGradient:

Dženan Zukić (1):

Enhancements

  • updating to latest CI config from Module Template (591ac47)

BioCell:

Mathew Seng (1):

Platform Fixes

  • Update CI from ITKModuleTemplate (cb8152c)

BoneEnhancement:

Mathew Seng (1):

Platform Fixes

  • Update CI from ITKModuleTemplate (fcf501f)

BoneMorphometry:

Mathew Seng (2):

Enhancements

  • Integrate GitHub Actions clang This script was pulled from the ITKModuleTemplate. This will verify the clang format for all proposed changes. (459f57b)

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (c56c4ad)

Cuberille:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (0b8efff)

FixedPointInverseDisplacementField:

Mathew Seng (2):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (c7e56bc)

Bug Fixes

  • Remove deprecated CI As the GitHub Actions have been integrated, there is no need for the previous CI for this module. This specifically removes CircleCI, Appveyor and Travis CI. (02fe433)

GenericLabelInterpolator:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (fc8bdcb)

HigherOrderAccurateGradient:

Dženan Zukić (2):

Enhancements

  • update CI to latest from Module Template (716ec45)

Style Changes

IOFDF:

Mathew Seng (2):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (ac3c663)

Bug Fixes

  • Remove deprecated CI As the GitHub Actions have been integrated, there is no need for the previous CI for this module. This specifically removes CircleCI, Appveyor and Travis CI. (0045c2a)

IOMeshSTL:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (cca3c94)

IOScanco:

Dženan Zukić (3):

Enhancements

  • update CI to latest from Module Template (685b28c)

Platform Fixes

  • update to latest commit from master (61064c0)

Style Changes

  • remove unnecessary space (9764435)

Matt McCormick (2):

Enhancements

  • Bump Python package version to 0.8.0 (b47ab3c)

Bug Fixes

  • Fix itk package version specification (9f1b191)

Michael Kuczynski (1):

Enhancements

  • Convert Images to HU by Default (f6a5a82)

IsotropicWavelets:

Mathew Seng (4):

Platform Fixes

  • Update CI from ITKModuleTemplate (d8c3000)

Bug Fixes

  • Remove already deprecated CI (d21ed36)
  • Fix spelling mistakes throughout (692e72b)

Style Changes

  • Fix clang formatting for several scripts (ba3279c)

LabelErodeDilate:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (c4e295a)

MGHIO:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (efe7906)

MinimalPathExtraction:

Mathew Seng (2):

Enhancements

  • Integrate GitHub Actions clang This script was pulled from the ITKModuleTemplate. This will verify the clang format for all proposed changes. (39bb6b8)

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (95c6570)

Montage:

Dženan Zukić (1):

Enhancements

  • update to latest CI from Module Template (a404101)

MorphologicalContourInterpolation:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (6d14e4e)

MultipleImageIterator:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (0a5cd67)

ParabolicMorphology:

Mathew Seng (3):

Enhancements

  • Integrate GitHub Actions clang This script was pulled from the ITKModuleTemplate. This will verify the clang format for all proposed changes. (7f1a816)

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (92899e0)

Style Changes

  • Adjust to clang format This fixes clang errors thrown from running the newly integrated clang-format-linter.yml (05f53ed)

PerformanceBenchmarking:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (6c94878)

PhaseSymmetry:

Mathew Seng (2):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (324417f)

Bug Fixes

  • Remove deprecated CI As the GitHub Actions have been integrated, there is no need for the previous CI for this module. This specifically removes Azure CI. (0c10070)

PolarTransform:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (b4ac52f)

PrincipalComponentsAnalysis:

Mathew Seng (2):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (0d68f83)

Bug Fixes

  • Remove deprecated CI As the GitHub Actions have been integrated, there is no need for the previous CI for this module. This specifically removes CircleCI, Appveyor and Travis CI. (749f399)

RLEImage:

Dzenan Zukic (1):

Platform Fixes

  • fix Linux compile error (0a885a2)

Dženan Zukić (5):

Enhancements

  • use the latest version of CI from ModuleTemplate (7773480)
  • proper wrapping of ROI filter for RLEImage (73403e9)
  • add testing of Python instantiation of ROI filter for RLEImage (d3b56b6)

Platform Fixes

  • fix wrapping of RLEImage (5e1eba9)

Bug Fixes

  • CleanUp did not compile (6a99edc)

Matt McCormick (2):

Enhancements

  • Add GitHub Actions configuration (d59e79e)

Style Changes

RTK:

Laurent Malka (2):

Enhancements

  • fix export macros usage to match ITK rules (9223e672)

Platform Fixes

  • Fix DbfField and DbfFile files export warning (1a9baecf)

Simon Rit (1):

Miscellaneous Changes

SCIFIO:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (549c717)

SkullStrip:

Mathew Seng (1):

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (0ac38b2)

SplitComponents:

Dženan Zukić (2):

Enhancements

  • update to latest CI from Module Template (7d6adbf)
  • fix the wrapping (f992cce)

Strain:

Dženan Zukić (2):

Enhancements

  • update from latest ModuleTemplate to use v5.2rc01 (bea0438)
  • update to latest CI from Module Template (fba02d8)

SubdivisionQuadEdgeMeshFilter:

Mathew Seng (1):

Platform Fixes

  • Update CI from ITKModuleTemplate (c7c9692)

TextureFeatures:

Matt McCormick (2):

Enhancements

  • Update CI configuration for ITK 5.2 RC 1 (709da9a)
  • Update Python package version to 3.4.0 (8223197)

TwoProjectionRegistration:

Mathew Seng (2):

Enhancements

  • Integrate GitHub Actions clang This script was pulled from the ITKModuleTemplate. This will verify the clang format for all proposed changes. (90ba898)

Platform Fixes

  • Update GitHub Actions from ITKModuleTemplate (c03be21)
2 Likes