[Rtk-users] Error in the FFTRampImpageFilter

Simon Rit simon.rit at creatis.insa-lyon.fr
Fri May 8 16:16:42 EDT 2020


Hi,
I cannot reproduce the issue with this code

import itk
from itk import RTK as rtk

ImageType = itk.Image[itk.F,3]

constantImageSource = rtk.ConstantImageSource[ImageType].New()
constantImageSource.SetOrigin( [ -127.875, -127.875, 0. ] )
constantImageSource.SetSpacing( [ .25 ] *3 )
constantImageSource.SetSize( [ 1024, 512, 360 ] )
constantImageSource.SetConstant(1.)

ramp = rtk.FFTRampImageFilter[ImageType, ImageType, itk.D].New()
ramp.SetInput(constantImageSource.GetOutput())
ramp.Update()

Can you tell me more on the pipeline you're using?
Simon

On Fri, May 8, 2020 at 9:36 AM Jerome Lesaint <lesaint.jerome at gmail.com>
wrote:

> Salut,
>
> thanks again for the answer. The streaming workaround seems to work.
> As for the second solution you mentioned : actually there are 360
> projections in my stack (not 23). 360 has only 2s, 3s and 5s in its prime
> decomp. Of course, 23 does not. But where this 23 comes form ???
>
> Anyway, it works fine now. Thank you.
> Jérome
>
>
> Le jeu. 7 mai 2020 à 20:48, Simon Rit <simon.rit at creatis.insa-lyon.fr> a
> écrit :
>
>> Hi,
>> Nope, sorry. We can't distribute the package with FFTW because its
>> license does not allow it. What you can do is put an
>> itkStreamingImageFilter after the fft ramp to process one projection at a
>> time. Or add one empty projection after you 23d.
>> Let me know if we can help with one of the two options.
>> Simon
>>
>> On Thu, May 7, 2020 at 7:24 PM Jerome Lesaint <lesaint.jerome at gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to use the ramp filter FFTRampImageFilter and it fails at
>>> Update time with the error message :
>>>
>>> itk::ERROR:
>>> VnlRealToHalfHermitianForwardFFTImageFilter(00000230EC986BA0): Cannot
>>> compute FFT of image with size [1024, 512, 23].
>>> VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose
>>> size in each dimension has a prime factorization consisting of only 2s, 3s,
>>> or 5s.
>>>
>>> I already read Simon's answer to a previous similar issue, saying that
>>> he recommends using FFTW by turning ITK_USE_FFTW when building ITK. But
>>> I did not compile ITK (on this computer). I simply installed the
>>> pre-compiled Python package.
>>> My question : can I turn any parameter in Python to force the ramp
>>> filter to use this library ?
>>>
>>> Thanks in advance for your help,
>>>
>>> Jérome
>>> _______________________________________________
>>> Rtk-users mailing list
>>> Rtk-users at public.kitware.com
>>> https://public.kitware.com/mailman/listinfo/rtk-users
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20200508/21bcbe24/attachment.html>


More information about the Rtk-users mailing list