[Insight-users] Re: FFTW librairies not built with ITK
Julien Jomier
jjomier at cs.unc.edu
Mon Nov 28 10:42:04 EST 2005
Hi Isabelle,
You should link your program with the FFTW libraries.
If you are using ITK with your program you can do something like that in
your CMakeLists.txt
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 )
Or just copy the FindFFTW.cmake (in Insight/CMake) in your current
directory and use the default INCLUDE(FindFFTW.cmake).
Then you need to tell CMake to link these libraries
IF(USE_FFTWF)
LINK_LIBRARIES(${FFTWF_LIB})
ENDIF(USE_FFTWF)
IF(USE_FFTWD)
LINK_LIBRARIES(${FFTWD_LIB})
ENDIF(USE_FFTWD)
Note that by using the FindFFTW.cmake you don't need the '#define
USE_FFTWD 1' anymore since CMake is adding the definition for you.
Hope that helps,
Julien
Renaud Isabelle wrote:
> Hi,
>
> - You are right Julien:
> #define USE_FFTWD 1
> #include "itkFFTWRealToComplexConjugateImageFilter.h" removes the error
> that FFTWRealToConjugateComplexImageFilter is not a member of ITK.
>
> However, it is still not simple for me. Now, I have this kind of linking
> errors:
>
> */"error LNK2019: symbole externe non résolu _fftw_destroy_plan
> référencé for/*
> */fftw_destroy_plan/*
> */fftwf_destroy_plan/*
> */fftw_execute/*
> */fftw_plan_dft_r2c/*
> */fftw_plan_dft_r2c_1d/*
> */fftw_plan_dft_r2c_2d/*
> */fftw_plan_dft_r2c_3d"/*
> *//*
> I believe that, maybe, *ITK fftw librairies have not been built*. Are
> there some ITK fftw librairies to build? Or do I have just to mention
> where are fftw.h and fftwd.lib as configuring ITK with CMake? As looking
> at FindFFTW.cmake, I find words about *"libfftw.a-->double,
> libfftwf.a-->float":* are there the names of ITK librairies for FFTW? If
> so, I made a search for these files in my ITK bin directory, and I
> didn't find them.....
>
> Isabelle
> //
> / /
>
>
>
> */Julien Jomier <jjomier at cs.unc.edu>/* a écrit :
>
> Isabelle,
>
> you need to add:
>
> #define USE_FFTWD 1
>
> before including itkFFTWRealToComplexConjugateImageFilter.h in your code
>
> Hope that helps,
>
> Julien
>
> Renaud Isabelle wrote:
> > Hi,
> >
> > It's still concerning how to use FFTW witk ITK.
> >
> > Before, I was using Microsoft Visual C++ 6.0 whose compilator was
> buggy
> > to build fftw librairies. Since today, I have Microsoft Visual
> C++ 7.1.
> > So I downloaded from the official website and build without
> problem the
> > FFTW library (I got my *fftwd.lib* built with MSVC7.1).
> >
> > Then I have to rebuild ITK and VTK with CMake and MSVC7.1.
> >
> > As building ITK 2.2 witk CMake, I set *USE_FFTWD to ON*. I have
> no error
> > when compiling. So now, I supposed that I could use
> > itkFFTWRealToComplexImageFilter in my own project. However,
> introducing
> > the instruction "typedef
> > itk::FFTWRealToComplexConjugateImageFilter FFTFilter; " in my
> > code still generates an error:
> > *"FFTWRealToComplexComplexConjugateImageFilter is not a member of
> ITK"*.
> > *What do I have to do to make it a member of ITK???? Am I missing
> a step? *
> >
> >
> > - BTW, I would like to say that I tried another ways to compute
> my FFT
> > (with Numerical Recipes and Vnl) but it didn't work (zero padding
> caused
> > wrap problems and Vnl ifft computed module ). That is why I have to
> > insist. Actually, I make my boss buy Microsoft Visual C++ 7.1
> software
> > in order to use itkFFTW, and it is still not working. I really
> need help.
> >
> > Isabelle
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------
> > *Appel audio GRATUIT partout dans le monde* avec le nouveau
> Yahoo! Messenger
> > Téléchargez le ici !
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
>
> ------------------------------------------------------------------------
> *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo! Messenger
> Téléchargez le ici !
> <http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com>
>
More information about the Insight-users
mailing list