[Insight-users] Observer: GetValue and GetCurrentTransform

Michael Kuhn michakuhn at gmx . ch
Mon, 18 Aug 2003 17:18:03 -0600


Hi,

I've just noticed, that the outputs of optimizer->GetValue() and 
optimizer->GetCurrentPosition() in my observer do not correspond to each 
other. This means, if I take the output of GetCurrentPosition() and set 
it as the transform of a metric, the computed value is not the one that 
optimizer->GetValue() returns. Instead, the optimizer->GetValue() 
corresponds to the optimizer->GetCurrentPosition() of the previous 
iteration:

 ------------------ current iteration: 0
metric value: 8.1009e+007
angle[rad]: 0.0458399
axis: [0.166463, 0.0384068, 0.985299]
translation: [0.140782, -0.097263, 0.027042]
 ------------------ current iteration: 1
metric value: 3.77236e+007
angle[rad]: 0.0190741
axis: [0.817551, 0.105812, -0.566051]
translation: [0.274351, -0.200454, 0.0532276]
 ------------------ current iteration: 2
metric value: 3.77236e+007
angle[rad]: 0.0190741
axis: [0.817551, 0.105812, -0.566051]
translation: [0.274351, -0.200454, 0.0532276]

In the example above the metric value in iteration "1" corresponds to 
the transform in iteration "0". Is this intended?

Thanks,

Michael