Closed dzenanz closed 2 years ago
ITK-git/Modules/Remote/Ultrasound
We need to update the ITKUltrasound
remote to 5.3rc3 once released.
A few initial thoughts here:
itkVnlComplexToComplex1DFFTImageFilter
was made optional as part of standardizing FFT class signatures. It looks like that change may not be present in your source tree?74>Generating ../../itkVnlComplexToComplex1DFFTImageFilter.xml 74>C:/Dev/ITK-py/Wrapping/itkVnlComplexToComplex1DFFTImageFilter.cxx(26,18): error G026DE12C: too few template arguments for class template 'VnlComplexToComplex1DFFTImageFilter' 74> typedef itk::VnlComplexToComplex1DFFTImageFilter< itk::Image< std::complex< float >,2 > > itkVnlComplexToComplex1DFFTImageFilterICF2;
ImageToImage
real<->complex wrapping signatures have been included in itkImageToImageFilterB.wrap
long prior to FFT changes. If we're not able to resolve the issue in that thread I would recommend tracking in a separate issue.
EDIT: On second thought, this might indicate that the filter is trying to wrap for double
and complex<double>
types even though ITK_WRAP_DOUBLE
and ITK_WRAP_COMPLEX_DOUBLE
should not be on by default.
EDIT2: itkForward1DFFTImageFilter.wrap shows that the FFT filter is wrapped for input images of pixel type T = WRAP_ITK_REAL
with a default output image type std::complex<T>
. Is it possible that ITK_WRAP_DOUBLE
is enabled but ITK_WRAP_COMPLEX_DOUBLE
is disabled by default when trying to build with setup.py
?Regardless of whether my suggestion in #2884 is the correct fix, we should certainly be checking whether complex
types are available in wrapping before trying to wrap relevant FFT classes. Will put in a fix shortly.
In bb3c27e the second template parameter in itkVnlComplexToComplex1DFFTImageFilter was made optional as part of standardizing FFT class signatures. It looks like that change may not be present in your source tree?
This is present in my source tree. I was not sure whether this template default would propagate to derived classes.
No variant of double
is enabled for wrapping in the build in question. I see 4 options total: plain, complex, vector and covariant vector.
This is present in my source tree. I was not sure whether this template default would propagate to derived classes.
Okay, thanks for checking. Is the Ultrasound remote module enabled in your build? Given that the second template argument was made optional only after moving 1D FFT classes into ITK proper, perhaps the lingering, original structure from ITKUltrasound is being picked up?
No variant of
double
is enabled for wrapping in the build in question. I see 4 options total: plain, complex, vector and covariant vector.
🤔 I'm not sure how to trace this issue, as itkForward1DFFTImageFilter.wrap
seems to only wrap for the pixel types present in WRAP_ITK_REAL
and I haven't been able to recreate locally or in CI. Are you building on Windows @dzenanz ? Perhaps it's worth putting in the check for complex types being enabled in wrapping and then revisiting if the issue still appears? Or as I mentioned in #2884, trying to enable double
and complex<double>
types and seeing what changes?
trying to enable double and complex
types and seeing what changes
double
is wrapped by default in PythonPackage repository, but not in vanilla ITK. Whoever tries to build Python wrappings from source just by enabling ITK_WRAP_PYTHON
might run into the issue.
perhaps the lingering, original structure from ITKUltrasound is being picked up
Oops, I had Module_Ultrasound
enabled. I will try building incrementally without it.
Oops, I had
Module_Ultrasound
enabled. I will try building incrementally without it.
No problem, and sounds good. My hope is that this will resolve your issue, let me know if you are still seeing the error once it builds.
double
is wrapped by default in PythonPackage repository, but not in vanilla ITK. Whoever tries to build Python wrappings from source just by enabling ITK_WRAP_PYTHON might run into the issue.
💯 Thanks for the find @dzenanz , ITKPythonPackage/CMakeLists.txt
turns on several default values including ITK_WRAP_DOUBLE
but not ITK_WRAP_COMPLEX_DOUBLE
, which explains the issue in #2884. I propose two simultaneous fixes:
itkForward1DFFTImageFilter.wrap
, andITK_WRAP_COMPLEX_DOUBLE
by default in ITKPythonPackage @dzenanz @thewtex do these fixes sound good to you?
An incremental build succeeded with Module_Ultrasound
disabled.
The changes you propose sound good.
Description
I get errors when building Python wrapping:
Steps to Reproduce
Incremental compile after updating local ITK repository.
Expected behavior
Build completes with no errors.
Actual behavior
Builds error above.
Reproducibility
100%
Versions
Recent master, e.g. c46354736b0723ae4a7c66b03b6203c643754659.
Environment
Windows 10, VS2019.
Additional Information
@nicktasios also encountered as similar problem: