[Insight-users] problem in running the examples

Luis Ibanez luis.ibanez at kitware.com
Mon Oct 15 10:45:59 EDT 2007


Hi Giorgos,


Thanks for letting us know that you solved the problem by
adding the missing libraries to your CMakeLists.txt file.



About:     "How to run the Example ? "

Please read the ITK Software Guide

       http://www.itk.org/ItkSoftwareGuide.pdf

it provides detailed instructions on how to run all the Examples.

In particular, ImageRegistation13 is discussed in Section 8.11.4,
"Rigid registration incorporating prior knowledge",
in pdf-page 466-468.


You will find the instructions on how to run the Example in
pdf-page: 467, along with the values of the expected output.


You will find example images files in:

     Insight/Examples/Data

and

     Insight/Testing/Data/Input


If you look at the CMakeLists.txt file in Insight/Examples/Registration
The ImageRegistration13 example is run Nightly as a test by using the
following parameters:


ImageRegistration13
${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png 
    ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
${TEMP}/ImageRegistration13Test.png


Where ITK_SOURCE_DIR is the directory where you put the ITK source tree,
and TEMP is any directory where you want to write the output.



    Regards,


       Luis



----------------------
Giorgos Pichis wrote:
> Hi Luis ,
> Thanks so much for your help!
> the problem was the missing libraries. ITKNumerics and ITKStatistics in 
> the CMakeLists.txt.
> Now when trying to run the exe file, it says that there are missing 
> parameters.
> About InputImage, MovingImage and Outputimage. Are there any example 
> images in the toolkit to use? Or I have to use my own images.
> I hope this is my last question! :)
> thanks again
> 
> 
> On 10/15/07, *Luis Ibanez* <luis.ibanez at kitware.com 
> <mailto:luis.ibanez at kitware.com>> wrote:
> 
> 
>     Hi Giorgos,
> 
> 
>        You are missing to link to the ITKNumerics library.
> 
> 
>        That's the library that contains the ITK Optimizers.
> 
> 
> 
>     Please post to the mailing list the CMakeLists.txt file
>     that you wrote for the Registration examples.
> 
>         If you didn't write any CMakeLists.txt file,
>         then...
>                    That's the problem   :-)
> 
> 
>     In that case, please refer to this recent email in the
>     Archives for details on how to do so:
> 
>     http://public.kitware.com/pipermail/insight-users/2007-October/023866.html
> 
> 
> 
>     BTW: When you install ITK, the ITK.sln file is not
>           supposed to be copied to the installation directory,
>           so that's not the reason why you are having linking
>           problems.
> 
> 
> 
>        Regards,
> 
> 
>            Luis
> 
> 
>     ---------------------
>     Giorgos Pichis wrote:
>      > Hi there,
>      >
>      > I have installed the itk toolkit, runned succesfully the
>     helloworld example,
>      > but I have problems in running the registration examples.
>      > Errors appear in the compiler (Microsoft Visual C++  6).
>      > I have copied below the output window of the debugging process
>      >
>      >
>      >       Output Window
>      >
>      > Compiling... ImageRegistration13.cxx Linking... Creating library
>      > Debug/ImageRegistration13.lib and object
>     Debug/ImageRegistration13.exp
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "public: void __thiscall itk::Optimizer::SetScales(class itk::Array
>      > const &)" (?SetScales at Optimizer@itk@@QAEXABV?$Array at N@2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: virtual void __thiscall
>      >
>     itk::RegularStepGradientDescentOptimizer::StepAlongGradient(double,class
> 
>      > itk::Array const &)" (?StepAlongGradient@
>      > RegularStepGradientDescentOptimizer at itk@@MAEXNABV?$Array at N@2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: virtual void __thiscall
>      > itk::RegularStepGradientDescentBaseOptimizer::AdvanceOneStep(void)"
>      > (?AdvanceOneStep at RegularStepGradientDescentBaseOptimizer@itk
>     @@MAEXXZ)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "public: virtual void __thiscall
>      > itk::SingleValuedNonLinearOptimizer::SetCostFunction(class
>      > itk::SingleValuedCostFunction *)" (?SetCostFunction@
>      > SingleValuedNonLinearOptimizer at itk
>     @@UAEXPAVSingleValuedCostFunction at 2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: virtual void __thiscall
>      > itk::Optimizer::SetCurrentPosition(class itk::Array const &)"
>      > (?SetCurrentPosition at Optimizer@itk@@MAEXABV?$Array at N @2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "public: virtual void __thiscall
>      >
>     itk::RegularStepGradientDescentBaseOptimizer::StartOptimization(void)"
>      > (?StartOptimization at RegularStepGradientDescentBaseOptimizer@itk
>      > @@UAEXXZ) ImageRegistration13.obj : error LNK2001: unresolved
>     external
>      > symbol "public: virtual void __thiscall
>      > itk::Optimizer::SetInitialPosition(class itk::Array const &)"
>      > (?SetInitialPosition at Optimizer@itk@@UAEXABV?$Array at N @2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: virtual void __thiscall
>      > itk::RegularStepGradientDescentBaseOptimizer::PrintSelf(class
>      > std::basic_ostream > &,class itk::Indent)const " (?PrintSelf@
>      >
>     RegularStepGradientDescentBaseOptimizer at itk@@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: __thiscall
>      >
>     itk::RegularStepGradientDescentBaseOptimizer::RegularStepGradientDescentBaseOptimizer(void)"
>      > (??0RegularStepGradientDescentBaseOptimizer at itk@@ IAE at XZ)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: virtual void __thiscall
>      > itk::SingleValuedNonLinearOptimizer::PrintSelf(class
>     std::basic_ostream
>      >  > &,class itk::Indent)const " (?PrintSelf@
>      >
>     SingleValuedNonLinearOptimizer at itk@@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: virtual void __thiscall itk::Optimizer::PrintSelf(class
>      > std::basic_ostream > &,class itk::Indent)const "
>      > (?PrintSelf at Optimizer@itk
>      > @@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)
>      > ImageRegistration13.obj : error LNK2001: unresolved external symbol
>      > "protected: __thiscall itk::Optimizer::Optimizer(void)"
>      > (??0Optimizer at itk@@IAE at XZ) ImageRegistration13.obj : error LNK2001:
>      > unresolved external symbol "protected: __thiscall
>      >
>     itk::SingleValuedNonLinearOptimizer::SingleValuedNonLinearOptimizer(void)"
> 
>      > (??0SingleValuedNonLinearOptimizer at itk@@IAE at XZ )
>     ImageRegistration13.obj
>      > : error LNK2001: unresolved external symbol "protected: virtual void
>      > __thiscall itk::CostFunction::PrintSelf(class std::basic_ostream >
>      > &,class itk::Indent)const " (?PrintSelf at CostFunction@itk
>      > @@MBEXAAV?$basic_ostream at DU?$char_traits at D@std@@@std@@VIndent at 2@@Z)
>      > Debug/ImageRegistration13.exe : fatal error LNK1120: 14 unresolved
>      > externals Error executing link.exe.
>      >
>      >
>      >
>      > PS. I couldn't find the Itk.sln file in the binary directory when I
>      > installed Itk. Coult it be the problem
>      > I have CMake2.4 and InsightToolkit-3.4.0
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Insight-users mailing list
>      > Insight-users at itk.org <mailto:Insight-users at itk.org>
>      > http://www.itk.org/mailman/listinfo/insight-users
> 
> 


More information about the Insight-users mailing list