[Insight-developers] wrapping, USE_FFTWF and USE_FFTWD

Kent Williams kent at psychiatry.uiowa.edu
Fri Aug 11 10:36:13 EDT 2006


FFTW is a GPL-Licensed package, and therefore is not a part of ITK; it 
doesn't ship with ITK.  To use it you have to install it separately 
first, and then define USE_FFTWF and/or USE_FFTWD in the CMakeLists.txt 
for the Algorithms subdirectory. The #ifdefs are there because if you've 
only installed single precision FFTW, the double precision version isn't 
available, and vice versa, and if you haven't installed FFTW at all, 
CMAKE won't build or install the FFTW filters.  In fact the filters 
would fail to compile at all if FFTW isn't installed because it won't 
find the FFTW header.

When I check the new versions in this morning I will take out the #if 
DEFINED(USE_FFTW) || defined(USE_FFTWD) -- if CMake is doing it's job 
they're pointless, since the files won't be compiled or installed.

As it happens I've been working on this, fixing a problem Hans Johnson 
found that led to FFTW scribbling on its input images.  In the process, 
I've simplified the code so that the filter uses a proxy class to call 
FFTW.  It might be easier to wrap. At any rate you should not wrap it 
unless you install FFTW and turn on USE_FFTWx when you configure 
Insight, and WrapITK should likewise ignore those files with respect to 
wrapping.

Is it possible to turn off wrapping for classes in ITK, with a token in 
a comment? I know the VTK wrapping works that way.



Gaetan Lehmann wrote:

>
> Hi,
>
> I have wrapped FFTWComplexConjugateToRealImageFilter and  
> FFTWRealToComplexConjugateImageFilter classes, but have problems with 
> the  #if defined(USE_FFTWF) || defined(USE_FFTWD) block. Because of 
> it, I must  pass the options -DUSE_FFTWF and -DUSE_FFTWD to gccxml, 
> which will  seriously make the code more complex.
> Also, I'm not sure to understand why they are there. Are those #if  
> defined() blocks really useful for the user ?
>
> Thanks,
>
> Gaetan
>



More information about the Insight-developers mailing list