<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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 cite="mid:464828.213.qm@web130201.mail.mud.yahoo.com"
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="Apple-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>
</body>
</html>