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

Kevin H. Hobbs hobbsk at ohiou.edu
Mon Nov 24 11:00:17 EST 2008


Cutting is the only way I found to do it, I wrote a little program to
the cutting "automaticly".  I have to register a bunch of images like
this:

  __________________        _________________
 |                  |      |                 |
 |             _____|______|_____            |
 |        A   |     |      |     |    C      |
 |            |     |      |     |           |
 |            |     |   B  |     |           |
 |____________|_____|      |_____|___________|
              |                  |
              |__________________|

They all have origin ={0.0, 0.0, 0.0}

So I use the attached program to register A to B, then C to B, then I
basically re-sample the whole thing to produce the output image.

On Mon, 2008-11-24 at 04:29 -0800, Urlek wrote:
> Hi,
>    I am trying to register two considerably (but purposely) offset images
> that share only approx. 30% of the surface. Somehow,
> MeanSquaresImageToImageMetric throws the following exception:
> 
> itk::ExceptionObject (000000000113CC88)
> Location: "void __cdecl itk::MeanSquaresImageToImageMetric<class
> itk::Image<float,3>,class itk::Image<float,3> >::GetValueAndDerivative(const
> class itk::Array<double> &,double &,class itk::Array<double> &) const" 
> File:
> e:\itk\insighttoolkit-3.8.0-src\code\review\itkOptMeanSquaresImageToImageMetric.txx
> Line: 284
> Description: itk::ERROR: MeanSquaresImageToImageMetric(0000000030CE1CE0):
> Too many samples map outside moving image buffer: 219300 / 909500
> 
> This makes me wonder about the following questions:
> 1) Does that mean I have to cut out the regions that are likely to overlap
> prior to the registration? 
> 2) If so, is it possible to define a region of the image to be used in
> registration without having to cut that region out into a smaller image?
> 3) Would some metric other than MeanSquaresImageToImageMetric work better?
> Preferably another crosscorrelation-like one that supports multi-threading? 
> 
> Thanks a lot!
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: align_rot.cxx
Type: text/x-c++src
Size: 13265 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081124/7d4360d7/attachment-0001.cxx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.itk.org/pipermail/insight-users/attachments/20081124/7d4360d7/attachment-0001.pgp>


More information about the Insight-users mailing list