[Insight-users] symmetry of paths during optimizations?
Lydia Ng
lng at insightful . com
Fri, 24 Oct 2003 17:42:26 -0700
Carolyn,
> So I tried this in a special case, with dataset 1 =3D=3D dataset 2 =
(call
the
> associated metric value M). With this setup we should have M(A) =3D=3D
> 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=3D(200,
> 200), and again starting at A=3D(-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).
Are you using a gradient based optimizer? If so, could part of the
reason that the path are not symmetric is that the optimization is
driven by the gradient of the moving image.
Say we divide an image into three equal parts vertically:
|1|2|3|
And we translated the moving image by 1/3 in one direction then we are
computing the metric over the overlap of:
fixed: | |1|2|3| |
moving: |1|2|3| | |
Compared this with moving the image 1/3 the other direction:
fixed: | |1|2|3| |
moving: | | |1|2|3|
Although in both cases the metric is between regions {2,3} and {1,2}.
The next step in the first case is driven by intensity derivatives in
region {2,3} while in the second case is driven by intensity derivatives
in region {1,2}. Hence the path (next step in the optimization) is not
the same
(unless of course the image itself was symmetric).
- Lydia
> -----Original Message-----
> From: Carolyn Johnston [mailto:Carolyn . Johnston at vexcel . com]
> Sent: Friday, October 24, 2003 1:07 PM
> To: Insight Toolkit listserv distribution
> Subject: [Insight-users] symmetry of paths during optimizations?
>=20
> Hello Luis and everyone,
>=20
> 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).
>=20
> 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:
>=20
> 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}).
>=20
> 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)=3DM(-A), then the gradients should should satisfy =
GM(-A)=3D-GM(A).
>=20
> So I tried this in a special case, with dataset 1 =3D=3D dataset 2 =
(call
the
> associated metric value M). With this setup we should have M(A) =3D=3D
> 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=3D(200,
> 200), and again starting at A=3D(-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).
>=20
> 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.
>=20
> Carolyn
>=20
> ______________________________
> case 1: A=3D(200, 200).
>=20
> results in: iteration, metric, x-translation, y-translation format.
>=20
> 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
>=20
> _____________________________________________________
>=20
> Case 2: A=3D(-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
> ______________________________________________
>=20
> --
> Carolyn P. Johnston, Ph.D.
> Sr. Research Engineer
> Vexcel Corporation
> 1690 38th Street, Boulder, CO 80301
> ph: 303-583-0273
> fax: 303-583-0246
>=20
>=20
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users