InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.38k stars 661 forks source link

Is there an ITK "component" or "module" to use all FFT libraries? #3051

Open blowekamp opened 2 years ago

blowekamp commented 2 years ago

From ITKConfig.cmake to aid in libraries using all ImageIOs and TransfromIOs there are the "ITKImageIO" and ITKTransformIO" CMake components. Is there are similar one for the FFT modules to enable usage in factories?

Currently SimpleITK uses these components to ensure all Transform and ImageIO factories are registered: https://github.com/SimpleITK/SimpleITK/blob/master/Code/IO/src/CMakeLists.txt#L16

Is there a similar module for FFT factory registration?

blowekamp commented 2 years ago

@dzenanz @tbirdso

tbirdso commented 2 years ago

Yes, FFT factories are contained in the ITKFFT module

blowekamp commented 2 years ago

So the "ITKImageIO" and "ITKTransformIO" are meta modules in that they are not actual ITK modules. They were created as a convenience to use all the modules that create an item for a factory type. This was done in 4281aeed92584fb0233b228acb3cf81c4ea51f5b.

The Specific cmake code is here: https://github.com/InsightSoftwareConsortium/ITK/blob/87fe0a13a9d7b06eefba3950e662c0949786a183/CMake/ITKModuleAPI.cmake#L44-L49

What is interesting here is that the exiting real "ITKFFT" module name is that same as the meta-module generated for the factory. The above CMake code may cause some side-effect, but I'm not certain.

Another thing that make the FFT factory different is that all the items are in the same module and library.

dzenanz commented 2 years ago

Should this issue be closed now? Or is some more work needed?

thewtex commented 2 years ago

For now, all the FFT implementations are in the ITKFFT module. There is also the VkFFT work in progress, but that would be a remote module. For ITK 6, we could split ITKFFT into base classes in ITKFFT and separate modules for the Vnl and FFTW implementations. Then the meta module could be used for all FFT modules.