[Insight-users] Error using Registration - Mutual Information + AffineTransform
Luis Ibanez
luis.ibanez at kitware.com
Wed Jun 24 00:21:42 EDT 2009
Hi Sharath,
If you are interested in Affine registration you should probably
start with ImageRegistration9.cxx instead of modifying
ImageRegisration2.cxx.
In particular, you are probably missing to set up the
ParameterScaling array, which is critical for normalizing the
dynamic range of the different Transform parameters.
This was not critical for the case of the Translation Transform,
but it becomes very important in Rigid and Affine transforms.
Please study the ImageRegistration9.cxx example and
let us know if you have any questions.
Thanks
Luis
----------------------------------------------------
On Tue, Jun 23, 2009 at 7:44 PM, sharath v <sharath20284 at yahoo.com> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090624/fda50fb1/attachment.htm>
More information about the Insight-users
mailing list