Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
α = (φx , φy , φz , tx , ty , tz ) (5)
1.1.1 Image Transformation and p(x) is the probability mass function of X. The marginal
and joint probability distributions of F and R can be found
Given an N -voxel image F=(I1 , ..., IN ) where Ij is the in- from their joint histogram h(F, R)
tensity of a voxel pj , and a rigid transformation Tα , where
α = (φx , φy , φz , tx , ty , tz ) is the registration parameter, the h(f, r)
transformed image Fα is given by pF R (f, r) = $ (5)
f,r h(f, r)
#
Fα = Tα F (1) pF (f ) = h(f, r) (6)
r
where each voxel j is transformed by Tα : #
! " pR (r) = h(f, r) (7)
Rx (φx )Ry (φy )Rz (φz ) t
pj =
"
p (2) f
0 1 j
where Rx (φx ), Ry (φy ), Rz (φz ) are the rotation matrices 1.1.5 Optimization
about the x, y, z axes respectively, and t = (tx , ty , tz ) is the In Maes et al., Powell’s multidimensional direction set
translational component of the rigid transformation. These method is used to minimize the negative mutual information
six parameters fully define the registration parameter α. −Iα obtained with the registration parameter α. Powell’s
algorithm applies a series of one dimensional minimizations
1.1.2 Interpolation in the registration parameter α = (φx , φy , φz , tx , ty , tz ).
The algorithms terminates when no solutions with a signif-
The transformed voxels of the image Fα do not necessarily
icantly lower cost than the previous one can be found, as
fall on the same voxel grid as the reference image. Image
controlled via a tolerance factor [2].
interpolation is thus required in order to properly assign in-
tensity values to this voxel grid. Many different methods
exist for performing image interpolation. Nearest neigh- 2. Experiments
bor (NN) interpolation sets the intensity value of the trans- 2.1. Datasets
formed voxel pj to the closest voxel grid point. Trilinear
(TRI) interpolation distributes a distance-weighted intensity In Maes et al., the MI algorithm was tested on four
value of pj amongst its neighbors. Trilinear partial vol- datasets. The first contained high-resolution MR and CT
ume distribution (PV) interpolation uses the same intensity images that were also registered manually by a physician to
weighting as TRI, but instead of defining new intensity val- provide a gold standard for comparing the results of the al-
ues in the image Fα , it directly distributes them in the joint gorithm. The images of the second dataset were smoothed
histogram of the images R and Fα . For this project, the PV and subsampled versions of those from the first one. The
interpolation method was used. third contained MR, CT, and PET images, also registered
manually by an expert. The last dataset contained a sin-
gle image, and was used to investigate the effects of image
1.1.3 Joint Histogram
degradation on the robustness of the MI algorithm.
The joint histogram h(F, R) of two images F and R In this project, three datasets containing transversal (TR)
is built by going through all their corresponding voxel and sagittal (SG) T1, T2 and PD-weighted MRI images
pairs and identifying histogram coordinates (i, j) = were used (see Table 1). MRI records the magnetization re-
(F(x, y, z), R(x, y, z)) such that h(i, j) is incremented by sponse of hydrogen atoms exposed to a high magnetic field
one (or a weight) for each pair. Figure 2 shows the joint and these different weights refer to the type of spin param-
histogram for T1 and T2-weighted images. As discussed in eter that is being monitored, resulting in different intensity
Haacke et al. [1], the bright region represents gray matter. contrasts. Datasets A and B contained perfectly aligned MR
Set Weight Axis Size Intensity 2.2. Algorithm
A T1 TR 512×512 0-256
2.2.1 Implementation
T2 TR 512×512 0-256
PD TR 512×512 0-256 The algorithm was implemented using Matlab, version
B T1 SG 100×100 0-256 R2008a, and tested on an Apple Macbook Pro Dual Core
T2 SG 100×100 0-256 2, 2.4 Ghz, running Mac OS X.
PD SG 100×100 0-256
We implemented the algorithm for the case of 2D im-
C T1 TR 512×512 0-256 ages, in order to reduce the computational complexity of
Table 1: Datasets used for the experiment. the optimization and speed up the running time. Rigid trans-
formations were interpolated with the PV method. We esti-
Joint Histogram
1000
mated the image probability distributions of the image using
900
800
the joint histogram h(F, R) with a bin size of 16. The regis-
700
600
tration parameter α was initialized to (φz = tx = ty = 0).
The pseudocode for the multimodal image registration al-
T2
500
400
200
100
T1
0
Data: A reference image R and a floating image F
(a) T1 (b) T2 (c) PD (d) Joint histogram Result: The optimal registration parameter α for
aligning F to R.
Figure 2: Joint histogram for T1 and T2-weighted images. Set the initial registration parameter α0 ;
while Powell’s method has not converged do
Apply the transformation Tα on F;
forall Voxels of Tα F that fall outside R’s grid do
Apply PV interpolation and distribute intensity
values in h using TRI weights;
end
Fill h with the remaining voxel intensities;
Compute the mutual information I(h(F, R));
Apply Powell’s method on α and −I;
Figure 3: Segmentation of a T1-weighted brain MR image Set α to the parameter returned by Powell’s;
for gray matter (gray), white matter (white), and CSF (blue). end
[4] Algorithm 1: Multimodal Image Registration by Maxi-
mization of Mutual Information
Feature T1 T2 PD
White matter Bright Dark Darker 2.3. Multimodal Registration
Gray matter Neutral Neutral Neutral
CSF Black Bright Brighter We applied an arbitrary
% in-plane rotation and translation
&
Bone Black Black Darker defined by α∗ = φ = 16 π
rads = 11.25◦ , t = (5, 10) on
datasets A and B, and registered them using Algorithm 1.
Table 2: Contrast of brain features for T1, T2, and PD [1]. The magnitudes of the differences |α − α∗ | between the so-
lutions α obtained and the optimal parameter α∗ are sum-
marized in Table 4.
images of T1, T2, and PD weights. Dataset A had high reso-
lution TR images, and dataset B low resolution SG images.
2.4. Image Degradation
Our third dataset (C) consisted of a single high-resolution
T1-weighted TR image, used for testing the robustness of Image degradation alters the intensity distribution of the
the algorithm. image and might potentially affect the robustness of the reg-
As a reference for comparing the registration results, Ta- istration process. The effects that were considered are noise,
ble 2 shows the typical intensity contrast of brain features intensity inhomogeneity, and geometric distortion. We ap-
– white matter, gray matter, cerebrospinal fluid (CSF) and plied translations in the x direction (-64 to 64 pixels) on the
bone – for different MRI weights. Figure 2 shows examples degraded images and computed their MI with the original
of T1, T2 and PD weighted MRI images and a T1-T2 joint image, resulting in the so-called MI traces. As a compar-
histogram. Figure 3 shows the main structure classes (right) ison, the MI traces for the original image of dataset C are
of a T1-weighted brain image (left) [4]. shown on Figure 4.
MI traces for original image MI traces for image with intensity inhomogeneity
2.5 1.6
k=0.002
k=0.004
k=0.006
1.4
2
1.2
1.5
MI
MI
0.8
0.5
0.6
0
!80 !60 !40 !20 0 20 40 60 80 0.4
Translation (pixels)
% &
1
∆ log I(x, y) = −k (x − xc ) + (y − yc )
2 2
(9)
|! ! ! 0|
14
0.6
12
0.5 10
MI
8
2 4 6 8 10 12 14 16
0.4
Subsampling factor
0.3
Figure 8: Optimal registration parameter magnitude differ-
ence as a function of the subsampling factor f = fx fy .
0.2
0.1
Set φ tx ty |α − α∗ | t (s)
!80 !60 !40 !20 0 20 40 60 80
Translation (pixels)
A Reference 0.196 -5 -10
T1 ←! T2 0.197 -2.10 -9.90 2.90 65.1
Figure 7: MI traces for the dataset C image degraded with T1 ←! PD 0.206 -2.08 -9.60 2.94 74.6
geometric distortion of scaling k = 0.0005, 0.00075, 0.001. T2 ←! T1 0.195 -2.04 -9.60 2.99 64.3
T2 ←! PD 0.197 -2.10 -9.67 2.92 70.0
ROI Rows φ tx ty |α − α∗ | PD ←! T1 0.196 -2.02 -9.7 3.00 64.7
Full 1–512 0.195 -2.04 -9.6 2.9 PD ←! T2 0.197 -1.97 -9.69 3.05 73.3
Top 1–171 0.196 -2.06 -9.51 3.0 Mean time 68.7
Middle 171–340 0.196 -2.07 -9.56 3.0 B Reference 0.196 -5 -10
Bottom 340-512 0.196 -1.87 -9.95 3.1 T1 ←! T2 0.191 -2.04 -9.47 3.0 3.9
T1 ←! PD 0.172 -2.47 -9.03 2.7 3.5
Table 3: Influence of partial overlap on registration robust- T2 ←! T1 0.244 -0.71 -10.33 4.3 4.1
ness. T2 ←! PD 0.178 -2.48 -9.68 2.6 3.2
PD ←! T1 0.195 -2.14 -9.78 2.9 4.5
PD ←! T2 0.190 -2.05 -9.48 3.0 3.6
require smaller window sizes to reduce the amount of tis- Mean time 3.8
sue exposed to radiation, and when information is miss-
ing from an image slice, in 3D volumes. In these cases, Table 4: Results and running for applying the MI registra-
as structural information is missing from either the floating tion algorithm on datasets A and B.
or the reference image, only a portion of the whole image 3. Discussion
is considered in the computations. This effect was tested by
purposely cutting out portions (bottom, middle, and top) of Table 4 shows that although the algorithm performed
the T2 image of dataset A, after applying the transforma- generally well for T1 and T2 registration, there are points
tion discussed in Section 1.1, and registering it with the T2- that need to be addressed. First, we noticed a constant trans-
weighted image of dataset A. We proceeded with the regis- lational bias along the x direction. We suspect this bias to be
tration and computed |α − α∗ |, the magnitude of the differ- caused by both transformation rounding errors, and by the
ence between the registration parameter α obtained and the lack of structural variation along the symmetry axis of the
transformation parameter α∗ . The results are summarized transverse plane defined by the anterior commissure (AC)
in Table 3. and posterior commissure (PC) line. This result suggests
that there is more structural variability present tangentially
to the AC-PC line. Moreover, PD did not perform well un-
2.6. Subsampling
der translation, for both x and y directions. We suspect this
Subsampling was used to measure the performance of result to be caused by the particular lack of contrast of PD
the algorithm on low resolution images. We modeled sub- images along the AC-PC line, and that the algorithm might
sampling by removing voxels (zero-level intensity) on pre- have tried to match CSF to the AC-PC line since it offers
defined intervals fx and fy along the x and y directions. We more contrast along the midline.
used values of fx = 1, 2, 3 or 4 and fy = 1, 2, 3 or 4, inde- The algorithm was fairly robust to noise. The peak of
pendently. The results are shown on Figure 8 for |α − α∗ | maximal MI was not shifted on Figure 5, even for very high
as a function of the subsampling factor f = fx fy . noise variance (σ = 1000), while the maximum MI peak
was significantly lower and much sharper. This result re- erly calibrated [7], the rigid body assumption restricts the
flects the ability of mutual information to capture the struc- generality of the algorithm, and images acquired with ei-
tural correlation of two images. That is, noise diminished ther old-generation or slightly defective scanners might not
the amplitude of the correlation, and it did not contain struc- yield good registration results. In that case, enforcing
ture. the affine transformation to use more degrees of freedom
Similarly, the algorithm was robust to non-uniform and (DOF), for example by adding anisotropic scaling (9 DOF)
structural overlapping. Applying intensity gradients did not and skew (12 DOF), would give the optimizer more flexi-
influence the robustness of the algorithm, as the MI crite- bility in reaching the global optima. However, these added
rion is intrinsically translational invariant to uniform inten- DOF would also raise the dimensionality of the registration
sity shifts. The MI registration traces shown on Figure 6 process, and badly-suited optimization methods might get
confirm this intuition, as the optimal registration parameter stuck in local optima and lead to erroneous registration pa-
corresponding to the peak of maximum mutual information rameters, resulting in unwanted image distortions. With all
was not changed, although its magnitude did change, re- those potential optimizations, it is not surprising that many
flecting the information loss in regions where the intensity years after Maes et al. was published, there still is extensive
gradient reduced the dynamic range. However, adding or re- research being done and concentrating independently on the
moving structural information from an image does affect its four main registration stages shown on Figure 1.
probability distribution, resulting in a different registration 4. Conclusion
entropy. In the cases of well-behaved additive information
The goal of this project was to implement the original
(such as intensity inhomogeneity or partial overlap), either
algorithm developed by Maes et al. [5]. The results were
the modified intensities are concentrated in a region of low
consistent with those obtained in the original paper; that
significance (entropy-wise) or there is enough information
is, the MI criterion performed generally well, and tend to
left to represent the full image structure, and the optimal
be less accurate when translations were applied perpendic-
registration parameter is not significantly affected. This can
ularly to the AC-PC axial line. Translation was identified
be seen for the effects of partial overlap, shown in Table 3
as a potential problem for low AC-PC contrast images, as
and of subsampling, shown on Figure 8, for which leaving
the ones acquired with PD-weighting. Geometric distortion
out intervals actually improved the contrast of brain bound-
pointed out the limitations of using rigid transformations.
aries and resulted in a better registration. In other cases,
Finally, subsampling was identified as a potential way to get
critical regions – crest lines or ridges, for example – will be
a coarse initial approximation of the registration parameter.
altered, resulting in a significant perturbation of the proba-
bility distribution of the image, thereby affecting its regis- References
tration. The running time for registering dataset B was so [1] M. E. Haacke, R. W. Brown, M. R. Thompson, and
low that subsampling could certainly be used in order to get R. Venkatesan. Magnetic Resonance Imaging: Physical Prin-
a coarse registration parameter initialization. ciples and Sequence Design. Wiley-Liss, 1999. 1, 2, 3
The MI algorithm performed well under the rigid body [2] J. V. Hajnal. Medical Image Registration. CRC Press, Cam-
assumption, when a small geometric distortion magnitude bridge, June 2001. 1, 2
was applied. On Figure 7, we see that the global optima of [3] Z. Hou. A review on mr image intensity inhomogeneity
the MI trace is shifted proportionally to the amount of ap- correction. International Journal of Biomedical Imaging,
2006(49515):11, 2006. 4
plied distortion. The location and magnitude of these global
[4] K. Krishnan and J. MacFall. Location of white matter hyper-
optima were expected and reflect both the intensity defor-
intensities and alterations in white matter tracts in late onset.
mation was applied along the −x direction, as imposed by CAMRD Project 268, 2004. 3
(11), and the inaptitude of the rigid transformation (in this [5] F. Maes, A. Collignon, D. Vandermeulen, G. Marchal, and
case, a translation along −x) to invert the transformation P. Suetens. Multimodality image registration by maximiza-
applied by the geometric distortion. Also, being purely tion of mutual information. IEEE Transactions on Medical
intensity-based, mutual information does not by itself con- Imaging, 16(2):187–198, April 1997. 1, 4, 6
sider spatial context of image pairs. Given a reference im- [6] P. Viola and W. M. Wells. Alignment by maximization of mu-
age R, there can be many floating images F that will result tual information. International Journal of Computer Vision,
in the same mutual information I(F, R). This point is crit- V24(2):137–154, 1997. 1
ical if more general image transformations are applied in [7] D. Wang, W. Strugnell, G. Cowin, D. M. Doddrell, and
R. Slaughter. Geometric distortion in clinical mri systems:
the registration process, as adding more DOF lead to many
Part i: evaluation using a 3d phantom. Magnetic Resonance
more possible solutions and local optima in the registration
Imaging, 22(9):1211 – 1221, 2004. 4, 6
parameter optimization stage. [8] B. Zitova and J. Flusser. Image registration methods: a sur-
While geometric distortion typically has a small mag- vey. Image and Vision Computing, 21(11):977–1000, October
nitude, even when the imaging device has not been prop- 2003. 1