COMP: Fix the FFT tests against ITK 6 with wrapping enabled - #84
Merged
hjmjohnson merged 2 commits intoSep 16, 2026
Merged
hjmjohnson merged 2 commits into
hjmjohnson merged 2 commits into
Conversation
itkVnlComplexToComplex1DFFTImageFilter is now a deprecated shim guarded by ITK_LEGACY_REMOVE / ITK_FUTURE_LEGACY_REMOVE, and ITK forces ITK_LEGACY_REMOVE on whenever it is built with wrapping enabled (cmake_dependent_option ... "NOT ITK_WRAPPING" ON). The factory test then fails to compile: no template named VnlComplexToComplex1DFFTImageFilter. The shim routes to PocketFFTComplexToComplex1DFFTImageFilter, ITK 6's default 1D backend, so name that directly. ITK 5.4 has no PocketFFT header, hence the version guard.
itk.Forward1DFFTImageFilter[real_image_type] raises TemplateTypeError: itkForward1DFFTImageFilter.wrap wraps input and output (itkForward1DFFTImageFilterIF3ICF3), and itkInverse1DFFTImageFilter.wrap does the same. Both declare it that way in ITK 5.4 and ITK 6 alike, so the single-argument lookup never matched. Pass both arguments, as the ForwardFFTImageFilter and InverseFFTImageFilter entries in the same list already do.
hjmjohnson
marked this pull request as ready for review
September 16, 2026 19:16
dzenanz
approved these changes
Sep 16, 2026
hjmjohnson
merged commit Sep 16, 2026
d2b991b
into
InsightSoftwareConsortium:main
10 of 13 checks passed
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.
Fixes two test failures against ITK 6 built with wrapping enabled. Both tests fail today; neither change is specific to ITK 6 except where guarded.
1. The factory test used a class ITK compiles out
itkVnlComplexToComplex1DFFTImageFilter.hnow guards its class withand ITK declares
so any ITK built with wrapping forces
ITK_LEGACY_REMOVEon and the classdisappears:
The class is a deprecated shim that routes to
PocketFFTComplexToComplex1DFFTImageFilter, which is ITK 6's documented default1D backend. The test now uses the PocketFFT class under
#if ITK_VERSION_MAJOR >= 6, keeping the Vnl spelling for ITK 5.4, which has noPocketFFT header.
2. The Python test instantiated the 1D filters with one template argument
itkForward1DFFTImageFilter.wrapwraps input and output(
itkForward1DFFTImageFilterIF3ICF3), anditkInverse1DFFTImageFilter.wrapdoesthe same — identically in ITK 5.4 and ITK 6, so this is not a version change.
The two 1D entries now pass both arguments, matching what the neighbouring
ForwardFFTImageFilterandInverseFFTImageFilterentries in the same listalready do.
Verification
Built against ITK
main(6.0.0) withITK_WRAP_PYTHON=ON, VTK 9.6, macOSarm64, Metal backend.
Before these changes the C++ failure stopped the build, so the Python module was
never produced.
🤖 Generated with Claude Code
https://claude.ai/code/session_01S5zzoU6yyUwdLEvjM2s6iS