<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
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>
</body>
</html>