<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ah, glad you found it! I was thinking that not enabling ITK_USE_GPU would have caused a compile error, not a linking error. <div>-Kris</div><div><br><div><div>On Jun 6, 2012, at 9:18 AM, Yass Jd wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <div text="#000000" bgcolor="#FFFFFF"> Ok, stupid thing... I forgot to enable the ITK_USE_GPU feature when compiling ITK 4.2. <br> <br> Thank you ! <br> Yass Jd.<br> <br> On 06/06/12 10:31, Yass Jd wrote: <blockquote cite="mid:BLU0-SMTP4516D38E220C5F83F518780BD0D0@phx.gbl" type="cite"> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> Dear Kris, <br> <br> Thank you for your answer ! <br> <br> Here is my CMakeLists: <br> <blockquote><small><small><big>cmake_minimum_required (VERSION 2.8.5)<br> project (fMRI)<br> <br> #set (CMAKE_VERBOSE_MAKEFILE ON)<br> set(CMAKE_CXX_FLAGS "-g -Wall")<br> <br> if(COMMAND cmake_policy)<br> cmake_policy(SET CMP0003 NEW)<br> endif(COMMAND cmake_policy)<br> <br> # Find ITK.<br> FIND_PACKAGE(ITK REQUIRED)<br> IF(ITK_FOUND)<br> INCLUDE(${ITK_USE_FILE})<br> ENDIF(ITK_FOUND)<br> <br> add_executable(ReadDCMWriteNii niftihandler.cpp main.cxx )<br> target_link_libraries(ReadDCMWriteNii ${ITK_LIBRARIES})</big><br> </small></small></blockquote> Should be OK right ? Seems like I'm not linking well something... <br> <br> Best regards, <br> Yass Jd. <br> <br> <br> On 06/06/12 01:43, Kristen Zygmunt wrote: <blockquote cite="mid:ADEB0D9A-A807-4911-BD2D-72A032DCE42C@sci.utah.edu" type="cite"> <div>It looks like the GPUCommon library is not being included. </div> <div>You should have something like this line in your CMakeLists.txt:</div> <div><br> </div> <div> <div>target_link_libraries(YourExecutable ${ITK_LIBRARIES})</div> </div> <div><br> </div> <div>Can you provide your CMakeLists.txt ?</div> <div>-Kris</div> <br> <blockquote type="cite">Date: Tue, 5 Jun 2012 18:55:55 +0200<br> From: Yass Jd <<a moz-do-not-send="true" href="mailto:yasso50@hotmail.com">yasso50@hotmail.com</a>><br> Subject: [Insight-users] ITK 4.2 - GPUMeanImageFilter -<br> <span class="Apple-tab-span" style="white-space: pre; "> </span>itkGPUKernelManager<br> To: <a moz-do-not-send="true" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br> Message-ID: <<a moz-do-not-send="true" href="mailto:BLU0-SMTP296F767A77A5AD6D75BD509BD0C0@phx.gbl">BLU0-SMTP296F767A77A5AD6D75BD509BD0C0@phx.gbl</a>><br> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"<br> <br> Dear all,<br> <br> I am trying to run the following sample code with ITK 4.2 in order to <br> perform a GPU-based mean filter:<br> <br> typedef itk::GPUMeanImageFilter<ImageType,ImageType> filterType;<br> filterType::Pointer blurFilter = filterType::New();<br> blurFilter->SetInput(handler.getOutput());<br> blurFilter->SetRadius(2);<br> blurFilter->Update();<br> <br> <br> And i get the following errors from the linker (compilation is fine):<br> <br> CMakeFiles/ReadDCMWriteNii.dir/main.cxx.o: In function<br> `itk::GPUKernelManager::New()':<br> /usr/local/include/ITK-4.2/itkGPUKernelManager.h:60: undefined<br> reference to `itk::GPUKernelManager::GPUKernelManager()'<br> CMakeFiles/ReadDCMWriteNii.dir/main.cxx.o: In function<br> `itk::GPUMeanImageFilter<itk::Image<short, 4u>, itk::Image<short,<br> 4u> >::GPUGenerateData()':<br> /usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:92: undefined<br> reference to `itk::OpenCLGetLocalBlockSize(unsigned int)'<br> /usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:105: undefined<br> reference to `itk::GPUKernelManager::SetKernelArgWithImage(int,<br> unsigned int, itk::SmartPointer<itk::GPUDataManager>)'<br> /usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:106: undefined<br> reference to `itk::GPUKernelManager::SetKernelArgWithImage(int,<br> unsigned int, itk::SmartPointer<itk::GPUDataManager>)'<br> /usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:110: undefined<br> reference to `itk::GPUKernelManager::SetKernelArg(int, unsigned int,<br> unsigned long, void const*)'<br> /usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:115: undefined<br> reference to `itk::GPUKernelManager::SetKernelArg(int, unsigned int,<br> unsigned long, void const*)'<br> /usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:119: undefined<br> reference to `itk::GPUKernelManager::LaunchKernel(int, int, unsigned<br> long*, unsigned long*)<br> <br> I don't see the error ? Seems like a bad declaration in the header <br> itkGPUKernelManager.h but I didn't find it... Everythinh is well <br> included in my code though. Anybody got an idea ?<br> <br> Thank you !<br> <br> Best regards,<br> Yass Jd.<br> <br> -------------- next part --------------<br> An HTML attachment was scrubbed...<br> URL: <<a moz-do-not-send="true" href="http://www.itk.org/pipermail/insight-users/attachments/20120605/7257158d/attachment-0001.htm">http://www.itk.org/pipermail/insight-users/attachments/20120605/7257158d/attachment-0001.htm</a>><br> <br> ------------------------------</blockquote> </blockquote> <br> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_____________________________________
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at
<a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Kitware offers ITK Training Courses, for more information visit:
<a class="moz-txt-link-freetext" href="http://www.kitware.com/products/protraining.php">http://www.kitware.com/products/protraining.php</a>
Please keep messages on-topic and check the ITK FAQ at:
<a class="moz-txt-link-freetext" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre> </blockquote> <br> <br> <pre class="moz-signature" cols="72">--
Yass Jd. </pre> </div> </blockquote></div><br></div></body></html>