<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Ah, glad you found it! &nbsp;I was thinking that not enabling ITK_USE_GPU would have caused a compile error, not a linking error. &nbsp;<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.&nbsp; <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>              &nbsp; cmake_policy(SET CMP0003 NEW)<br>              endif(COMMAND cmake_policy)<br>              <br>              # Find ITK.<br>              FIND_PACKAGE(ITK REQUIRED)<br>              IF(ITK_FOUND)<br>              &nbsp; INCLUDE(${ITK_USE_FILE})<br>              ENDIF(ITK_FOUND)<br>              <br>              add_executable(ReadDCMWriteNii niftihandler.cpp main.cxx )<br>              target_link_libraries(ReadDCMWriteNii&nbsp; ${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.          &nbsp;</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 &lt;<a moz-do-not-send="true" href="mailto:yasso50@hotmail.com">yasso50@hotmail.com</a>&gt;<br>          Subject: [Insight-users] ITK 4.2 - GPUMeanImageFilter -<br>          <span class="Apple-tab-span" style="white-space: pre; "> </span>itkGPUKernelManager<br>          To:&nbsp;<a moz-do-not-send="true" href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>          Message-ID: &lt;<a moz-do-not-send="true" href="mailto:BLU0-SMTP296F767A77A5AD6D75BD509BD0C0@phx.gbl">BLU0-SMTP296F767A77A5AD6D75BD509BD0C0@phx.gbl</a>&gt;<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&nbsp;<br>          perform a GPU-based mean filter:<br>          <br>          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typedef          itk::GPUMeanImageFilter&lt;ImageType,ImageType&gt; filterType;<br>          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;filterType::Pointer blurFilter = filterType::New();<br>          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blurFilter-&gt;SetInput(handler.getOutput());<br>          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blurFilter-&gt;SetRadius(2);<br>          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blurFilter-&gt;Update();<br>          <br>          <br>          And i get the following errors from the linker (compilation is          fine):<br>          <br>          &nbsp;&nbsp;&nbsp;CMakeFiles/ReadDCMWriteNii.dir/main.cxx.o: In function<br>          &nbsp;&nbsp;&nbsp;`itk::GPUKernelManager::New()':<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUKernelManager.h:60:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to `itk::GPUKernelManager::GPUKernelManager()'<br>          &nbsp;&nbsp;&nbsp;CMakeFiles/ReadDCMWriteNii.dir/main.cxx.o: In function<br>          &nbsp;&nbsp;&nbsp;`itk::GPUMeanImageFilter&lt;itk::Image&lt;short, 4u&gt;,          itk::Image&lt;short,<br>          &nbsp;&nbsp;&nbsp;4u&gt; &gt;::GPUGenerateData()':<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:92:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to `itk::OpenCLGetLocalBlockSize(unsigned int)'<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:105:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to          `itk::GPUKernelManager::SetKernelArgWithImage(int,<br>          &nbsp;&nbsp;&nbsp;unsigned int,          itk::SmartPointer&lt;itk::GPUDataManager&gt;)'<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:106:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to          `itk::GPUKernelManager::SetKernelArgWithImage(int,<br>          &nbsp;&nbsp;&nbsp;unsigned int,          itk::SmartPointer&lt;itk::GPUDataManager&gt;)'<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:110:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to `itk::GPUKernelManager::SetKernelArg(int,          unsigned int,<br>          &nbsp;&nbsp;&nbsp;unsigned long, void const*)'<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:115:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to `itk::GPUKernelManager::SetKernelArg(int,          unsigned int,<br>          &nbsp;&nbsp;&nbsp;unsigned long, void const*)'<br>          &nbsp;&nbsp;&nbsp;/usr/local/include/ITK-4.2/itkGPUMeanImageFilter.hxx:119:          undefined<br>          &nbsp;&nbsp;&nbsp;reference to `itk::GPUKernelManager::LaunchKernel(int, int,          unsigned<br>          &nbsp;&nbsp;&nbsp;long*, unsigned long*)<br>          <br>          I don't see the error ? Seems like a bad declaration in the          header&nbsp;<br>          itkGPUKernelManager.h but I didn't find it... Everythinh is          well&nbsp;<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: &lt;<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>&gt;<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>