[Insight-users] building problem on a registration project

asertyuio asertyuio at yahoo.fr
Sun Jun 12 12:40:40 EDT 2011


Unfortunately, adding these lines doesn't change anything...
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.

Thank for your time Dawood !

Yann

Le 11/06/2011 19:15, Dawood Al Masslawi a écrit :
> Based on the headers in your code the Cmake list should link ITKIO and
>
> ITKNumerics libraries, if you are still getting errors it's definitely 
> not because of the Cmake
>
> list. Maybe you haven't installed ITK properly! Take a look at the ITK 
> software guide and
>
> tutorials (http://www.itk.org/ITK/help/tutorials.html).
>
> Regards,
>
> Dawood
>
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
>
>
> --- On *Sat, 6/11/11, asertyuio /<asertyuio at yahoo.fr>/* wrote:
>
>
>     From: asertyuio <asertyuio at yahoo.fr>
>     Subject: Re: building problem on a registration project
>     To: "Dawood Al Masslawi" <masslawi at gmail.com>
>     Cc: insight-users at itk.org
>     Date: Saturday, June 11, 2011, 12:28 PM
>
>     Thanks a lot Dawood !
>     I tried changing this line (maybe not like I need, i'll try
>     again), without getting rid of my errors.
>     Here are my headers :
>
>     // headers
>     //image
>     #include "itkImageRegistrationMethod.h"
>     #include "itkImage.h"
>
>
>     //metric
>     #include "itkMeanSquaresImageToImageMetric.h"
>
>     //interpolation
>     #include "itkLinearInterpolateImageFunction.h"
>
>     //optimizer
>     #include "itkGradientDescentOptimizer.h"
>
>     // transform
>     #include "itkCenteredRigid2DTransform.h"
>     #include "itkCenteredTransformInitializer.h"
>
>     // file
>     #include "itkImageFileReader.h"
>     #include "itkImageFileWriter.h"
>
>     // filters
>     #include "itkResampleImageFilter.h"
>     #include "itkCastImageFilter.h"
>     #include "itkSubtractImageFilter.h"
>     #include "itkRescaleIntensityImageFilter.h"
>     #include "itkIdentityTransform.h"
>     #include "itkNormalizeImageFilter.h"
>     #include "itkCheckerBoardImageFilter.h"
>
>
>     //  The following section of code implements a Command observer
>     //  that will monitor the evolution of the registration process.
>     //
>     #include "itkCommand.h"
>
>
>     Yann
>
>
>     Le 11/06/2011 18:11, Dawood Al Masslawi a écrit :
>>     Hi Yann,
>>
>>     What are the main components of your registration code (the headers)?
>>
>>     Try changing the last line of your Cmake list with the following,
>>
>>     TARGET_LINK_LIBRARIES (Registrationtest2 ITKIO ITKNumerics)
>>
>>     HTH,
>>
>>     Dawood
>>
>>
>>     >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>>     >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>>
>>     Hi all,
>>
>>     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.
>>     I write my own project, that is mostly derived from the
>>     registration examples.
>>     But I have a full set of building errors, that seems to be
>>     related to the same problem (linkage to the libraries).
>>     I expect this to be related to a bad cmake configuration, but I
>>     try hours to solve the problem unsuccessfully.
>>     Here is my c make file :
>>
>>     # This is the root ITK CMakeLists file.
>>     CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
>>     IF(COMMAND CMAKE_POLICY)
>>       CMAKE_POLICY(SET CMP0003 NEW)
>>     ENDIF(COMMAND CMAKE_POLICY)
>>
>>     # This project is designed to be built outside the Insight source
>>     tree.
>>     PROJECT(Registrationtest2)
>>
>>     # Find ITK.
>>     FIND_PACKAGE(ITK REQUIRED)
>>
>>     INCLUDE(${ITK_USE_FILE})
>>
>>     INCLUDE_DIRECTORIES( ${ITK_INCLUDE_DIR} )
>>
>>     link_directories(${ITK_lib_dir})
>>
>>     ADD_EXECUTABLE(Registrationtest2 Registrationtest2.cxx )
>>
>>     TARGET_LINK_LIBRARIES(Registrationtest2 ${ITK_LIBRARIES})
>>
>>
>>
>>     and a few lines of building errors that are related to sources i
>>     haven't change :
>>
>>     1>Registrationtest2.cxx
>>     1>..\Registrationtest2.cxx(68) : error C2039:
>>     'itkGradientDescentOptimizer' : n'est pas membre de 'itk'
>>     1>..\Registrationtest2.cxx(68) : error C2146: erreur de syntaxe :
>>     absence de ';' avant l'identificateur 'OptimizerType'
>>     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
>>     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
>>     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
>>     1>..\Registrationtest2.cxx(69) : error C2143: erreur de syntaxe :
>>     absence de ';' avant '*'
>>     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
>>     1>..\Registrationtest2.cxx(78) : error C2065: 'OptimizerPointer'
>>     : identificateur non déclaré
>>
>>     (in French, sorry)
>>
>>     I hope someone could help me, I'm despairing... thanks a lot !
>>
>>     Yann
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110612/833b702e/attachment.htm>


More information about the Insight-users mailing list