Repository navigation
COMP: Build against ITK 6 - #252
Merged
Merged
Conversation
All changes keep the module building against ITK 5.4 as well. ITK 6 removed the VNL FFT backend. The Vnl*1DFFTImageFilter names survive only as deprecation shims that a legacy-free ITK build compiles out entirely, and vnl/algo/vnl_fft_1d.h is gone. Select the PocketFFT filters on ITK 6 and the Vnl filters below it. These classes reach FFTImageFilterFactory as template template arguments whose FFTImageFilterTraits specialization is keyed on the template itself, so the selection is by macro rather than by alias template. Spectra1DImageFilter called vnl_fft_1d::bwd_transform on a vnl_vector, for which no ITK filter substitutes. Call pocketfft directly on ITK 6. The direction and scaling follow ITK's own vnl_fft_1d PocketFFT shim, removed in a4de8b36f76: vnl dir=+1 is exp(+i), which is pocketfft's backward direction, so bwd_transform is a forward pocketfft transform with no normalization.
hjmjohnson
marked this pull request as ready for review
September 22, 2026 16:05
dzenanz
approved these changes
Sep 22, 2026
dzenanz
left a comment
Member
There was a problem hiding this comment.
Changes look good. But my nightly builds run into VTK-related configure error.
Contributor
Author
|
Pushed
|
Member
|
I opened follow-up PR #253 with that commit. |
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: select the PocketFFT 1D filters where ITK 6 removed the VNL FFT backend, and call pocketfft directly in
Spectra1DImageFilter, which usedvnl_fft_1don avnl_vector.Details
Vnl*1DFFTImageFilternames survive only as deprecation shims that a legacy-free build compiles out, andvnl/algo/vnl_fft_1d.his gone. These classes reachFFTImageFilterFactoryas template template arguments keyed on the template itself, so the selection is by macro rather than by alias template.Spectra1DImageFiltercalledvnl_fft_1d::bwd_transform, for which no ITK filter substitutes. The pocketfft call follows ITK's own removedvnl_fft_1dshim (a4de8b36f76): vnldir=+1isexp(+i), pocketfft's backward direction, sobwd_transformis a forward pocketfft transform with no normalization.Verification
Configured with
ITK_DIRpointing at an installed ITK 6 tree (upstreammainas of 2026-09-22,ITK_WRAP_PYTHON=ON, with the ingested modules this module depends on enabled), built the module and its Python wrapping. The module still builds against ITK 5.4.