[Insight-users] FFTW library

Luis Ibanez luis.ibanez at kitware.com
Sun May 9 17:28:00 EDT 2010


Hi Jeremy,


1) If ITK has been linked to a given library, then you don't
    need to explicitly link to that library in your project.
    CMake will carry the dependencies  for you.


2) However, please note that ITK is mostly a templated library,
    so the ITK FFT filters are not really compiled when you
    build ITK, but when you build your project.

3) Therefore, for the case of the FFTW libraries, you should
    add those dependencies in your project.

4) For FFT from Complex to Complex, please look at the
     Insight Journal paper:

     http://www.insight-journal.org/browse/publication/128
     http://hdl.handle.net/1926/326

     This code is now under

      Insight/Code/Review/
             itkFFTComplexToComplexImageFilter.h

      In order to use this code you should configure
      ITK with  ITK_USE_REVIEW  set to ON.



  Regards,


         Luis


---------------------------------------------------
On Tue, May 4, 2010 at 5:28 PM, Jeremy Lecoeur
<jeremy.j.lecoeur at vanderbilt.edu> wrote:
> Hello,
>
> I'm trying to use a filter named FFTWComplexToComplexImageFilter. This
> filter uses the FFTW library and I have problems with this library. I'm
> under Windows 7 and using MS Visual Studio 2008 Pro.
>
> Here is what i have done so far :
> - I have downloaded the precompiled FFTW 3.2.2 Windows DLLs and used lib.exe
> to create .lib "import libraries"
> - I have rebuilt ITK by checking the USE_FFTWF checkbox in cmake and filling
> the FFTWF_LIB and FFTWF_THREADS_LIB with the path to libfftw3-3.lib and
> FFTW_INCLUDE_PATH with the path to the directory containing fftw3.h
> - I then modified the Cmakelist.txt file of my project by adding those lines
> :
>
> SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake)
> OPTION(USE_FFTWD "Use double precision FFTW if found" ON)
> OPTION(USE_FFTWF "Use single precision FFTW if found" OFF)
> FIND_PACKAGE( FFTW )
>
> IF(USE_FFTWF)
>   LINK_LIBRARIES(${FFTWF_LIB})
> ENDIF(USE_FFTWF)
>
> IF(USE_FFTWD)
>   LINK_LIBRARIES(${FFTWD_LIB})
> ENDIF(USE_FFTWD)
>
> - I then rebuilt my project with cmake by providing the same info than those
> I've provided to cmake while making ITK.
> -  I added the fftw libs in the Additional Dependencies in Visual Studio
> (Properties -> Configuration Properties ->Linker -> Input)
>
> When I compile after that, I have the following error messages :
> error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r_1d...
> error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r_2d...
>  error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r_3d...
> error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_c2r...
> error LNK2019: unresolved external symbol __imp_fftwf_execute...
> error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan...
> error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c_1d...
> error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c_2d...
> error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c_3d...
>  error LNK2019: unresolved external symbol __imp_fftwf_plan_dft_r2c...
>
> First, I don't know if I have to give the path to the libs to both ITK and
> MyProject. Any clue ?
> Is the Additional Dependencies step necessary ?
> Endly, does anyone have any advice on what I should try to make things work
> ? I used to work with ITK on Linux but my new lab runs under Windows and I'm
> totally lost with those DLLs/lib.
>
> If anyone has another way of computer a FFT complex to complex, that would
> be also a good thing.
>
> Cordially,
> Jeremy
>
> --
> Jeremy Lecoeur, Ph.D.
> Research Associate
> Vanderbilt University
> Email: jeremy.j.lecoeur at vanderbilt.edu
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list