[Insight-users] Re: FFTW library in ITK

Jakub Bican jakub.bican at matfyz.cz
Tue May 24 03:45:32 EDT 2005


Thanks Hans, Vamsi,

during CVS update, i found one more thing that i changed in order to make
ITKTesting code and my own code working.
FindFFTW.cmake#35:
  LINK_DIRECTORIES( ${FFTW_LIB} )
replace with
  LINK_LIBRARIES( ${FFTW_LIB} )

otherwise is fftw library looked for in FODLER for example
"c:\myFFTWfolder\fftw3.lib\", while the FILE "c:\myFFTWfolder\fftw3.lib"
should be linked instead!!

Cheers,
Jakub

PS: you can see in the test i sent before how i used FindFFTW.cmake file ...
PSII: I don't think, that the problem is inside FFTW implementation - the
most it depends on is if previous filter's Update() was called explicitly or
not!! If you have some out-of-itk test of fftw library, i can run it here to
see if the problem is there or not. But i was using it several times with no
problems ;))




----- Original Message ----- 
From: "Hans Johnson" <hans-johnson at uiowa.edu>
To: "Vamsi Jammalamadaka" <vjammala at psychiatry.uiowa.edu>
Cc: "Jakub Bican" <jakub.bican at matfyz.cz>
Sent: Saturday, May 21, 2005 5:51 PM
Subject: FW: [Insight-users] FFTW library in ITK


> Vamsi,
>
> Will you try to build the program attached to this e-mail?  Run it, and if
> it fails, determine what the programming errors are.
>
> Then send both the insight-users and Jakub the results of your findings.
I
> am fairly confident that your previous testing of the ITK/FFTW libs has
> shown that it is implemented correctly, but there has never been
widespread
> testing of it on platforms other than linux.
>
> I have a gut feeling that the problem is with fftw under windows.  If you
> get it the attached test to run under linux without errors, please report
> that.
>
> Thanks,
> Hans
>
> PS:  Did you ever finish refactoring the ITK/FFTW Test example with better
> comments and variable names?  We need to commit the enhanced document back
> to ITK next week.
>
>
>
>
> ------ Forwarded Message
> From: Jakub Bican <jakub.bican at matfyz.cz>
> Reply-To: Jakub Bican <jakub.bican at matfyz.cz>
> Date: Sat, 21 May 2005 13:57:00 +0200
> To: <insight-users at itk.org>
> Subject: [Insight-users] FFTW library in ITK
>
>
> Hi all,
>
> i am trying to use FFTW library in ITK through
> FFTWRealToComplexConjugateImageFilter class. I am using VS.NET compiler so
i
> downloaded several FFTW binaries from fftw.org site.
>
> Then there were two kinds of errors, depending on the FFTW library:
> 1) if i used MinGW compiled lib or Intel compiled lib form fftw.org
download
> page, the compilation was OK, but when i executed the code, it crashed
> inside a fftw execution function (during transforming the data).
>
> 2) if i tried to compile my own FFTW binaries using project files from
> fftw.org. In this case, some symbols were not found by linker.
>
>
> So i went into ITK's tests and compiled itkAlgorithmsTests4. First, it
> wasn't able to link, but i found the error and the solution here:
> Insight\Code\Algorithms\CMakeLists.txt#353:
>         TARGET_LINK_LIBRARIES(itkAlgorithmsTests4 fftw3 fftw3f)
> replace with:
>         TARGET_LINK_LIBRARIES(itkAlgorithmsTests4)
>
>
> Then, when compiled, all tests ran OK!!
> So i examined case 1) and found following problem:
> First i casted an image by CastImageFilter from some integral type to an
> image of doubles. Output of a caster was passed to the FFTW
> RealToComplexConjugate filter. The execution crashed inside fftw filter
> execution if:
> 1) caster filter was not explicitly updated by Update() call before FFT
> filter's Update(), AND
> 2) dimension of image is 3, AND
> 3) PixelType of image passed into fft filter is 'double'.
>
> I have written an intensive testing code, it is attached. See the lines
> marked by //* - those are the cases, that fails on my system. I tested
that
> with several different "harmless" filters (now it is set to
AbsImageFilter)
> instead of CastImageFilter. The results on my systems are:
> 1) dimension must be 3
> 2) any input pixel type
> 3) any output pixel type {float|double} (!! this differs from the previous
> test on real data)
> 4) any filter
> 5) filter may not be explicitly updated before FFTW filter's Update() call
>
>
> Please, do someone know, where is the problem?? It can be hacked by
calling
> Update() on a filter preceding FFTW filter each times before FFTW filter's
> execution, but it is not very clear solution.
>
> Thanks,
> Jakub
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
> ------ End of Forwarded Message
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FindFFTW.cmake
Type: application/octet-stream
Size: 821 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20050524/a030b630/FindFFTW.obj


More information about the Insight-users mailing list