sharath v
2009-06-23 23:44:41 UTC
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
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
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://www.itk.org/mailman/listinfo/insight-users
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
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
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://www.itk.org/mailman/listinfo/insight-users