SPAM: Re: [Insight-users] Forward + Inverse FFT != Identity
transform
Julien Jomier
jjomier at cs.unc.edu
Wed Jul 6 16:27:39 EDT 2005
Hi Jakub,
You are right. I've just commited a fix in the cvs repository.
Thanks for the report and the fix,
Julien
Jakub Bican wrote:
>
> Hi,
>
> i had a problem with linking FFTW too (on MSVC 7 platform), and my
> solution is to replace
>
> LINK_DIRECTORIES( ${FFTW_LIB} )
>
> line #35 with
>
> LINK_LIBRARIES( ${FFTW_LIB} )
>
> in
>
> Insight/CMake/FindFFTW.cmake
>
> file, as i posted several weeks ago. May be, it will help you too. Are
> there any opinions to this by ITK team?
>
>
> Cheers,
>
> Jakub
>
>
>
> Julien Jomier napsal(a):
>
>> Hi Jordi,
>>
>> Actually the fix for gcc 3.4 was submitted after the 2.0.1 release.
>> You can use the cvs version of ITK if you want.
>>
>> Did you enable USE_FFTW when running CMake on Insight?
>> Can you post the linker errors you are getting?
>>
>> thanks,
>>
>> Julien
>>
>> Jordi Inglada wrote:
>>
>>>
>>> Julien,
>>>
>>> Thanks for your answer.
>>>
>>> Julien Jomier wrote:
>>>
>>>> Jordi, Stefan,
>>>>
>>>> We had the same issue here. One solution was to use FFTW and the
>>>> corresponding FFTW classes in ITK.
>>>>
>>>
>>> I have just tried, but now is FFTW (version 3) which causes trouble.
>>> First of all I had to add the following lines to
>>> itkFFTWRealToComplexConjugateImageFilter.h in order to compile with
>>> gcc 3.4 :
>>>
>>> typedef typename Superclass::TInputImageType TInputImageType;
>>> typedef typename Superclass::TOutputImageType TOutputImageType;
>>>
>>> And now, the the fftwf_* functions seem not to be present into the
>>> libfftw3.a file (at least, ld is no able to find them and 'nm
>>> libfftw3.a |grep fftwf' says nothing).
>>>
>>>> We didn't have time to dig into the possible bug using the VNL classes.
>>>> Did you submit a bug report on the bug tracker (www.itk.org/bug) yet?
>>>>
>>>
>>> Not yet.
>>>
>>> Jordi
>>>
>>>> Julien
>>>>
>>>> Jordi Inglada wrote:
>>>> > Dear Stefan, all,
>>>> >
>>>> > Has there been a proposed solution to this problem? We are having
>>>> > similar problems : the FFT of a sinusoidal surface has not the
>>>> expected
>>>> > shape (see the real, imaginary, and module parts of the FFT). We have
>>>> > used the FFTImageFilter.cxx example.
>>>> >
>>>> > Thanks for any advice.
>>>> >
>>>> > J. Inglada
>>>> >
>>>> > group at spellgen.com wrote:
>>>> >
>>>> >> Trying to debug a convolution routine for two images based on
>>>> Fourier
>>>> >> transforms, I find that a forward FFT immediately followed by its
>>>> >> inverse does
>>>> >> not produce the image I started with. The code looks straightforward
>>>> >> enough -
>>>> >> it does the following:
>>>> >> 1. Read the image from a grayscale char-type file
>>>> >> 2. Resample to width and height both being powers of two.
>>>> >> 3. Forward transform (float)
>>>> >> 4. Another forward transform.
>>>> >> 5. Flip data in both dimensions
>>>> >> 6. Rescale to bring it into char range again
>>>> >> 7 Write the image.
>>>> >>
>>>> >> urls for the input (black with a white dot at the origin) and the
>>>> output
>>>> >> images:
>>>> >> http://neuromagnetics.mc.vanderbilt.edu/out/itk/point.png
>>>> >> http://neuromagnetics.mc.vanderbilt.edu/out/itk/out.png
>>>> >>
>>>> >> The source code is there as well:
>>>> >> http://neuromagnetics.mc.vanderbilt.edu/out/itk/four2-example.cxx
>>>> >>
>>>> >> Any suggestions as to what is going on would be appreciated...
>>>> >>
>>>> >> Cheers,
>>>> >>
>>>> >> Stefan
>>>> >>
>>>> >>
>>>> >>
>>>> >> _______________________________________________
>>>> >> 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
>>>>
>>>
>>>
>>
>> _______________________________________________
>> 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