<!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">
Unfortunately, adding these lines doesn't change anything...<br>
To build itk, I already followed the you showed tutorial , and the
only step I haven't been able to do was building "ITK.dsw", because
i didn't find the file. I also build example and testing without
problem. I really don't know how to test what is done properly or
not.<br>
<br>
Thank for your time Dawood !<br>
<br>
Yann<br>
<br>
Le 11/06/2011 19:15, Dawood Al Masslawi a écrit :
<blockquote cite="mid:152316.24942.qm@web130208.mail.mud.yahoo.com"
type="cite">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="font: inherit;" valign="top"><span
class="Apple-style-span" style="font-family:
arial,helvetica,clean,sans-serif; line-height: 15px;">
<table style="border-collapse: collapse; font-size:
inherit; line-height: 1.2em; outline-style: none;
display: table;" border="0" cellpadding="0"
cellspacing="0">
<tbody style="line-height: 1.2em; outline-style:
none;">
<tr style="line-height: 1.2em; outline-style: none;
display: table-row; vertical-align: inherit;">
<td style="outline-style: none; display:
table-cell; font: inherit;" valign="top">Based
on the headers in your code the Cmake list
should link ITKIO and
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">ITKNumerics
libraries, if you are still getting errors
it's definitely not because of the Cmake</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">list.
Maybe you haven't installed ITK properly! Take
a look at the ITK software guide and</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">tutorials
(<a moz-do-not-send="true" 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;"><span class="yshortcuts"
id="lw_1307812466_0" style="line-height:
1.2em; outline-style: none;">http://www.itk.org/ITK/help/tutorials.html</span></a>).</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">Regards,</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">Dawood</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br
style="line-height: 1.2em; outline-style:
none;">
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br>
</div>
<div style="margin: 0px; padding: 0px;
line-height: 1.2em; outline-style: none;"><br>
</div>
</div>
</td>
</tr>
</tbody>
</table>
</span><br>
--- On <b>Sat, 6/11/11, asertyuio <i><a class="moz-txt-link-rfc2396E" href="mailto:asertyuio@yahoo.fr"><asertyuio@yahoo.fr></a></i></b>
wrote:<br>
<blockquote style="border-left: 2px solid rgb(16, 16,
255); margin-left: 5px; padding-left: 5px;"><br>
From: asertyuio <a class="moz-txt-link-rfc2396E" href="mailto:asertyuio@yahoo.fr"><asertyuio@yahoo.fr></a><br>
Subject: Re: building problem on a registration project<br>
To: "Dawood Al Masslawi" <a class="moz-txt-link-rfc2396E" href="mailto:davoud_zzz@yahoo.com"><davoud_zzz@yahoo.com></a><br>
Cc: <a class="moz-txt-link-abbreviated" href="mailto:insight-users@itk.org">insight-users@itk.org</a><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>
</tbody>
</table>
</blockquote>
<br>
</body>
</html>