[Insight-users] Code works on windows but not on linux

motes motes mort.motes at gmail.com
Wed May 19 17:25:13 EDT 2010


I have written a registration application that use the metric
itkAdvancedMeanSquaresImageToImageMetric in the registration method.
The code is exactly the same on both my windows and linux machine
(except that they use different versions of the zlib.h file and
library).

When I run the application (using 512*512 grayscale images)   on
windows vista using visual studio 2008 everything works fine. But when
I run it on ubuntu 9.04 I get this error after the first iteration:

itk::ExceptionObject (0x2b68510)
Location: "void itk::AdvancedImageToImageMetric<TFixedImage,
TMovingImage>::CheckNumberOfSamples(long unsigned int, long unsigned
int) const [with TFixedImage = itk::Image<float, 2u>, TMovingImage =
itk::Image<float, 2u>]"
File: /home/mor/external/elastix_sources_v4.1/src/Common/CostFunctions/itkAdvancedImageToImageMetric.hxx
Line: 738
Description: itk::ERROR:
AdvancedMeanSquaresImageToImageMetric(0x2b4ff30): Too many samples map
outside moving image buffer: 0 / 20000


Any ideas on why I get this error in linux and not in windows?


More information about the Insight-users mailing list