[Insight-users] pixel spacing

Luis Ibanez luis.ibanez at kitware.com
Thu Oct 11 09:18:22 EDT 2007



Hi Soosho,



 > Description: itk::ERROR: MeanSquaresImageToImageMetric(0x85148d8): All
 > the points mapped to outside of the moving image



This error message means that your current Transform is so off that
the Moving image is not overlapping at all with the Fixed image.

If you get this error at the first iteration of the Optimizer,
it indicates that you are poorly initializating the Transform.


If you get this error after several iterations of the Optimizer,
it means that the optimizer range is too large. For example,
in the case of the GradientDescentOptimizer it indicates that
your learning rate is too large.


In your case, the key to the problem is probably the values of
the image Origin:

         What are the Origins of the Images ?

Chances are that their local origins by themselves place the
images too far away from each other.

Note also that ImageRegistration1.cxx doesn't use any Transform
initialization.

Please read the ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf

In particular the "Image Registration" Chapter, and section 8.6.1
and the equations in pdf-page 382, and then look at the use of
the CenteredTransformInitializer in pages 390-.

The source code examples are indicated in the Software Guide.


About your observation regarding the Image spacing being 1x1x1,
it is likely that you are attempting to get the Spacing of the
input image *before* you call Update() on the readers.



    Regards,



      Luis



--------------
soosho wrote:
> Hi every body
> 
> Hope you are fine.
> 
> I am working on 3D-3D registration. Volume sizes are (256*256*16) and
> (128*128*4) but both differ in pixel spacing (1.367*1.367*5)mm and
> (1,1,1)mm [as showed in ImageViewer]. Whole registration's configuration
> is very simular to ImageRegistration1.cxx. I get the following
> exception:
> 
> Description: itk::ERROR: MeanSquaresImageToImageMetric(0x85148d8): All
> the points mapped to outside of the moving image
> 
> I checked the code many times. In my view two images should overlap but
> they does not??
> Could any body help??
> 
> Also when I print value of spacing in the code using image->GetSpacing()
> I get the folowing valus for spacings (1*1*1) and (1*1*1). Why there
> exist two differing spacing values?  
> 
> Thanx,
> Soosho


More information about the Insight-users mailing list