<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><span class="Apple-style-span" style="font-family: arial, helvetica, clean, sans-serif; line-height: 15px; "><table cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-size: inherit; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; display: table; "><tbody style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><tr style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; display: table-row; vertical-align: inherit; "><td valign="top" style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; display: table-cell; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font:
inherit; ">Based on the headers in your code the Cmake list should link ITKIO and<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">ITKNumerics libraries, if you are still getting errors it's definitely not because of the Cmake</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px;
line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">list. Maybe you haven't installed ITK properly! Take a look at the ITK software guide and</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px;
margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">tutorials (<a rel="nofollow" target="_blank" href="http://www.itk.org/ITK/help/tutorials.html" style="line-height: 1.2em; text-decoration: none; color: rgb(0, 51, 153); outline-style: none; outline-width: initial; outline-color: initial; "><span class="yshortcuts" id="lw_1307812466_0" style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">http://www.itk.org/ITK/help/tutorials.html</span></a>).</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none;
outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Regards,</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">Dawood</div><div
style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial;
"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br style="line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px;
margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color: initial; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 1.2em; outline-style: none; outline-width: initial; outline-color:
initial; "><br></div></div></td></tr></tbody></table></span><br>--- On <b>Sat, 6/11/11, asertyuio <i><asertyuio@yahoo.fr></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: asertyuio <asertyuio@yahoo.fr><br>Subject: Re: building problem on a registration project<br>To: "Dawood Al Masslawi" <davoud_zzz@yahoo.com><br>Cc: insight-users@itk.org<br>Date: Saturday, June 11, 2011, 12:28 PM<br><br><div id="yiv969059527">
Thanks a lot Dawood !<br>
I tried changing this line (maybe not like I need, i'll try again),
without getting rid of my errors.<br>
Here are my headers : <br>
<br>
// headers<br>
//image<br>
#include "itkImageRegistrationMethod.h"<br>
#include "itkImage.h"<br>
<br>
<br>
//metric<br>
#include "itkMeanSquaresImageToImageMetric.h"<br>
<br>
//interpolation<br>
#include "itkLinearInterpolateImageFunction.h"<br>
<br>
//optimizer<br>
#include "itkGradientDescentOptimizer.h"<br>
<br>
// transform<br>
#include "itkCenteredRigid2DTransform.h"<br>
#include "itkCenteredTransformInitializer.h"<br>
<br>
// file<br>
#include "itkImageFileReader.h"<br>
#include "itkImageFileWriter.h"<br>
<br>
// filters<br>
#include "itkResampleImageFilter.h"<br>
#include "itkCastImageFilter.h"<br>
#include "itkSubtractImageFilter.h"<br>
#include "itkRescaleIntensityImageFilter.h"<br>
#include "itkIdentityTransform.h"<br>
#include "itkNormalizeImageFilter.h"<br>
#include "itkCheckerBoardImageFilter.h"<br>
<br>
<br>
// The following section of code implements a Command observer<br>
// that will monitor the evolution of the registration process.<br>
//<br>
#include "itkCommand.h"<br>
<br>
<br>
Yann<br>
<br>
<br>
Le 11/06/2011 18:11, Dawood Al Masslawi a écrit :
<blockquote type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font:inherit;" valign="top">Hi Yann,
<div><br>
</div>
<div>What are the main components of your registration
code (the headers)?</div>
<div><br>
</div>
<div>Try changing the last line of your Cmake list with
the following,<br>
<div><br>
</div>
<div>TARGET_LINK_LIBRARIES (Registrationtest2 ITKIO
ITKNumerics)</div>
<div><br>
</div>
<div>HTH,</div>
<div><br>
</div>
<div>Dawood</div>
<div><br>
</div>
<div><br>
</div>
<div>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div>
<div><br>
</div>
<div>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div>
<div><br>
</div>
<div><br>
</div>
<div><span class="yiv969059527Apple-style-span" style="
font-family:monospace;font-size:14px;line-height:16px;">Hi
all,<br style="line-height:1.2em;
outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
I'm new to ITK. I was interested in its registration
capacities. I download and succeed to build the
sources (windows 32 bit, last cmake, visual studio
2008), and run the helloWorld example.<br style="line-height:1.2em;outline-style:none;">
I write my own project, that is mostly derived from
the registration examples.<br style="
line-height:1.2em;outline-style:none;">
But I have a full set of building errors, that seems
to be related to the same problem (linkage to the
libraries).<br style="line-height:1.2em;outline-style:none;">
I expect this to be related to a bad cmake
configuration, but I try hours to solve the problem
unsuccessfully.<br style="line-height:1.2em;outline-style:none;">
Here is my c make file :<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
# This is the root ITK CMakeLists file.<br style="line-height:1.2em;outline-style:none;">
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)<br style="line-height:1.2em;outline-style:none;">
IF(COMMAND CMAKE_POLICY)<br style="
line-height:1.2em;outline-style:none;">
CMAKE_POLICY(SET CMP0003 NEW)<br style="line-height:1.2em;outline-style:none;">
ENDIF(COMMAND CMAKE_POLICY)<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
# This project is designed to be built outside the
Insight source tree.<br style="line-height:1.2em;outline-style:none;">
PROJECT(Registrationtest2)<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
# Find ITK.<br style="line-height:1.2em;outline-style:none;">
FIND_PACKAGE(ITK REQUIRED)<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
INCLUDE(${ITK_USE_FILE})<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
INCLUDE_DIRECTORIES( ${ITK_INCLUDE_DIR} )<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
link_directories(${ITK_lib_dir})<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
ADD_EXECUTABLE(Registrationtest2
Registrationtest2.cxx )<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
TARGET_LINK_LIBRARIES(Registrationtest2
${ITK_LIBRARIES})<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
and a few lines of building errors that are related
to sources i haven't change :<br style="
line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
1>Registrationtest2.cxx<br style="
line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(68) : error C2039:
'itkGradientDescentOptimizer' : n'est pas membre de
'itk'<br style="line-height:1.2em;
outline-style:none;">
1>..\Registrationtest2.cxx(68) : error C2146:
erreur de syntaxe : absence de ';' avant
l'identificateur 'OptimizerType'<br style="line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(68) : error C4430:
spécificateur de type manquant - int est pris en
compte par défaut. Remarque : C++ ne prend pas en
charge int par défaut<br style="line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(68) : error C4430:
spécificateur de type manquant - int est pris en
compte par défaut. Remarque : C++ ne prend pas en
charge int par défaut<br style="line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(69) : error C4430:
spécificateur de type manquant - int est pris en
compte par défaut. Remarque : C++ ne prend pas en
charge int par défaut<br style="line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(69) : error C2143:
erreur de syntaxe : absence de ';' avant '*'<br style="line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(69) : error C4430:
spécificateur de type manquant - int est pris en
compte par défaut. Remarque : C++ ne prend pas en
charge int par défaut<br style="line-height:1.2em;outline-style:none;">
1>..\Registrationtest2.cxx(78) : error C2065:
'OptimizerPointer' : identificateur non déclaré<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
(in French, sorry)<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
I hope someone could help me, I'm despairing...
thanks a lot !<br style="line-height:1.2em;outline-style:none;">
<br style="line-height:1.2em;outline-style:none;">
Yann</span></div>
</div>
</td>
</tr>
</tbody>
</table>
</blockquote>
<br>
</div></blockquote></td></tr></table>