[Insight-users] building problem on a registration project

asertyuio asertyuio at yahoo.fr
Sat Jun 11 12:28:52 EDT 2011


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/20110611/bc28c17a/attachment.htm>


More information about the Insight-users mailing list