[Insight-users] evolutionary optimizer...can't figure it out
Luis Ibanez
luis.ibanez at kitware.com
Wed, 11 Feb 2004 22:21:27 -0500
Hi Dennis,
You simply are missing to link
with the ITKStatistics library.
The NormalVariateGenerator is part
of the ITK Statistics framework.
Please modify your CMakeLists.txt
file and add ITKStatistics in the
TARGET_LINK_LIBRARIES() command,
along with the other ITK libraries
that you may have right now.
For an example on the use of this
optimizer, you can look at the file
ModelToImageRegistration in
Insight/Examples/Registration/
ModelToImageRegistration1.cxx
Regards,
Luis
-------------------------
Dennis Nikitenko wrote:
> Folks,
>
> I'm trying to use OnePlusOneEvolutionaryOptimizer for MI-based registration.
> However, I can't get it to compile. My code looks like this:
>
> ..
>
> typedef itk::OnePlusOneEvolutionaryOptimizer OptimizerType;
> typedef itk::Statistics::NormalVariateGenerator NormalGeneratorType;
> typedef NormalGeneratorType::Pointer NormalGeneratorPointer;
>
> ..
>
> OptimizerType::Pointer optimizer = OptimizerType::New();
> NormalGeneratorType::Pointer generator = NormalGeneratorType::New();
>
> ..
>
> I haven't been able to find any examples on the Net, so I don't know what I'm
> doing wrong. Here's the error message:
> ******************************************************************
> ImageRegistration2.o: In function
> `itk::Statistics::NormalVariateGenerator::New(void)':
> ImageRegistration2.o(.itk::Statistics::NormalVariateGenerator::gnu.linkonce.t.New(void)+0x6f):
> undefined reference to
> `itk::Statistics::NormalVariateGenerator::NormalVariateGenerator(void)'
> ImageRegistration2.o: In function
> `itk::ObjectFactory<itk::Statistics::NormalVariateGenerator>::Create(void)':
> ImageRegistration2.o(.itk::ObjectFactory<itk::Statistics::NormalVariateGenerator>::gnu.linkonce.t.Create(void)
> +0x14): undefined reference to `itk::Statistics::NormalVariateGenerator
> type_info function'
> ImageRegistration2.o(.itk::ObjectFactory<itk::Statistics::NormalVariateGenerator>::gnu.linkonce.t.Create(void)
> +0x71): undefined reference to `itk::Statistics::NormalVariateGenerator
> type_info function'
> *******************************************************************
>
> thanks,
>
> Dennis
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>