[Insight-users] VersorRigid3DTransform Translation

Luis Ibanez luis.ibanez at kitware.com
Thu Aug 24 09:16:42 EDT 2006


Hi Matt,

A number of samples = 100 is very small for computing
Mutual Information.

      How big (in pixels) are your images ?

The typical number of samples is between 1% and 5% of
the image.



Also,

      What is the pixel spacing of the image ?


The translation scale should be computed as a function
of the pixel spacing and the number of pixels. You
want it to grasp the physical extent of the image in
millimeters (or whatever units you use for the image
spacing).

Please look at the examples in the ITK Software Guide

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

and their associated source code in

     Insight/Examples/Registration

You will find many examples on how to compute the
translation scaling.


Finally, keep in mind that the "optimizerScale" variable,
multiplied by the initial stepLength is the magnitude
of the first jump that the optimizer is going to attempt
in the rotation space.  In other words, the first step
of the optimizer will attempt to rotate your image by

     [optimizerScale *  Max Step Length] (radians)


In your case this seems to be equal to 0.2 radians which
is a reasonable value.  Just keep that relationship in
mind while you experiment with different values of the
parameters.



   Regards,


      Luis



-------------------
Matt Robert wrote:
> Hi,
> 
> I am using VersorRigid3DTransform to register two 3D volumes with 
> MutualInformationImageToImageMetric. The parameters I am setting are as 
> follows:
> 
>   metric->SetFixedImageStandardDeviation( atof(argv[7])  ); //0.4
>   metric->SetMovingImageStandardDeviation( atof(argv[8]) ); //0.4
>   metric->SetNumberOfSpatialSamples( atof(argv[9]) ); // 100
>  
>   typedef OptimizerType::ScalesType       OptimizerScalesType;
>   OptimizerScalesType optimizerScales( transform->GetNumberOfParameters() );
>   const double translationScale = 1.0 / atof(argv[11]); // was 1000
> 
>   float optimizerScale = atof(argv[10]); // was 1
> 
>   optimizerScales[0] = optimizerScale;
>   optimizerScales[1] = optimizerScale;
>   optimizerScales[2] = optimizerScale;
>   optimizerScales[3] = translationScale;
>   optimizerScales[4] = translationScale;
>   optimizerScales[5] = translationScale;
> 
>   optimizer->SetScales( optimizerScales );
> 
>   optimizer->SetMaximumStepLength( atof(argv[4]) ); //was 0.2000  
>   optimizer->SetMinimumStepLength( atof(argv[5]) ); //was 0.0001
> 
>   optimizer->SetNumberOfIterations( atoi(argv[6]) ); //was 200
> 
>   optimizer->MaximizeOn();
>  
> 
> I am using CenteredTransformInitializer to initialize center for 
> registration. When registration is perfomed, only rotation parameters 
> are changed during registration, however only fractional translation 
> such as 0.01 is observed. I tried changing translation scale maximum and 
> minimum step length but it is not translating at all and only rotation 
> is effected by change of these paremeters.
> 
> I used following parameters
> 
> Fixed.mha Moving.mha Registered.mha  0.1 0.01 100 0.4 0.4 2000 1 1
> 0.1 = Max Step Length
> 0.01 =  Min Step Length
> 100 = Iterations
> 0.4 = Fixed SD
> 0.4 = Moving SD
> 2000 = bins
> 1 = translation scale
> 1 = optimizer scale
> 
> Which resulted in no chnage in translation
> 
> 0   0.0646858   [-0.0125372, -0.0222413, 0.0704458, -9876.84, -9834.56, 
> 9869.13]
> 
> 1   0.0575174   [-0.00579253, -0.0163355, 0.0340948, -9876.84, -9834.56, 
> 9869.13
> ]
> 2   0.0579627   [-0.0332293, 0.00705638, 0.0237937, -9876.84, -9834.56, 
> 9869.13]
> 
> 3   0.05574   [-0.0502068, 0.0262169, -0.0035953, -9876.84, -9834.56, 
> 9869.13]
> 4   0.070265   [-0.0734341, 0.0536047, -0.0140631, -9876.84, -9834.56, 
> 9869.13]
> 5   0.0551803   [-0.0578176, 0.0849285, -0.000649574, -9876.84, 
> -9834.56, 9869.1
> 3]
> 6   0.0417816   [-0.0477029, 0.0848597, 0.0354581, -9876.84, -9834.56, 
> 9869.13]
> 7   0.0451694   [-0.0409363, 0.090942, 0.0190652, -9876.84, -9834.56, 
> 9869.13]
> 8   0.0616735   [-0.0335143, 0.0856553, 0.0211531, -9876.84, -9834.56, 
> 9869.13]
> 9   0.0351133   [-0.0260303, 0.0912713, 0.021662, -9876.84, -9834.56, 
> 9869.13]
> 
> I changed translation scale from 0.0001 to 1000 and same for optimizer 
> scale but no difference. Any suggestion.
> 
> Matt 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list