[Insight-users] OptimizerScales for Rigid3DTransform

Wolf, Levin Levin.Wolf at haw-hamburg.de
Thu Jul 28 04:32:15 EDT 2011


Hi everybody,

i´m working on an 3D multisresolution Mutual Information registration of two (MRI and PET) 198x177x176 images.
Still having some trouble to configurate/understand the OptimizerScales.

I´m using:

itk::MattesMutualInformationImageToImageMetric
itk::VersorRigid3DTransform
itk::VersorRigid3DTransformOptimizer
itk::CenteredTransformInitializer

with the following settings i´m getting kind of reasonable results:

  optimizer->SetNumberOfIterations( 200 );
  optimizer->SetRelaxationFactor( 0.8 );

  metric->SetNumberOfHistogramBins( 64 ); 
  metric->SetNumberOfSpatialSamples( 1000 );

----------

registration->SetNumberOfLevels( 3 );

translationScale = 1.0 / 1000.0;

----------

    if ( registration->GetCurrentLevel() == 0 )
      {
      optimizer->SetMaximumStepLength( 4.0 );
      optimizer->SetMinimumStepLength( 1.0 );
      }
    else
      {
      optimizer->SetMaximumStepLength( optimizer->GetCurrentStepLength() / 2.0); 
      optimizer->SetMinimumStepLength( optimizer->GetMinimumStepLength() / 10.0 );
      }



I doubt that my understanding of the Optimizer Scores is so far correct, as:

optimizerSacels[0-2]  handling the rotation Vectors and optimizerSacels[3-5] handling the translation.

TranslationScale should be something around  1.0 /  (  10.0 * pixelspacing[]  *  imagesize[]  ).

  optimizerScales[0] = 1.0; 
  optimizerScales[1] = 1.0;
  optimizerScales[2] = 1.0;
  optimizerScales[3] = translationScale;
  optimizerScales[4] = translationScale;
  optimizerScales[5] = translationScale;


1# 
How are StepLength and optimizerScales mathematically connected?
I think i miss some invertation somewhere...
Can somebody give me an example how the used steplength is calculated?

2#
How to calculate the rotation in degree from the transform matrix or the versor?



Thanks a lot

Levin




my registration output:


No.     Metrik           -----------------------Versor------------------     ---------------Trans--------------------
                                        X                        Y                   Z                      X                Y                    Z
level 0
0	-0.434085	-0.0453235	-0.00365851	0.0380922	3.65848		-4.78029	7.72926
1	-0.441963	-0.065425	-0.00109901	0.0402133	0.400226	-5.11178	10.0254
2	-0.527788	-0.0809096	-0.00383627	0.0243161	-1.80984	-7.4018		7.60272
3	-0.469576	-0.108171	0.0448434	0.0174219	-3.58315	-5.68788	4.45547
4	-0.443196	-0.130384	0.0244415	0.0181534	-1.75428	-3.1303		5.0474
5	-0.595939	-0.10738	0.038242	-0.000988865	1.0507		-4.52536	4.39814
6	-0.547554	-0.113787	0.0319297	-0.00447655	-1.43809	-5.1177		4.3071
7	-0.533974	-0.109229	0.0320116	0.0108152	-0.214477	-3.56866	4.85164
8	-0.60975	-0.0998999	0.0351064	0.0214598	0.47604		2.20691		3.48699
9	-0.644637	-0.091603	0.028456	0.0189991	-0.607782	-3.39916	3.19078
10	-0.643465	-0.0824678	0.0205565	0.0155344	-1.40322	-2.43265	2.80286
11	-0.632725	-0.0778003	0.0204258	0.0110547	-0.637705	-3.1351		2.9439


level 1
0	-0.652674	-0.0779884	0.022258	0.00968066	-0.872723	-3.01044	2.61966
1	-0.647912	-0.0757236	0.0213353	0.00906033	-0.599485	-2.85108	2.73152
2	-0.648925	-0.074265	0.0206066	0.00437015	-0.763161	-3.05931	2.68898
3	-0.651252	-0.074442	0.0225188	0.00355956	-0.669271	-2.92691	2.54843
4	-0.649603	-0.0729864	0.02262		0.00238111	-0.773607	-2.9323		2.68476
5	-0.656248	-0.0731143	0.023994	0.00172029	-0.705649	-2.85536	2.59343
6	-0.655489	-0.0720442	0.0248754	0.00147885	-0.71814	-2.85776	2.70261

level 2
0	-0.567585	-0.0717736	0.0251463	0.00182228	-0.675652	-2.86679	2.69578
1	-0.571927	-0.0719708	0.0254104	0.0021371	-0.637012	-2.85548	2.67811
2	-0.574749	-0.0724238	0.0256931	0.00217107	-0.605939	-2.85609	2.64701
3	-0.574939	-0.0726829	0.0254813	0.00167728	-0.601129	-2.88391	2.66797
4	-0.576008	-0.0733763	0.0254274	0.00187068	-0.588874	-2.85989	2.66004
5	-0.575719	-0.0732486	0.0254129	0.00160801	-0.582004	-2.87977	2.65202
6	-0.576508	-0.0735178	0.0252618	0.00163206	-0.576202	-2.87327	2.66777
7	-0.57675	-0.0734812	0.0252622	0.00157665	-0.560255	-2.88156	2.66901
8	-0.578386	-0.0736153	0.025312	0.00167774	-0.544362	-2.87308	2.6692
9	-0.578829	-0.0736586	0.0252763	0.00152582	-0.541309	-2.88696	2.67159
10	-0.579787	-0.0738246	0.0252207	0.00161692	-0.533595	-2.88048	2.67718
------------------------------------------------------------------------------
Result:

 totalTime = 128 sec
 Transform Center = [16.504, 16.9786, 15.3476]
 Versor X = -0.0738246
 Versor Y = 0.0252207
 Versor Z = 0.00161692
 Translation X = -0.533595
 Translation Y = -2.88048
 Translation Z = 2.67718
 Iterations    = 12
 Metric value  = -0.579749
 Matrix  = 
0.998723 -0.00694781 0.050049
-0.000499832 0.989095 0.147281
-0.0505264 -0.147117 0.987828

Offset = 
[-1.16268, -4.94747, 6.19573]





More information about the Insight-users mailing list