[Insight-users] I have a problem With FFT in ITK

Martijn van der Bom martijn at isi.uu.nl
Fri Jul 21 03:32:16 EDT 2006


Hi Simon and Luis,

I don't use the vnl implementation but I've written a filter myself using
the fftw3 lib.
The block errors in the ifft images sounds like a memory reading problem. 
..." All of these transforms operate on contiguous arrays in the C-standard
row-major order, so that the last dimension has the fastest-varying index in
the array."
This is usually the x-index. So you should check out how the fftw_plan is
built. 

Hope that helps,

Cheers

Martijn

-----Original Message-----
From: insight-users-bounces+martijn=isi.uu.nl at itk.org
[mailto:insight-users-bounces+martijn=isi.uu.nl at itk.org] On Behalf Of Luis
Ibanez
Sent: vrijdag 21 juli 2006 01:26
To: Simon Warfield
Cc: Insight Users
Subject: Re: [Insight-users] I have a problem With FFT in ITK


Hi Simon,

Thanks for pointing this out.

The boolean option for FFTW_INCLUDE_PATH has now been
removed from the FindFFTW.cmake file:

http://www.itk.org/cgi-bin/viewcvs.cgi/CMake/FindFFTW.cmake?root=Insight&r1=
1.8&r2=1.9

You may want to try it after updating your CVS checkout.


Please let us know if you find any other problem.


    Thanks


       Luis


----------------------
Simon Warfield wrote:
> Luis Ibanez wrote:
> 
>>
>> Hi Simon,
>>
>> We know that a problem exists at the level of using FFT filters
>> in ITK that are based on the VNL ones. However, we didn't get to
>> find the source of the problem.
>>
>> It may well be that the ITK FFT filters are missing some operation
>> that is required for the good use of the vnl FFT; or it may be an
>> actual bug in the VNL implementation.
>>
>> The observation is that when you take an image, computes its FFT
>> and then apply the inverse FFT, you don't recover the original
>> image. The returned image is structured in different blocks and
>> it has non-zero values in places where it should be zero.
>>
>> The simplest way to test this is with the examples:
>>
>>    Insight/Examples/Filtering/
>>                  FFTDirectInverse.cxx
>>                  FFTDirectInverse2.cxx
>>
>>
>> The first one uses VNL,
>> while the second one uses FFTW.
>>
>>
>> If you have any suggestions on what may be the source
>> of the problem we will be happy to give them a try.
> 
> 
> I don't have an idea about what might be going wrong with the VNL FFT, 
> but there is a bug in the CMake configuration file for FFTW.
> line 15 of
> InsightToolkit-2.8.1/CMake/FindFFTW.cmake
>  defines a boolean option for FFTW_INCLUDE_PATH.  This line should be 
> deleted.
> The later FIND_PATH in the same file will allow the FFTW_INCLUDE_PATH to 
> be set.
> 
> 
> -- 
> Simon
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 


_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list