[ITK-users] ERROR: MeanSquaresImageToImageMetric: Too many samples map outside moving image buffer

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Jul 23 08:48:25 EDT 2014


Is this at the first iteration of after a few? Are iterations converging, diverging or erratic?

If it's the first it's an indication that initial transform is poor and they don't overlap much. There for the results of the transform initializer should be evaluated.

If it's after a few iterations, then is the iteration of the metric and optimizer needs to be examine. Is the value of the metric correct and correlated with the correct solution? Is the step size too big? Would smoothing the fixed and moving images smooth optimization? etc?

These registration examples are not designed to be turn key solution, they are a stepping stone to learn about the registration framework, and begin analyzing the behavior of the components so that a solution to your problem can be constructed.

Brad

On Jul 23, 2014, at 8:30 AM, elena bresciani <elena.bresciani87 at gmail.com> wrote:

> ExceptionObject caught !
> 
> itk::ExceptionObject (0x3043350)
> Location: "void itk::MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>::GetValueAndDerivative(const ParametersType&, itk::MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>::MeasureType&, itk::MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>::DerivativeType&) const [with TFixedImage = itk::Image<unsigned char, 2u>; TMovingImage = itk::Image<unsigned char, 2u>; itk::MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>::ParametersType = itk::OptimizerParameters<double>; itk::MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>::MeasureType = double; itk::MeanSquaresImageToImageMetric<TFixedImage, TMovingImage>::DerivativeType = itk::Array<double>]" 
> File: /usr/local/include/ITK-4.5/itkMeanSquaresImageToImageMetric.hxx
> Line: 257
> Description: itk::ERROR: MeanSquaresImageToImageMetric(0x30384c0): Too many samples map outside moving image buffer: 4042 / 568832
> 
> 
> 2014-07-23 13:47 GMT+02:00 Bradley Lowekamp <blowekamp at mail.nih.gov>:
> What is the error you are getting?
> 
> Brad
> On Jul 23, 2014, at 6:20 AM, elena bresciani <elena.bresciani87 at gmail.com> wrote:
> 
> > Hello folks,
> >
> > I have a registration problem for you. I'm using the code in the example ImageRegistration5.cxx in order to align image of drugs blisters to assess if they are the same or not.
> >
> > The code works well even though for certain images couples I get the error in this message object.
> > I thought the problem could be the relative difference in images size and tried to pad the smallest one to have the same size as the biggest: same error.
> > After reading comments on the same topic I tried to add to the code the line
> >
> > registration -> SetFixedImageRegion (fixedImage -> GetBufferedRegion());
> >
> > again not solving my problem.
> > Attached you can find example images: while I can register image "1" on image "0", if I try to register "2" on "1" I get the ERROR.
> >
> > Any guess?
> >
> > Cheers,
> > Elena
> >
> >
> >
> > <0.jpg><1.jpg><2.jpg>
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/insight-users
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20140723/6a2bbdb4/attachment.html>


More information about the Insight-users mailing list