<p class="MsoNormalCxSpFirst" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Hi Insight-users,</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">I am currently trying to use FFTW from the &quot;Review&quot;
directory option but I am having a great deal of difficulty and I would
appreciate any help.</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><u><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Attempt1</span></u></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Step 1</span></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">I download the windows version for FFTW dll files
from <a href="http://www.fftw.org/install/windows.html" target="_blank"><span style="color: blue;">http://www.fftw.org/install/windows.html</span></a> and used
lib.exe to create the .lib (import libraries). So now I have the following new
three lib files:</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">libfftw3-3.lib</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">libfftw3f-3.lib</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">libfftw3l-3.lib</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Step 2</span></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">I then modified the CMakelist for compiling the ITK by
adding </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><br>
SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake) <br>
OPTION(USE_FFTWD &quot;Use double precision FFTW if found&quot; ON) <br>
OPTION(USE_FFTWF &quot;Use single precision FFTW if found&quot; ON) <br>
FIND_PACKAGE( FFTW ) <br>
<br>
IF(USE_FFTWF) <br>
    LINK_LIBRARIES(${FFTWF_LIB}) <br>
ENDIF(USE_FFTWF) <br>
<br>
IF(USE_FFTWD) <br>
    LINK_LIBRARIES(${FFTWD_LIB}) <br>
ENDIF(USE_FFTWD)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Step 3</span></b><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Next I configure ITK in CMake. I set
ITK_USE_REVIEW, USE_FFTWD and USE_FFTWF to<span style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span>&quot;On&quot;.
I get the following error</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">CMake Error: The following
variables are used in this project, but they are set to NOTFOUND.</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Please set them or make sure they
are set and tested correctly in the CMake files:</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">FFTWD_LIB (ADVANCED)</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">linked by target
&quot;ITKAlgorithms&quot; in directory C:/Users/clefebvr/Desktop/InsightToolkit-3.20.1/Code/Algorithms</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">FFTWF_LIB (ADVANCED)</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">linked by target
&quot;ITKAlgorithms&quot; in directory
C:/Users/clefebvr/Desktop/InsightToolkit-3.20.1/Code/Algorithms</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">FFTW_INCLUDE_PATH</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">...</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">So, in CMake it mentions that it cannot find
FFTWD_LIB, FFTWD_THREADS_LIB, FFTWF_LIB, FFTWF_THREADS_LIB and
FTTW_INCLUDE_PATH. So I set the<span style="background: none repeat scroll 0% 0% white;"> </span>path
      in CMake          <span style="background: none repeat scroll 0% 0% white;">a</span>s the following</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">FFTWD_LIB, FFTWD_THREADS_LIB to libfftw3-3.lib</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">FFTWF_LIB, FFTWF_THREADS_LIB to libfftw3f-3.lib</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">FTTW_INCLUDE_PATH to directory of fftw3.h</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">I configured and generated in CMake without any
errors and there was no problem building ITK in visual studios 2008. When I try
and build my own project with itkFFTWComplexToComplexImageFilter.h  
               I get I get several
errors that are similar to the following</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">itkGaborImageSourceTest.obj :
error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan referenced
in function &quot;protected: virtual __cdecl
itk::FFTWComplexToComplexImageFilter&lt;float,2&gt;::~FFTWComplexToComplexImageFilter&lt;float,2&gt;(void)&quot;
(??1?$FFTWComplexToComplexImageFilter@M$01@itk@@MEAA@XZ)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><u><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Attempt 2</span></u><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p>


<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">I also tried a different modification to the CMakelist file
for the ITK configuration by adding </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">option(USE_FFTWD &quot;Use double precision fftw if
found&quot; ON)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">option(USE_FFTWF &quot;Use single precision fftw if
found&quot; ON)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">option(USE_SYSTEM_FFTW &quot;Use an installed
version of fftw&quot; OFF)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">if (USE_FFTWD OR USE_FFTWF)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">       
if(USE_SYSTEM_FFTW)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">       find_package( FFTW
)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">      
link_directories(${FFTW_LIBDIR})</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">       
else(USE_SYSTEM_FFTW)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">  
    link_directories(${ITK_DIR}/fftw/lib)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">      
include_directories(${ITK_DIR}/fftw/include)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">       
endif(USE_SYSTEM_FFTW)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">endif(USE_FFTWD OR USE_FFTWF)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">It did not show any FFTWD_LIB, FFTWD_THREADS_LIB,
FFTWF_LIB, FFTWF_THREADS_LIB and FTTW_INCLUDE_PATH errors in CMake. Regardless
I continued and no errors occurred generating in CMake, and building ITK in
visual studio. Again, when I tried to build my project with itkFFTWComplexToComplexImageFilter.h
from the Review folder I get several errors that are similar to the following</span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="margin-bottom: 0.0001pt; line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">itkGaborImageSourceTest.obj :
error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan referenced
in function &quot;protected: virtual __cdecl itk::FFTWComplexToComplexImageFilter&lt;float,2&gt;::~FFTWComplexToComplexImageFilter&lt;float,2&gt;(void)&quot;
(??1?$FFTWComplexToComplexImageFilter@M$01@itk@@MEAA@XZ)</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">I compiled CMake with the Visual Studios 2008 64
bit option.</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Thanks for the help,</span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"> </span></p>

<p class="MsoNormalCxSpMiddle" style="line-height: normal;"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">Calvin</span></p>

<p class="MsoNormalCxSpMiddle"> </p>