-
-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Select Forward1DFFTImageFilter backend with object factory #2836
ENH: Select Forward1DFFTImageFilter backend with object factory #2836
Conversation
3cd631c
to
b6b9c08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this. One comment about UnRegister
.
Seeing new failures in VNL FFT classes after trying to add object factory methods (see https://open.cdash.org/viewBuildError.php?buildid=7533182):
Am I on the right path with registering new constructors with each FFT object factory? Not sure what's missing here. |
@tbirdso looks to be generally on the right path. The build error sounds like a type mis-match. |
b6b9c08
to
2f2165c
Compare
FACTORY_NAMES | ||
FFT::VnlForward1D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note the syntax defined here generally mirrors FACTORY_NAMES
syntax for IO classes, with minor corrections happening in UseITK.cmake
. Namely, FFT::<fft-type>
maps to a <fft-type>FFTImageFilterFactoryRegister__Private()
function header in itkFFTImageFilterFactoryRegisterManager.h
which must be implemented in a .cxx
source file.
Modules/Filtering/FFT/src/itkVnlForward1DFFTImageFilterFactory.cxx
Outdated
Show resolved
Hide resolved
Starting to have success in using object factories to generate a default Vnl backend for @dzenanz @thewtex @N-Dekker Do you have any thoughts on the above discussions? Thanks in advance for your help. |
If you want something accessible in bottom scope, you should define in in parent scope before entering that subdirectory. |
8996adb
to
7cc15b5
Compare
Per @thewtex it is valid to require tests to manually register FFT object factories with the understanding that consuming cxx projects will call |
97e8f78
to
d8a5c26
Compare
Current PR status:
|
We may want to bite the bullet and inject the factory registration call for wrapped factory classes call in igenerator.py. |
@thewtex I can take a look. Do you have any thoughts on how |
This may be a side effect of wrapping |
I was worried about that 😅 I suppose it's not reasonable for object factory classes to always have another class like |
Python wrapping seems to be working now, maybe due to wrapping I've confirmed on my side that the
Injecting factory calls in |
2eb86b8
to
eacef8b
Compare
eacef8b
to
67762ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 🌮
Implement object factory methods taking advantage of existing CMake infrastructure such that instantiating an FFT filter with
itk::Forward1DFFTImageFilter<imagetype>::New()
automatically returns a backend from registered object factory methods. This is advantageous across several scenarios:itkVnlForward1DFFTImageFilter
);This PR sets up the FFT factory framework based on IO factory architecture with a few small special cases for naming. Future work will involve:
igenerator.py
itk_configure_factory
macroPR Checklist
Refer to the ITK Software Guide for
further development details if necessary.