Hi,
I am trying to reproduce the example runRieszWaveletAnalysis from the ITKIsotropicWavelets repository using Python. I installed the package using the pip command. I ran into an error when trying to generate a monogenic signal from an analysis wavelet.
# Forward Wavelet
ForwardWaveletType = itk.WaveletFrequencyForward[ComplexImageType, ComplexImageType, WaveletFilterBankType]
forwardWavelet = ForwardWaveletType.New(fftForwardFilter.GetOutput())
forwardWavelet.SetHighPassSubBands(2)
forwardWavelet.SetLevels(2)
forwardWavelet.Update()
analysisWavelets = forwardWavelet.GetOutputs()
# Perform the monogenic signal frequency analysis
monoFilter = itk.MonogenicSignalFrequencyImageFilter[ComplexImageType].New()
monoFilter.SetInput(analysisWavelets[0])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-192-f125def2e1c0> in <module>
7 # Perform the monogenic signal frequency analysis
8 monoFilter = itk.MonogenicSignalFrequencyImageFilter[ComplexImageType].New()
----> 9 monoFilter.SetInput(analysisWavelets[0])
10
TypeError: in method 'itkImageToImageFilterICF2VICF2_SetInput', argument 2 of type 'itkImageCF2 const *'
I suspect that the problem is due to the output type obtained from the WaveletFrequencyForward decomposition. When using GetOutputs(), a tuple is returned containing the decomposition at each level. These are of type : *<Swig Object of type 'itkImageCF2_Pointer ’ at 0x0000025CE7F568D0>
but the MonogenicSignalFrequencyFilter expects an input type of either [<class ‘itkImagePython.itkImageCF2’>,] or [<class ‘itkImagePython.itkImageCF3’>,].
How can I access the wavelet components within the Swig Object to be able to be used by the monoFilter?
Thanks