[Insight-users] evolutionary optimizer...can't figure it out

Dennis Nikitenko dnikiten at uoguelph.ca
Wed, 11 Feb 2004 22:09:35 -0500


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