<span style="color: rgb(0, 0, 0);">Hi </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(0, 0, 0);" lang="EN-US">Antonio,<br>
<br>
That makes a lot of sense, thanks!<br><br>Now I have the problem that I want to do a pixel multiplication between the FFTW image and a filter. My filter image is 160*160*80 but now my FFTW image is 81*160*80 (). Do I solve this by doing the following:<br>
</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">1. Make a new image of size 160*160*80</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">2. Paste the FFTW image on the left half</span> of the new image<br style="color: rgb(0, 0, 0);">
<span style="color: rgb(0, 0, 0);">3. Take the reflection of the FFTW image </span>and then flip on the x axis<br>4. Paste results from 3 into the right side of the new image<br>5. Now the new image would be the full FFTW image (160*160*80) and it can be multiplied by my filter <br style="color: rgb(0, 0, 0);">
<br>Note: My filter is not symmetric so I can not just cut it in half.<br><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">It seems like they are wanting to save time by removing r</span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><span style="color: rgb(0, 0, 0);">edundant info but if I have to do the above, I feel like over all it would take longer.</span><br style="color: rgb(0, 0, 0);">
<br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Thanks again for all the help, I really appreciate it.</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">Calvin</span><br>
<br></span><br><div class="gmail_quote">2011/11/23 Antonio Gómez Barquero <span dir="ltr"><<a href="mailto:agb1@alu.upct.es">agb1@alu.upct.es</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="ES"><div><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Hi<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">I have used another complex to real function, and the treatment of the result is not so easy …it took me some time some months ago! Here you have the info I get by an example:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">First, we have this matrix:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><u></u><img src="cid:image002.png@01CCA9C6.59953070" width="168" height="99"><u></u><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">The next matrix ‘B’ is the theoretical result of the fft for example doing it with Matlab :<u></u><u></u></span></p>
<p class="MsoNormal"><u></u><span><table align="left" cellpadding="0" cellspacing="0"><tbody><tr><td width="257" height="8"></td></tr><tr><td></td><td><img src="cid:image003.png@01CCA9C6.59953070" width="3" height="118"></td>
</tr></tbody></table></span><u></u><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><br clear="ALL"><p class="MsoNormal">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u><img src="cid:image005.png@01CCA9C6.59953070" width="339" height="99"><u></u><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">As the result is real, there is redundant info, for taking advance of this point, fftw takes the firs ‘n1/2 +’ colummns of the ‘B’ matrix.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">And the places of the result in fftw is the following one (take care that is a 2D matrix ), the whole info that you need can be extracted from the two first columns or the first row .<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u><img src="cid:image007.png@01CCA9C6.59953070" width="412" height="243"><u></u><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">I don’t know why in the fftw manual is not well explicated…<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Hope it helps<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Antonio<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: "Tahoma","sans-serif";">De:</span></b><span style="font-size: 10pt; font-family: "Tahoma","sans-serif";"> Calvin Lefebvre [mailto:<a href="mailto:calvin.lefebvr7@gmail.com" target="_blank">calvin.lefebvr7@gmail.com</a>] <br>
<b>Enviado el:</b> miércoles, 23 de noviembre de 2011 4:18<div><div></div><div class="h5"><br><b>Para:</b> Antonio Gómez Barquero<br><b>CC:</b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br>
<b>Asunto:</b> Re: [Insight-users] Insight-users Digest Questions - Problems Building FFTW From Review<u></u><u></u></div></div></span></p><div><div></div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom: 12pt;">
<span style="color: black;">Hi </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: black;" lang="EN-US">Antonio,<br><br>I think it is fixed, I just put <br><br>PATH=%PATH%;C:\Users\...\FFTW_LIBS<br>
</span><span style="color: black;"><br></span>into my debugging environment. I ran into another problem though. When I do the FFTWRealToComplexConjugateImageFilter the image is right except that it cuts my image in half. For example I have an image with 160x160x80 dimension and after the FFTRealToComplex I get an image with 81x160x80 dimension. I can not figure out why this is; do you have an idea? I have place that part of my code below.<br>
<br>Thanks for the help,<br><br>Calvin<br><br>My code is:<br><br>typedef float PixelType;<br>const unsigned int ImageDimension = 3;typedef itk::Image< PixelType, ImageDimension > ImageType;<br><br>typedef itk::ImageFileReader<ImageType> ReaderType;ReaderType::Pointer reader = ReaderType::New();<br>
reader->SetFileName(argv[2]);<br><br><br>// FFT filter<br>typedef itk::FFTWRealToComplexConjugateImageFilter < PixelType, ImageDimension> FFTWFilterType;<br><br>FFTWFilterType::Pointer fftFilter = FFTWFilterType::New();<br>
fftFilter->SetInput( reader->GetOutput() );<br> <br>try<br>{<br> fftFilter->Update();<br>}catch( itk::ExceptionObject & excp )<br>{<br> std::cerr << "Error: " << std::endl;<br> std::cerr << excp << std::endl;<br>
}<br> <br>unsigned long x = fftFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[0];<br>unsigned long y = fftFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[1];<br>unsigned long z = fftFilter->GetOutput()->GetLargestPossibleRegion().GetSize()[2];<br>
<br>typedef FFTWFilterType::OutputImageType SpectralImageType;<br><br>typedef itk::ComplexToRealImageFilter<SpectralImageType, ImageType> RealFilterType;<br>RealFilterType::Pointer RealFFT = RealFilterType::New();<br>
RealFFT->SetInput(fftFilter->GetOutput());<br><br><br>typedef itk::ImageFileWriter<ImageType> WriterType;<br>WriterType::Pointer writer2 = WriterType::New();<br>writer2->SetFileName( argv[3] );<br>writer2->SetInput( RealFFT->GetOutput() );<br>
<br><u></u><u></u></p><div><p class="MsoNormal">2011/11/22 Antonio Gómez Barquero <<a href="mailto:agb1@alu.upct.es" target="_blank">agb1@alu.upct.es</a>><u></u><u></u></p><div><div><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);">Hi!,</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">From your last reply I assume that you solved the problems of all the steps, basically all of the steps are done in the internal configuration of the Project you are working with in Visual Studio ( and for both modes ‘Debug’ and ‘Release’ ) , the bad point is that you have to repeat each step each time you build a new project.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">That error sounds familiar to me, please first check if that file is inside the folder ‘ FFTW_LIBS’ ( which must be inside the project visual studio folder).</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">If it is inside another idea that came to my mind is to first create a system environment variable of the system and associated it to the folder FFTW_LIBS and call it “PATH_FFTW_LIBS”. Then, in Visual Studio , go to “Tools > Options > Projects and Solutions > VC++ Directories > Show directories for : </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p style="margin-left: 53.25pt;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">-</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">“Inclusion files”</span><u></u><u></u></p>
<p style="margin-left: 53.25pt;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">-</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">“Library files”</span><u></u><u></u></p>
<p style="margin-left: 89.25pt;"><span style="font-size: 11pt; font-family: "Courier New"; color: rgb(31, 73, 125);" lang="EN-US">o</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">And in both places write : $(PATH_FFTW_LIBS)</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Tell me if it works!</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">You’re welcome!</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Antonio</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: "Tahoma","sans-serif";">De:</span></b><span style="font-size: 10pt; font-family: "Tahoma","sans-serif";"> Calvin Lefebvre [mailto:<a href="mailto:calvin.lefebvr7@gmail.com" target="_blank">calvin.lefebvr7@gmail.com</a>] <br>
<b>Enviado el:</b> martes, 22 de noviembre de 2011 6:13<br><b>Para:</b> Antonio Gómez Barquero<br><b>CC:</b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br><b>Asunto:</b> Re: [Insight-users] Insight-users Digest Questions - Problems Building FFTW From Review</span><u></u><u></u></p>
<div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: black;">Hi </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: black;" lang="EN-US">Antonio Gómez Barquero,</span><br>
<br>Just an update. I completed your steps 1-6 and the project built for the first time but now when I go to debug a window pops up and has the following message<br><br>`The program can't start because libfftw3-3.dll is missing from your computer. Try reinstalling the program to fix this problem.' <br>
<br>I did not touch libfftw3-3.dll so I am not sure what happened. Did you ever get this error?<span style="color: black;"><br><br>Thanks for your help again,<br><br>Calvin<br><br>ps Sorry for sending twice but I forgot to include <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a></span><u></u><u></u></p>
<div><p class="MsoNormal">2011/11/21 Calvin Lefebvre <<a href="mailto:calvin.lefebvr7@gmail.com" target="_blank">calvin.lefebvr7@gmail.com</a>><u></u><u></u></p><p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: black;">Hi </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: black;" lang="EN-US">Antonio Gómez Barquero,<br>
<br>Thank you for your help, I really appreciate it. I just had 3 more question if you do not mind.<br><br><u>Question 1</u><br><br>I understand up until your step 3 but then there is a gap between step 3 and step 4.<br></span><span style="color: black;"><br>
After step 3 I configure ITK with CMake and I set ITK_USE_REVIEW, USE_FFTWD and USE_FFTWF to<span style="background: none repeat scroll 0% 0% white;"> </span>"On" but the problem is CMake can not find</span><u></u><u></u></p>
<p class="MsoNormal"><span style="color: black;">FFTWD_LIB</span><u></u><u></u></p><p class="MsoNormal"><span style="color: black;">FFTWD_THREADS_LIB</span><u></u><u></u></p><p class="MsoNormal"><span style="color: black;">FFTWF_LIB </span><u></u><u></u></p>
<p class="MsoNormal"><span style="color: black;">FFTWF_THREADS_LIB</span><u></u><u></u></p><p class="MsoNormal" style="margin-bottom: 12pt;"><span style="color: black;">FTTW_INCLUDE_PATH<br><br>They are located in </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: black;" lang="EN-US">FFTW_LIBS so did you have to manually set them to a lib? If yes, then which one did you set each of them to?<br>
<br><u>Question 2</u></span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"><br></span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: black;" lang="EN-US"><br>
Also, another question so in order to use ITK in visual studios I have to do the following steps<br><br>A.Configure ITK in CMake<br>B.Build ITK in visual studios<br>C.Configure my project in CMake<br>D. Build my project in visual studios<br>
<br>In your steps 4,5,6 you are setting Additional dependencies, Additional libs directory and Environment do you do this for both building itk in visual studios and building your project in visual studios?<br><br><u>Question 3</u><br>
<br>I just wanted to check if there was a difference in your step 5b and 6?<br><br>Thanks again,<br></span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(136, 136, 136);" lang="EN-US"><br>
Calvin</span><u></u><u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p><div><p class="MsoNormal">2011/11/21 Antonio Gómez Barquero <<a href="mailto:agb1@alu.upct.es" target="_blank">agb1@alu.upct.es</a>><u></u><u></u></p>
<div><div><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Hi Calvin</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">I also had the same problem some months ago, and I solved it making some changes in the configuration of ‘Visual Studio 2008’, here I tell you the process:</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">1.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Download the file “fftw-3.3dll32.zip from fftw org website (</span><a href="http://www.fftw.org/install/windows.html" target="_blank"><span lang="EN-US">http://www.fftw.org/install/windows.html</span></a><span lang="EN-US">)</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p style="text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">2.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">In order to link to these .dll files from Visual C++, you need to create .lib "import libraries" for them, and can do so with the "lib" command that comes with VC++. In particular, run:</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left: 70.8pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> lib /def:libfftw3-3.def</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left: 70.8pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> lib /def:libfftw3f-3.def</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left: 70.8pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> lib /def:libfftw3l-3.def</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left: 70.8pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left: 70.8pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">In “Tools > Visual Studio 2008 Command Prompt” without opening any project, just Visual. Once you are in the console, you go with the ‘cd’ command to the root where the folder is placed and once there you run the three lines above, and then the ‘lib files are created.</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p style="text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">3.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Copy the folder where the libs are created and then copy it inside the project folder where we want to use it and rename the folder to “FFTW_LIBS”. In this folder the necessary files are the ones that have the ‘*.dll’ , ‘*.lib’ and the ‘fftw3.h’.</span><u></u><u></u></p>
<p style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">4.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Inclusion of the libs in the project: “Project > Properties > Configuration Properties > Linker > Entry > Additional dependencies” and then we include the three new libs files:</span><u></u><u></u></p>
<p style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal" style="margin-left: 35.4pt; text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">libfftw3-3.lib </span><u></u><u></u></p><p class="MsoNormal" style="margin-left: 35.4pt; text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">libfftw3f-3.lib</span><u></u><u></u></p><p class="MsoNormal" style="margin-left: 35.4pt; text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">libfftw3l-3.lib</span><u></u><u></u></p><p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p>
<p style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">5.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Inclusion of the path where the libs are:</span><u></u><u></u></p>
<p style="margin-left: 72pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">a.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">“Project > Properties > Configuration Properties > Linker > General > Additional libs directory” , and there we write “./FFTW_LIBS”.</span><u></u><u></u></p>
<p style="margin-left: 72pt; text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">b.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">“Project > Properties > Configuration Properties > Depuration > Environment” , and there we write “./FFTW_LIBS”.</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p style="text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">6.</span><span style="font-size: 7pt; color: rgb(31, 73, 125);" lang="EN-US"> </span><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Inclusion of the path where the ‘.dll’ file is. In “Project > Properties > Configuration Properties > Depuration > Environment”. In the variable ‘enviroment’ we have to specify where the file ‘libfftw3-3.dll’ and we write “PATH = .\FFTW_LIBS”</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal" style="text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">After all of this steps, you just have to add “ #include fftw3.h” and use the fftw functions!</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">My visual Studio is in Spanish, so sorry if any of the word is not perfect translated.</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal" style="text-align: justify;">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Hope it helps!</span><u></u><u></u></p><p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US">Antonio Gómez Barquero</span><u></u><u></u></p>
<p class="MsoNormal" style="text-align: justify;"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal">
<span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size: 11pt; font-family: "Calibri","sans-serif"; color: rgb(31, 73, 125);" lang="EN-US"> </span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size: 10pt; font-family: "Tahoma","sans-serif";">De:</span></b><span style="font-size: 10pt; font-family: "Tahoma","sans-serif";"> <a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a> [mailto:<a href="mailto:insight-users-bounces@itk.org" target="_blank">insight-users-bounces@itk.org</a>] <b>En nombre de </b>Calvin Lefebvre<br>
<b>Enviado el:</b> viernes, 18 de noviembre de 2011 19:07<br><b>Para:</b> <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a><br><b>Asunto:</b> [Insight-users] Insight-users Digest Questions - Problems Building FFTW From Review</span><u></u><u></u></p>
<div><div><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Hi Insight-users,<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I am currently trying to use FFTW from the "Review" directory option but I am having a great deal of difficulty and I would appreciate any help.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><b><u>Attempt1</u></b><u></u><u></u></p><p class="MsoNormal"><b> </b><u></u><u></u></p><p class="MsoNormal"><b>Step 1</b><u></u><u></u></p><p class="MsoNormal">
<b> </b><u></u><u></u></p><p class="MsoNormal">I download the windows version for FFTW dll files from <a href="http://www.fftw.org/install/windows.html" target="_blank">http://www.fftw.org/install/windows.html</a> and used lib.exe to create the .lib (import libraries). So now I have the following new three lib files:<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">libfftw3-3.lib<u></u><u></u></p><p class="MsoNormal">libfftw3f-3.lib<u></u><u></u></p><p class="MsoNormal">libfftw3l-3.lib<u></u><u></u></p><p class="MsoNormal">
<u></u><u></u></p><p class="MsoNormal"><b>Step 2</b><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I then modified the CMakelist for compiling the ITK by adding <u></u><u></u></p><p class="MsoNormal">
<br>SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake) <br>OPTION(USE_FFTWD "Use double precision FFTW if found" ON) <br>OPTION(USE_FFTWF "Use single precision FFTW if found" 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)<u></u><u></u></p><p class="MsoNormal"><b> </b><u></u><u></u></p><p class="MsoNormal">
<b>Step 3</b><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">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% white;"> </span>"On". I get the following error<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">CMake Error: The following variables are used in this project, but they are set to NOTFOUND.<u></u><u></u></p><p class="MsoNormal">Please set them or make sure they are set and tested correctly in the CMake files:<u></u><u></u></p>
<p class="MsoNormal">FFTWD_LIB (ADVANCED)<u></u><u></u></p><p class="MsoNormal">linked by target "ITKAlgorithms" in directory C:/Users/clefebvr/Desktop/InsightToolkit-3.20.1/Code/Algorithms<u></u><u></u></p><p class="MsoNormal">
FFTWF_LIB (ADVANCED)<u></u><u></u></p><p class="MsoNormal">linked by target "ITKAlgorithms" in directory C:/Users/clefebvr/Desktop/InsightToolkit-3.20.1/Code/Algorithms<u></u><u></u></p><p class="MsoNormal">FFTW_INCLUDE_PATH<u></u><u></u></p>
<p class="MsoNormal">...<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">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<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">FFTWD_LIB, FFTWD_THREADS_LIB to libfftw3-3.lib<u></u><u></u></p><p class="MsoNormal">FFTWF_LIB, FFTWF_THREADS_LIB to libfftw3f-3.lib<u></u><u></u></p><p class="MsoNormal">
FTTW_INCLUDE_PATH to directory of fftw3.h<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">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<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">itkGaborImageSourceTest.obj : error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan referenced in function "protected: virtual __cdecl itk::FFTWComplexToComplexImageFilter<float,2>::~FFTWComplexToComplexImageFilter<float,2>(void)" (??1?$FFTWComplexToComplexImageFilter@M$01@itk@@MEAA@XZ)<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><u>Attempt 2</u><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I also tried a different modification to the CMakelist file for the ITK configuration by adding <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">SET(CMAKE_MODULE_PATH ${ITK_SOURCE_DIR}/CMake)<u></u><u></u></p><p class="MsoNormal">option(USE_FFTWD "Use double precision fftw if found" ON)<u></u><u></u></p>
<p class="MsoNormal">option(USE_FFTWF "Use single precision fftw if found" ON)<u></u><u></u></p><p class="MsoNormal">option(USE_SYSTEM_FFTW "Use an installed version of fftw" OFF)<u></u><u></u></p><p class="MsoNormal">
if (USE_FFTWD OR USE_FFTWF)<u></u><u></u></p><p class="MsoNormal"> if(USE_SYSTEM_FFTW)<u></u><u></u></p><p class="MsoNormal"> find_package( FFTW )<u></u><u></u></p><p class="MsoNormal"> link_directories(${FFTW_LIBDIR})<u></u><u></u></p>
<p class="MsoNormal"> else(USE_SYSTEM_FFTW)<u></u><u></u></p><p class="MsoNormal"> link_directories(${ITK_DIR}/fftw/lib)<u></u><u></u></p><p class="MsoNormal"> include_directories(${ITK_DIR}/fftw/include)<u></u><u></u></p>
<p class="MsoNormal"> endif(USE_SYSTEM_FFTW)<u></u><u></u></p><p class="MsoNormal">endif(USE_FFTWD OR USE_FFTWF)<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">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<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">itkGaborImageSourceTest.obj : error LNK2019: unresolved external symbol __imp_fftwf_destroy_plan referenced in function "protected: virtual __cdecl itk::FFTWComplexToComplexImageFilter<float,2>::~FFTWComplexToComplexImageFilter<float,2>(void)" (??1?$FFTWComplexToComplexImageFilter@M$01@itk@@MEAA@XZ)<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">I compiled CMake with the Visual Studios 2008 64 bit option.<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">
Thanks for the help,<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal">Calvin<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div><p class="MsoNormal"> <u></u><u></u></p>
</div></div></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></blockquote></div><br>