ITK
ITK copied to clipboard
Expose FFT override dimensions in `itk::FFTImageFilterFactory`
Description
Following up from #3065, itk::FFTImageFilterFactory should be updated to allow a developer to specify a list of image dimensions that the user is allowed to input for override.
For instance, VnlForwardFFTImageFilter is the default forward FFT implementation in ITK and should override typical itk::Image dimensions 1 through 4. Meanwhile, in the ITKVkFFTBackend external module VkForwardFFTImageFilter is an accelerated implementation only supporting 1D, 2D, and 3D FFT. Rather than writing a completely new factory, the external developer should be able to pass in a list of dimensions to itk::FFTImageFilterFactory at compile time with the result that instantiating a filter for forward 1D, 2D, or 3D FFT yields a VkForwardFFTImageFilter backend, while instantiating a filter for forward 4D FFT yields a VnlForwardFFTImageFilter backend.
Current behavior
- The dimension list
1,2,3,4is manually specified initkFFTImageFilterFactory.hxxwith no means of override.
Proposed behavior
- The dimension list is passed in from an outside specification such as a
Traitsstructure and can be overridden for external classes.
Additional Information
Once we have settled on a design pattern here it can be reused elsewhere to assist in implementing swappable backends for any other ITK filters via the object factory.