COMP: Build against ITK 6 - #7
Open
hjmjohnson wants to merge 4 commits into
Open
hjmjohnson wants to merge 4 commits into
hjmjohnson wants to merge 4 commits into
Conversation
hjmjohnson
marked this pull request as ready for review
September 22, 2026 16:05
Four changes, all of which keep the module building against ITK 5.4 as well. ITK 6 turns ITK_DISALLOW_COPY_AND_ASSIGN into a static assertion asking for ITK_DISALLOW_COPY_AND_MOVE, which ITK 5.4 defines as well. Three itkExceptionMacro and itkGetConstObjectMacro invocations were written without a terminating semicolon. The ITK 6 expansions end in a declaration rather than a statement, so the semicolon is now required. The example read the module's own headers, which only reach the compiler by accident when the module is built inside an ITK source tree. Name the include directory on the target so the example also builds against an installed ITK. The packaged wheel pinned itk == 5.4.*, which would make it uninstallable against the ITK 6 it now also builds against. Open the floor to itk >= 5.4.
Every source file's line 9 read http://www.apache.org, one letter short of the https:// KWStyle's ITKHeader.h template requires, so TrimmedPointSetRegistrationKWStyleTest failed on every file. Present since the module's initial commit.
The last bullet in the TODO list used three leading spaces where every sibling used two, so docutils read it as starting a new nested list with no closing blank line. twine check failed the wheel on every platform with "Bullet list ends without a blank line; unexpected unindent."
hjmjohnson
force-pushed
the
itk6-compat
branch
from
September 24, 2026 14:52
8b3e523 to
c2e70aa
Compare
MSVC's C4018 flagged four of these as build warnings, which ci_completed_successfully treats as fatal; the other three compile without warning here but are the identical mismatch and would surface the same way once the reported ones are fixed. All eight loop indices now match the unsigned type they are compared against.
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.
Build against ITK 6 while keeping ITK 5.4:
ITK_DISALLOW_COPY_AND_MOVE, terminating semicolons on threeitkExceptionMacro/itkGetConstObjectMacroinvocations (the ITK 6 expansions end in a declaration), and the module's include directory on the example target so it builds outside an ITK source tree.Verification
Configured with
ITK_DIRpointing at an installed ITK 6 tree (upstreammainas of 2026-09-22,ITK_WRAP_PYTHON=ON), built the module and its Python wrapping, and imported the wrapped module from Python. The module still builds against ITK 5.4.