[Insight-users] Error using Registration - Mutual Information + AffineTransform

sharath v sharath20284 at yahoo.com
Tue Jun 23 19:44:41 EDT 2009


Hi,

I am trying to run example ImageRegistration2 with Affine Transform. This example uses originally used Mutual Information based registration with Translation. 

I extended by using AffineTransform, and used the  CenteredTransformInitializer for initialization ( according to example ImageRegistration9, which uses Affine with MeanSquares optimizer)

But, I do run into errors.

For the CenteredTransformInitializer, I use the following piece of code

typedef itk::CenteredTransformInitializer< TransformType,  FixedImageType,  MovingImageType >  TransformInitializerType;
    TransformInitializerType::Pointer initializer = TransformInitializerType::New();
    initializer->SetTransform(   transform );
    initializer->SetFixedImage(  fixedImageReader->GetOutput() ); //*******
    initializer->SetMovingImage( movingImageReader->GetOutput() ); //*******
    initializer->MomentsOn();

    initializer->InitializeTransform();
    registration->SetInitialTransformParameters(transform->GetParameters() );

The program runs into completion, but gives WRONG values for scale and rotation parameters. The translation parameters obtained are correct. 

If I change the starred lines (above in the code) to the take the output of the  fixedSmoother and movingSmoother respectively ( which I think is correct, as they are output of the smoothing function in example2) , I get an exception 

***** Description: itk::ERROR: MutualInformationImageToImageMetric(012D3058): All the sampled point mapped  to outside of the moving image

I have tried the same with Mattes Mutual Information example, to get the same exception.

I have also used the appropriate scale setting code as in example 9.



Thanks in advance for the help,

Sharath Venkatesha



      


More information about the Insight-users mailing list