COMP: Bump ANTs to current master + disable TractographyTRX for ITK6 compat#17
Open
hjmjohnson wants to merge 1 commit into
Open
COMP: Bump ANTs to current master + disable TractographyTRX for ITK6 compat#17hjmjohnson wants to merge 1 commit into
hjmjohnson wants to merge 1 commit into
Conversation
…compat
Bump Slicer_ants_GIT_TAG from 8c4e2077 (2024-09-10) to ad0e6a1d (current
ANTsX/ANTs master).
The newer ANTs source adds an explicit `#include <itkImageRegionIteratorWithIndex.h>`
in `Utilities/itkSurfaceImageCurvature.{h,hxx}`, which is required when building
against ITK upstream main (v6 prep) where the transitive include chain has been
trimmed. The include is harmless under ITK 5.x (the header has always existed),
so the change is backward compatible.
Also disable the new `USE_TractographyTRX` option (default ON in ANTs upstream).
The TRX-tractography apps require the Module_TractographyTRX ITK module plus
trx_cpp, which are not part of Slicer's ITK build. With this option OFF, the
TRX example apps (PrintTRXHeader, antsApplyTransformsToTRX) are excluded from
the build.
Verified to compile against:
- ITK upstream main (InsightSoftwareConsortium/ITK @ 59176b1d + opt-in
itkNamespace.h shim, used by Slicer/ITK fork) with
ITK_FUTURE_LEGACY_REMOVE=ON, Qt 6.8.2, gcc 13.3.
- (ITK 5.4.6 verification pending separate dual-target dashboard.)
Author
|
@simonoxen FYI: Preparing Slicer for ITKv6 additions. ANTs has supported ITKv6 for quite a while. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bump
Slicer_ants_GIT_TAGto currentANTsX/ANTsmaster and disable the newUSE_TractographyTRXoption so SlicerANTs builds against ITK upstream main (v6 prep) and stays buildable against ITK 5.x.Why this is needed
ITK upstream main (in preparation for v6) has trimmed transitive includes. With the previously-pinned ANTs
8c4e2077(2024-09-10), the fileUtilities/itkSurfaceImageCurvature.{h,hxx}usesitk::ImageRegionIteratorWithIndexwithout an explicit#include <itkImageRegionIteratorWithIndex.h>. Under ITK main this fails with 48 errors:The fix is already in
ANTsX/ANTsmaster (Utilities/itkSurfaceImageCurvature.hnow#includes the iterator header directly). Bumping the pin pulls it in.The newer ANTs also adds an
antsApplyTransformsToTRX/PrintTRXHeaderexample app that requires theModule_TractographyTRXITK module plus atrx_cppexternal dependency, both of which aren't present in Slicer's ITK build. Disabling them via-DUSE_TractographyTRX:BOOL=OFFkeeps the rest of ANTs building.Backward compatibility
#include <itkImageRegionIteratorWithIndex.h>initkSurfaceImageCurvature.hmakes explicit a transitive include that already worked under ITK 5.x — harmless on the older toolchain.-DUSE_TractographyTRX:BOOL=OFFis a no-op against the previous ANTs pin (the option didn't exist there).SuperBuild.cmakeusesset(ITK_EXTERNAL_NAME ITKv${ITK_VERSION_MAJOR})— explicitly supporting both ITK 5 and 6.Verified
Compiled clean against Slicer host built with:
Slicer/ITKbranchslicer-upstream-main-namespace-2026-05-10(=InsightSoftwareConsortium/ITKmain59176b1d+ 1 commit: opt-initkNamespace.hshim)ITK_FUTURE_LEGACY_REMOVE=ONProduces:
bin/antsRegistrationlib/Slicer-5.11/cli-modules/libantsRegistrationCLILib.solib/Slicer-5.11/libl_antsRegistration.solib/Slicer-5.11/libl_antsApplyTransforms.solib/Slicer-5.11/libantsUtilities.soITK 5.4.6 verification is queued through a dual-target dashboard
(
make extensions-itk546 extensions-itk-mainagainst theSlicer/ExtensionsIndexcatalog) — will report results back to this PR if any change is required.
Tracking
Part of the broader Slicer ITK6 transition effort tracked at
Slicer/Slicer#9149.