Hi Ted,<br><br>You are missing to link to the ITKNumerics library.<br><br>In your CMakeLists.txt file, go to the command<br><br> TARGET_LINK_LIBRARIES() <br><br>and add "ITKNumerics" to the list.<br><br>The simple way of figuring this out is the following:<br>
<br>Your error message says that the linker is not finding<br>the symbol:<br><br> itk::SingleValuedNonLinearOptimizer<br><br>if you grep the ITK tree for "SingleValuedNonLinearOptimizer"<br>you will find entries in the directory<br>
<br> Insight/Code/Numerics<br><br>which will give you the hint that the classes in question<br>will be part of the "ITKNumerics" library.<br><br>ITK creates a library for each one of the subdirectories<br>
of "Insight/Code".<br><br><br> Regards,<br><br><br> Luis<br><br><br>-----------------------------------------------------------------------<br><div class="gmail_quote">On Tue, Feb 24, 2009 at 4:32 AM, Mr Spit <span dir="ltr"><<a href="mailto:mrspit08@gmail.com">mrspit08@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
I'm just starting with ITK and I have problems with compiling this example(error below). Moreover I was ask to do registration of an DTI image on a Anatomic Image. Could you suggest on what example should I base what would be useful?<br>
<br>
All ready thank you for help.<br>
TeDe<br>
<br>
===============================================================================================<br>
"vtable for itk::SingleValuedNonLinearOptimizer", referenced from:<br>
__ZTVN3itk30SingleValuedNonLinearOptimizerE$non_lazy_ptr in ImageRegistration8.cxx.o<br>
"vtable for itk::Optimizer", referenced from:<br>
__ZTVN3itk9OptimizerE$non_lazy_ptr in ImageRegistration8.cxx.o<br>
"itk::Optimizer::Optimizer()", referenced from:<br>
itk::NonLinearOptimizer::NonLinearOptimizer()in ImageRegistration8.cxx.o<br>
"vtable for itk::CostFunction", referenced from:<br>
__ZTVN3itk12CostFunctionE$non_lazy_ptr in ImageRegistration8.cxx.o<br>
"typeinfo for itk::CostFunction", referenced from:<br>
typeinfo for itk::SingleValuedCostFunctionin ImageRegistration8.cxx.o<br>
"itk::Optimizer::PrintSelf(std::basic_ostream<char, std::char_traits<char> >&, itk::Indent) const", referenced from:<br>
vtable for itk::NonLinearOptimizerin ImageRegistration8.cxx.o<br>
"typeinfo for itk::Optimizer", referenced from:<br>
typeinfo for itk::NonLinearOptimizerin ImageRegistration8.cxx.o<br>
"vtable for itk::VersorRigid3DTransformOptimizer", referenced from:<br>
__ZTVN3itk31VersorRigid3DTransformOptimizerE$non_lazy_ptr in ImageRegistration8.cxx.o<br>
"itk::CostFunction::PrintSelf(std::basic_ostream<char, std::char_traits<char> >&, itk::Indent) const", referenced from:<br>
vtable for itk::SingleValuedCostFunctionin ImageRegistration8.cxx.o<br>
itk::ImageToImageMetric<itk::Image<float, 3u>, itk::Image<float, 3u> >::PrintSelf(std::basic_ostream<char, std::char_traits<char> >&, itk::Indent) constin ImageRegistration8.cxx.o<br>
"itk::Optimizer::SetInitialPosition(itk::Array<double> const&)", referenced from:<br>
vtable for itk::NonLinearOptimizerin ImageRegistration8.cxx.o<br>
"itk::RegularStepGradientDescentBaseOptimizer::RegularStepGradientDescentBaseOptimizer()", referenced from:<br>
itk::VersorRigid3DTransformOptimizer::VersorRigid3DTransformOptimizer()in ImageRegistration8.cxx.o<br>
"vtable for itk::RegularStepGradientDescentBaseOptimizer", referenced from:<br>
__ZTVN3itk39RegularStepGradientDescentBaseOptimizerE$non_lazy_ptr in ImageRegistration8.cxx.o<br>
"itk::Optimizer::SetScales(itk::Array<double> const&)", referenced from:<br>
_main in ImageRegistration8.cxx.o<br>
"itk::Optimizer::SetCurrentPosition(itk::Array<double> const&)", referenced from:<br>
vtable for itk::NonLinearOptimizerin ImageRegistration8.cxx.o<br>
"typeinfo for itk::VersorRigid3DTransformOptimizer", referenced from:<br>
__ZTIN3itk31VersorRigid3DTransformOptimizerE$non_lazy_ptr in ImageRegistration8.cxx.o<br>
ld: symbol(s) not found<br>
collect2: ld returned 1 exit status<br>
make[2]: *** [ImportData] Error 1<br>
make[1]: *** [CMakeFiles/ImportData.dir/all] Error 2<br>
make: *** [all] Error 2<br>
dhcp-8-25-188:Temp tedix86$<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>