[Insight-users] 2D-2D Registration Problem
Kaj
kaje at kaje.info
Thu May 25 23:04:37 EDT 2006
Hello,
I implemented a simple rigid 2D-2D registration application which concentrates on translation only.
I use RegularStepGradientDescent as Optimizer and NormalizedCorrelationImageToImageMetric as
Measure (I tried also MeanSquares.), the used interpolator is LinearInterpolateImageFunction.
Everything works fine, the checkerboard visualization looks quite good, but I am not satisfied with
the output of my observer.
The final value of the similarity measure is not in all cases the smallest value. I checked if it
really minimizes and I also checked if the number of pixels considered for calculating the measure
value is constant.
Also irritating is that after registration optimizer->GetCurrentIteration() returns a value, which
differs from that of the last IterationUpdate by two.
And furthermore the transformation of the last IterationUpdate and the final transformation are
equal, but don't yield the same values.
Here an example output of one registration:
************************************************
Current Iterations: 0
Translation X: 3.83389
Translation Y: 1.14074
Similarity Value: -0.962692
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 1
Translation X: 7.51506
Translation Y: 2.70565
Similarity Value: -0.967556
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 2
Translation X: 10.6086
Translation Y: 5.24139
Similarity Value: -0.972554
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 3
Translation X: 14.4013
Translation Y: 3.97043
Similarity Value: -0.9748
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 4
Translation X: 13.8165
Translation Y: 5.88302
Similarity Value: -0.974628
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 5
Translation X: 14.8126
Translation Y: 5.79434
Similarity Value: -0.974942
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 6
Translation X: 14.7312
Translation Y: 5.30101
Similarity Value: -0.974655
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 7
Translation X: 14.8783
Translation Y: 4.82315
Similarity Value: -0.974886 <------------------------ ??
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 8
Translation X: 14.629
Translation Y: 4.805
Similarity Value: -0.974846
Pixels considered: 83835
************************************************
************************************************
Current Iterations: 9
Translation X: 14.7531
Translation Y: 4.79023
Similarity Value: -0.974937
Pixels considered: 83835
************************************************
************************************************
Final Result
************************************************
Result:
Translation X: 14.7531
Translation Y: 4.79023
Iterations: 11
Similarity Value: -0.974819 <------------------------ ??
Pixels considered: 83835
************************************************
************************************************
For following the optimizer I use the following methods:
---------------------------------------------------------
TransformType::Pointer currentPosition = TransformType::New();
currentPosition->SetParameters(optimizer->GetCurrentPosition());
optimizer->GetValue();
currentIteration = optimizer->GetCurrentIteration();
And I get my final result by these methods:
-------------------------------------------
ParametersType finalParameters = registration->GetLastTransformParameters();
optimizer->GetCurrentIteration();
optimizer->GetValue();
metric->GetNumberOfPixelsCounted();
Do I use the wrong methods ... ?
Thank you very much! Appreciate it!
Kaj
More information about the Insight-users
mailing list