[Insight-users] symmetry of paths during optimizations?

Carolyn Johnston Carolyn . Johnston at vexcel . com
Fri, 24 Oct 2003 14:06:51 -0600


Hello Luis and everyone,

I am testing an addition I made to ITK's registration code to deal with 
invalid data values at locations in the fixed and/or moving image (i.e., 
voids where no data was available). I'm testing with datasets in which 
one image but not both contains voids. I noted that the results were 
much better when it was the fixed image that contained the voids, rather 
than the moving image (I am using the mean squared diff metric, btw).

I did some thinking, but couldn't think of any reason why this should be 
the case. Some analysis indicated that, in general (even without a 
void-handling metric), the following should be true:

suppose M_1 is the metric value with dataset 1 fixed and dataset 2 
moving, and M_2 is the metric with the roles reversed. Then if A is any 
transform, M_1(A) should equal M_2(A^{-1}).

In my case, A comes from the class of 2d translations. It seems that it 
should follow that the paths traversed through (2-d translation) 
parameter space should be identical except for the signs, since if 
M(A)=M(-A), then the gradients should should satisfy GM(-A)=-GM(A).

So I tried this in a special case, with dataset 1 == dataset 2 (call the 
associated metric value M). With this setup we should have M(A) == 
M(A^{-1}) for all A. I tested this out on a simple dataset, using 2d 
translation for my class of transforms. I tested starting at A=(200, 
200), and again starting at A=(-200, -200). The paths traversed 
definitely were different, though; I have included them below (note that 
the sought-for translation is (0,0) since the fixed and moving images 
are identical. These results are both good; pixels are 10m by 10m).

Any ideas as to what would cause the paths to differ? Can this really 
just be due to floating-point (or double-precision in this case) 
calculation? In the first test case, the differences are really 
significant -- one is good, and the other is not so good.

Carolyn

______________________________
case 1: A=(200, 200).

results in: iteration, metric, x-translation, y-translation format.

0,   540.819,   147.682,   170.626
1,   414.266,   103.62,   129.901
2,   290.013,   60.2249,   88.466
3,   171.867,   23.6045,   40.9376
4,   68.4828,   -22.9466,   3.08267
5,   19.2035,   6.67485,   -1.66807
6,   13.905,   -8.29302,   -0.68675
7,   21.2509,   -0.793141,   -0.729861
8,   0.219644,   6.6198,   0.409585
9,   13.5742,   2.86996,   0.444662
10,   2.56361,   -0.879941,   0.417681
11,   0.25328,   0.984275,   0.21688
****** Full-resolution registration report ******
Translation parameter along X: 0.984275
Translation parameter along Y: 0.216880
Iterations to reach optimal value of metric: 13
Optimal value of metric: 0.303767

_____________________________________________________

Case 2: A=(-200, -200)
0,   540.819,   -141.668,   -185.95
1,   398.367,   -94.4183,   -148.971
2,   286.538,   -47.9585,   -111.004
3,   190.247,   -3.763,   -70.4238
4,   87.2118,   13.0733,   -12.8344
5,   37.392,   -16.1223,   -5.93382
6,   19.1072,   -1.15098,   -5.00597
7,   1.38825,   10.1682,   4.83662
8,   31.1645,   2.68611,   4.31824
9,   2.90384,   -4.5293,   2.2718
10,   6.60392,   -0.802291,   1.85717
11,   0.35844,   2.64124,   0.372392
12,   2.17089,   0.766263,   0.363676
13,   0.189266,   -1.10451,   0.237857
****** Full-resolution registration report ******
Translation parameter along X: -1.104511
Translation parameter along Y: 0.237857
Iterations to reach optimal value of metric: 15
Optimal value of metric: 0.385008
______________________________________________

-- 
Carolyn P. Johnston, Ph.D.
Sr. Research Engineer
Vexcel Corporation
1690 38th Street, Boulder, CO 80301
ph: 303-583-0273
fax: 303-583-0246