[Insight-developers] wrapping, USE_FFTWF and USE_FFTWD

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Aug 11 11:09:26 EDT 2006


On Fri, 11 Aug 2006 16:36:13 +0200, Kent Williams  
<kent at psychiatry.uiowa.edu> wrote:

> 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.
>

That's what I'm thinking too :-)

> 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.

It will be packaged in an external project, exactely as itk-vtk converters.
http://voxel.jouy.inra.fr/darcsweb/darcsweb.cgi?r=WrapITK-unstable;a=tree;f=/ExternalProjects/ItkVtkGlue
http://voxel.jouy.inra.fr/darcsweb/darcsweb.cgi?r=WrapITK-unstable;a=tree;f=/ExternalProjects/FFTW

BTW, shouldn't FFTW classes be moved to InsightApplication, like  
VTKImageToImageFilter and ImageToVTKImageFilter ? It also depends on a lib  
not packaged in ITK, and it would avoid some work with cmake

>
> 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.
>

in WrapITK, you can safely remove or rename a wrap_???.cmake file to stop  
wrapping a class.

Gaetan

>
>
> 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
>>



-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-developers mailing list