ITK icon indicating copy to clipboard operation
ITK copied to clipboard

Expose FFT override dimensions in `itk::FFTImageFilterFactory`

Open tbirdso opened this issue 3 years ago • 2 comments

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,4 is manually specified in itkFFTImageFilterFactory.hxx with no means of override.

Proposed behavior

  • The dimension list is passed in from an outside specification such as a Traits structure 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.

tbirdso avatar Jan 11 '22 15:01 tbirdso