Dear all,<br><br>When running an image registration algorithm with mask, I get this error:<br><br>File: /MMprogs/src/ITK_src/Code/Algorithms/itkMeanSquaresImageToImageMetric.txx<br>Line: 364<br>Description: itk::ERROR: MeanSquaresImageToImageMetric(0x95f63f0): All the points mapped to outside of the moving image<br>

<br>I&#39;ve traced this to the following problem:<br>in ImageMaskSpatialObject-&gt;IsInside(), all points are found outside of the mask/image (?)<br><br>and this is because the boundingbox of the mask has bounding values of 0, 0, 0, 0, 0, 0, so indeed, there are no points that<br>

can be found inside these values.<br><br>I am a bit stuck now, apparently, the mask that I created from a segmented volume is not converted into a bounding box correctly.<br><br>Where do I check to find out why this is happening?<br>

<br>cheers, <br><br>Michael<br><br><br>ps: some more info about my data:<br><br>new moving image origin:    [0, 0, 0]<br>fixed image size:      [215, 172, 48]<br>fixed image origin:    [44.0625, 0, 0]<br>fixed image spacing:   [0.3125, 0.3125, 1.9808]<br>

fixed image direction: <br>1 0 0<br>0 1 0<br>0 0 1<br><br><br>moving image size:      [512, 512, 52]<br>moving image origin:    [0, 0, 0]<br>moving image spacing:   [0.3125, 0.3125, 1.92911]<br>moving image direction: <br>

1 0 0<br>0 1 0<br>0 0 1<br><br><br>image mask size:      [215, 172, 48]<br>image mask origin:    [44.0625, 0, 0]<br>image mask spacing:   [0.3125, 0.3125, 1.9808]<br>image mask direction: <br>1 0 0<br>0 1 0<br>0 0 1<br><br>