Repository navigation
We are pleased to announce the release of ITK 5.4.8!
ITK 5.4.8 is a maintenance release for this cross-platform, open-source toolkit for N-dimensional scientific image analysis with spatially-aware algorithms. This release focuses on correctness, concurrency, and compatibility. It removes a MetaIO deadlock that could stall heavily multithreaded reads, fixes DICOM series geometry when slice spacing is negative, and corrects pixel-type, codec, and endianness handling across HDF5, TIFF, and MATLAB IO. On the Python side, BSplineTransform is now wrapped for 2D and 4D, a double-free at interpreter shutdown is fixed, and the Windows wrapping build works with std::unique_ptr arguments again. 🥳
🔦 Highlights
- Concurrency and Image IO:
- MetaImage (
.mha/.mhd) reads no longer call a process-widefflush(nullptr), which could deadlock or stall concurrent reads, especially on macOS. - DICOM series with negative inter-slice spacing, for example when using the series reader's
ReverseOrderflag, now get the correct direction-cosine sign and keep their physical location. A new GoogleTest suite with more than 800 lines covers series direction handling. HDF5ImageIOnow reports aVECTORpixel type when it infers multiple components, which fixes SimpleITK "Unknown PixelType" errors when reading vector images back.- TIFF
ReadImageInformation()now succeeds for files that use a compression codec ITK was not built with. The error is raised inRead()instead, where decoding actually happens. - VNL's MATLAB header reader now recognizes native big-endian single-precision files, so
MatlabTransformIOandTxtTransformIOread them correctly on big-endian hosts.
- MetaImage (
- Transforms:
AzimuthElevationToCartesianTransform::IsLinear()now returnsfalse, so code no longer reduces this nonlinear transform to an incorrect matrix and offset.- Python
dict_from_transformnow recurses into nestedCompositeTransformchildren, so their transforms are no longer dropped. - A possible undefined-behavior case in
Transform::ApplyToImageMetadatais fixed.
- Python Wrapping:
BSplineTransformis now wrapped for the 2D→2D and 4D→4D cases.GradientImageFilter::OverrideBoundaryConditionandOptimizerParameters::SetHelpernow transfer ownership correctly, which removes a double-free at interpreter shutdown.- MSVC builds now pass
/Zc:__cpluspluswhen compiling SWIG wrappers, which restoresstd::movesupport for wrapped methods that takestd::unique_ptrarguments.
- Build and Platform Support:
- VtkGlue builds against VTK 9.7 and later with
VTK_USE_FUTURE_CONST. - Mangled libpng ARM NEON filter-row symbols prevent symbol clashes on ARM.
- Module Doxygen cross-references use
@ref, which silences the CMake 4.4CMP0219policy warning. - The
ObjectFactoryautoload entry-point name is now configurable throughITK_LOAD_FUNCTION_NAME, which supports builds that rename ITK's symbols. - Remote-module pins were updated toward convergence with
main, and release-5.4 stays buildable for SimpleITK.
- VtkGlue builds against VTK 9.7 and later with
- Reliability:
- Non-const image iterators now call the non-const
GetBufferPointer(), so image types such asCudaImageare notified of writes. - Six registration and overlap tests now return their helper's status. Previously they always returned success and hid 13 failure returns and 31
ITK_TEST_*assertions. - Repository safety-net pre-commit hooks are now enabled on release-5.4, along with cleanup of whitespace, end-of-file newlines, and Python shebangs.
- Non-const image iterators now call the non-const
🧵 Faster, Deadlock-Free Concurrent MetaIO Reads
MetaObject::ReadStream() and MetaForm::ReadStream() called fflush(nullptr) before parsing. This was left over from the original MetaIO code and predates multithreading. fflush(NULL) flushes every open FILE* stream in the process, and on platforms such as macOS it locks each stream in turn. When many threads opened and read their own MetaImage files, these global flushes competed for every other thread's file handles. Concurrent reads could then slow to a halt indefinitely.
Reading does not require flushing previously written data, so ITK 5.4.8 removes the call. Applications that load many MetaImage files in parallel, such as data loaders for deep-learning training, should see reliable concurrent throughput.
🧭 Correct DICOM Series Geometry with Negative Spacing
When the spacing between DICOM slices was negative, the direction-cosine matrix had the wrong sign along the slice axis. This was easy to trigger with the series reader's ReverseOrder flag. ITK 5.4.8 corrects the sign, so a DICOM series keeps its correct physical location whatever the slice order. A new regression suite, itkGDCMSeriesDirectionGTest, exercises a wide range of series orientations and orderings to guard against future regressions.
🐍 More Robust Python Wrapping
itk.BSplineTransformnow offers[double, 2, 3]and[double, 4, 3]alongside the existing 3D instantiation, which enables Python B-spline registration workflows for 2D and 4D images.- Two methods store their raw-pointer argument in a
std::unique_ptrmember, but Python kept ownership too, so both sides freed the object. These methods now use SWIGDISOWNsemantics, and new Python regression tests cover them. - MSVC reports
__cplusplusas199711Lunless/Zc:__cplusplusis set, which made SWIG quietly turnstd::move(x)into a copy. With the flag set on wrapper sources only, the Windows Python wrapping build compiles again, and ITK's own build flags are unchanged.
💾 Download
Python Packages
Install ITK Python packages with:
pip install --upgrade itkGuide and Textbook
Library Sources
Testing Data
Unpack optional testing data in the same directory where the Library Source is unpacked.
Checksums and Signatures
🙏 Acknowledgments
Thank you to contributors Axel Garcia, Bradley Lowekamp, Dženan Zukić, Hans J. Johnson, Matt McCormick, Sean McBride, Simon Rit, Valentin Boussot, and the broader ITK community for their code, testing, review, and documentation efforts.
🗣️ What's Next
ITK 6 Release Candidate
Following the ITK 6 alpha and beta releases, the ITK 6 release candidate is coming. ITK 6 advances the toolkit with:
- Architectural upgrades for contemporary C++ development
- Enhanced template metaprogramming capabilities
- Code modernization for improved readability and maintainability
- A modernized Python platform and wrapping foundation
Many of the fixes in this release were first developed on main for ITK 6 and then backported. We encourage you to test the upcoming release candidate with your applications and report issues on the ITK issue tracker.
5.4 Maintenance Commitment
We remain dedicated to supporting current users through:
- Regular security and regression patches
- Critical bug resolution
- Platform compatibility updates
Enjoy ITK!
ITK Changes Since v5.4.7
Bradley Lowekamp (6):
Enhancements
- Add an empty
.pre-commit-config.yamlfor release-5.4 (f42c5d9951)
Bug Fixes
- Fix case where DICOM series order has negative spacing (4925e7e209)
- Set
VECTORpixel type inHDF5ImageIOwhen inferring components (f087aeb9b6) - Let
ReadImageInformationsucceed for unconfigured TIFF codecs (1e95ccb8e4) - Remove unnecessary global
fflush(nullptr)causing MetaIO read deadlocks (183f3942e3)
Platform Fixes
- Restore the SimpleITKFilters remote-module pin on release-5.4 (bc26367adb)
Dženan Zukić (3):
Enhancements
- Wrap
BSplineTransformfor the 2D-2D and 4D-4D cases (6784ad458a)
Bug Fixes
- Fix possible undefined behavior in
Transform::ApplyToImageMetadata(1f6d811db5) - Fix
SetDatainvoked with wrong parameter types initkArrayTest(efe9aad60a)
Hans J. Johnson (22):
Enhancements
- Add an extensive regression suite for the DICOM series direction-cosine fix (447711c824)
- Cover the double-precision MATLAB header codes (247335a8e0)
- Configure the
ObjectFactoryautoload symbol name (423c834b8c)
Bug Fixes
- Recognize native big-endian single-precision MATLAB headers (65e1960182)
- Disown Python objects adopted by
unique_ptrmembers (0c0db75098) - Adapt VtkGlue extent callback to the VTK future-const signature (ecbc0bcad7)
- Correct the superclass asserted for
LabelOverlapMeasuresImageFilter(bcbac10fc9) - Propagate helper status in six registration and overlap tests (f5d420e739)
Platform Fixes
- Pass
/Zc:__cpluspluswhen compiling SWIG wrappers with MSVC (5777f01403) - Mangle libpng ARM NEON filter-row symbols (219bc36b89)
- Use
@reffor module Doxygen cross-references to silenceCMP0219(abb288f750) - Update remote-module pins toward buildable convergence with
main(34853cf1ca) - Enable the pre-commit-hooks safety nets on release-5.4 (8e423c5c99)
Style
- Remove trailing whitespace (512a30dfe0)
- Add missing end-of-file newlines (6a98444503)
- Replace hardcoded
/usr/bin/pythonshebangs withenv python3(a962191781) - Use
python3in env shebangs (a4938eb6e2) - Correct the
VNL_ModernizeNaming.pyenv path (8487393757) - Give
VCL_ModernizeNaming.pya resolvable shebang (7c2f712e74) - Mark
VCL_ModernizeNaming.pyexecutable to match its shebang (37bf0fbedf) - Pin a GitHub link to a commit so it survives branch movement (27c1809028)
- Remove the unused StripIncludes header-stripping scripts (ca38b5bb21)
Matt McCormick (3):
Enhancements
- Bump ITK version to 5.4.8 (f347184006)
Documentation Updates
- Add 5.4.6 release notes (500ec91161)
- Add 5.4.7 release notes (7fefad582b)
Sean McBride (1):
Platform Fixes
- Fix build compatibility with VTK < 9.7 and
VTK_FUTURE_CONST(11fb8e8416)
Simon Rit (1):
Bug Fixes
- Call non-const
GetBufferPointer()in non-const image iterators (626e9a3437)
Valentin Boussot (2):
Bug Fixes
- Return
falsefromAzimuthElevationToCartesianTransform::IsLinear()(074ec1e099) - Recurse into nested
CompositeTransformchildren indict_from_transform(e2f9a82c93)
ITK Python Package Changes
Axel Garcia (1):
Bug Fixes
- Avoid re-extracting the ITK build cache for module dependencies (84c6c7fbdc)