COMP: Use itk::IOComponentEnum and include vnl_svd.h for ITK 6 - #1294
Open
hjmjohnson wants to merge 1 commit into
Open
hjmjohnson wants to merge 1 commit into
hjmjohnson wants to merge 1 commit into
Conversation
ITK removes itk::ImageIOBase::IOComponentType when ITK_LEGACY_REMOVE is ON, which ITK forces whenever it is built with wrapping enabled. The namespace-scope itk::IOComponentEnum is present in both ITK 5.4 and ITK 6, so this spelling builds against either. vtkPlusProbeCalibrationOptimizerAlgo used vnl_svd without including it, relying on an ITK header to pull it in transitively; ITK 6 no longer does. Include it directly.
hjmjohnson
marked this pull request as ready for review
September 16, 2026 15:01
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.
Builds PlusLib against an ITK 6 that has
ITK_LEGACY_REMOVEon. Two changes, both valid on ITK 5.4 as well. Continues the ITK 6 compatibility work in #1279, #1280, #1282, and #1283.What breaks and why
itk::ImageIOBase::IOComponentTypeis a legacy alias, compiled out whenITK_LEGACY_REMOVEis defined. ITK declares that option asso any ITK built with wrapping enabled forces it ON, and the alias disappears.
itk::IOComponentEnumis the namespace-scope name; it exists in ITK 5.4 andITK 6 alike, aliasing
CommonEnums::IOComponent.vnl_svdwas used invtkPlusProbeCalibrationOptimizerAlgo.cxxwithoutincluding its header; it arrived transitively through an ITK header. ITK 6
trimmed those includes, so the file now includes
<vnl/algo/vnl_svd.h>directly.
Verification
Built against ITK
main(6.0.0.20260907) withITK_WRAP_PYTHON=ON, VTK 9.6,macOS arm64: 0 failed targets, 10 libraries.
Before the change the same tree failed 16 compiles, all on the removed alias,
then 1 on the missing
vnl_svdinclude.Not built against ITK 5.4 here, but
itk::IOComponentEnumis present in thatrelease and an explicit include is always valid, so neither change is
version-specific.
🤖 Generated with Claude Code
https://claude.ai/code/session_01S5zzoU6yyUwdLEvjM2s6iS