Title: Coregistration
1Coregistration
With your host, Terry Oakes
Waisman Laboratory for Functional Brain
Imaging University of Wisconsin-Madison
http//brainimaging.waisman.wisc.edu/oakes/teachi
ng/Coregistration_lecture.pdf troakes_at_wisc.edu
2Why Coregister?
Parametric Images Associating a parameter of
interest with locations (voxels) throughout the
brain.
PET concentration of radioactivity (mCi/cc brain
tissue)
fMRI paramagnetic signal from deoxygenated hemogl
obin (volts)
MRI T1-weighted paramagnetic spin realignment
(volts)
EEG electrical signal strength (volts)
3Why Coregister?
1
6
Within-subject - Pixels have same size. -
Comparison with known locations. - Assignment
of standard names. Inter-subject -
Voxelwise categorization of data points. -
Common reference frame (MNI, Talairach).
7
2
8
3
4
9
5
average
4Types of Transform
Target
Object
Transform
Translation
Rotation
Zoom (x-dimension)
Skew (x-dimension)
5Types of Transforms 1
Same shape, different orientation
6Types of Transforms 2
Different shape, different orientation
7Types of Transforms 3
Different pixel size
8Types of Transforms 4
Different shape - local stretching required -
affine, nonlinear, or higher-order fit
9A Two-Step Process
1. Determine the transform parameters 2. Apply
the transform (reslice)
1. Match features
2. Transform image
Subject 2 original
Subject 1
Subject 2 transformed
(with contour from Subject 1 overlaid)
(with contour at GM/WM boundary overlaid)
(with same contour from Subject 1 overlaid)
10Alignment Ingredients
- Cost Function
- A data reduction technique to compare 2 images
- Examples
- least squares
- mutual information
- Optimization method
- efficient search through parameter space
- find global minima, avoid local minima
- Examples
- Gradient descent
- Powell
- Amoeba
- Levenberg-Marquardt
- Interpolation algorithm
- can limit accuracy of cost function
- Examples
- trilinear
11Cost Function
a
1. By Eye 2. Matching landmarks or fiducial
markers 3. Surface Matching a. Pelizarris
head-in-hat 4. Volume Matching a.
subtraction b. ratio c. least squares d.
mutual information
b
a - b
12Mutual InformationCost Function
Minimize the function for joint entropy
SSp(x,y)
x y
13Mutual Information
2mm shift in x
original
original
original
2mm shift in x
2mm shift in x
difference image
14Mutual Information
15MultimodalJoint Histogram
coregistered
Histogram difference image
PET 4mm x shift
MRI T1
- Not necessarily symmetric about line of
unity - Need an objective cost function by
eye inadequate here.
PET FDG
16Optimization Method
- Efficient search through parameter space
- Avoid searching entire parameter space,
concentrate on lucrative subspace. - Find global minima, avoid local minima
- Need to search a large enough region of parameter
space. - Multiple-scale or decreasing coarseness.
17Determining the TransformIterative Methods
1. Compare object to target using Cost
Function 2. Evaluate Cost Function 3.
Store current transform if Cost Function
minimized 4. Try new parameters (via Optimazation
method) 5. From the top
Target Object Difference
18Apply the Transform
1. Shift, Rotate, Zoom. 2. Transformation
matrix 3. Vector field
19Vector Field Transform
Target Object Overlay
At every location (voxel), a X,Y (,Z) vector is
stored that tells the magnitude and direction of
movement required to match the object to the
target image. Pros Versatile, accomodates
unusual fits. Cons Time- and space-consuming.
20Transformation Matrix
4x4 Homogenous Coordinate Transformation
Matrices (from AIR documentation. See
http//bishop.loni.ucla.edu/AIR3/homogenous.html)
Combines any 3-dimensional linear transform into
a single matrix - translation - rotation -
zoom - perspective distortion Provides an
equation that dictates where the value contained
in any (and every) voxel will be placed in the
new output image.
21Transformation Matrix Operations
Translation
(cosjcosf sinjsinfsinf) (sinjcosf -
cosjsinqsinf) (cosqsinf) 0
(-sinjcosq) (cosjcosq)
(sinq) 0 (sinjsinqcosf - cosjsinf)
(-cosjsinqcosf - sinjsinf) (cosqcosf) 0
0 0
0 1
Rotation
x-zoom 0 0 0 0 y-zoom 0 0
0 0 z-zoom 0 0 0 0 1
Zoom
Perspective
x-,y-,z-view denote the coordinate from which
image is viewed
22Transform Software Implementation
Construct transform matrix Rotation
Translate image center to rotate about it
T3D, TRANSLATEFLOAT(-x_d)/2., FLOAT(-y_d)/2.,
FLOAT(-z_d)/2., /RESET T3D, ROTATE0, 0,
crgm.p.rot.a T3D, ROTATE0, (-1.0)crgm.p.rot.c,
0 T3D, ROTATEcrgm.p.rot.s, 0, 0 T3D,
TRANSLATEFLOAT(x_d)/2., FLOAT(y_d)/2.,
FLOAT(z_d)/2. rot_mat!P.T Translation
(convert from mm to pixels) x_s
FLOAT(crgm.p.shift.x)/x_p y_s
FLOAT(crgm.p.shift.y)/y_p z_s
FLOAT(crgm.p.shift.z)/z_p T3D, TRANSLATEx_s,
y_s, z_sFLOAT(-1) Zoom If we zoom,
translate image so original center is (again) at
center) xtFLOAT(x_d)/2.0 (crgm.p.mag.x -
1.0) ytFLOAT(y_d)/2.0 (crgm.p.mag.y -
1.0) ztFLOAT(z_d)/2.0 (crgm.p.mag.z -
1.0) T3D, TRANSLATExt, yt, zt T3D,
SCALE1.0/crgm.p.mag.x, 1.0/crgm.p.mag.y,
1.0/crgm.p.mag.z retrieve the transform
matrix mat_transform !P.T Apply
transform to create new element locations
new_coords mat_uncubic transpose(mat_trans
form) mat_cubic coord_triples Apply
transform to object data image_out
INTERPOLATE(img_orig, new_pts0,, new_pts1,,
new_pts2,)
23Spatial Transform Models
Name Parameters Rigid-body 6 translation
rotation Global rescaling 7 trans rot zoom
(xyz locked) Traditional 9 trans rot
zoom Affine 12 trans rot zoom perspective
24Within-subject coregistration
Rigid-body transform is most appropriate.
MRI
PET
25Inter-Subject Registration
target
Difference Images
object
object coregistered, 9-parameter
object coregistered, 12-parameter
26More parameters more time
Tgt 0 sec
12 params 36 sec
168 params 775 sec
27Increasing number of alignment parameters
of fit params
9
Fitting more parameters not always better!
15
168
Distortion
28Interpolation Methods
Trilinear
Sinc
29Interpolation methods where it matters
Chirp 102 sec
Original 0 sec
Sinc 2497 sec
Trilinear 10 sec
(AIR software)
30Pre-processing Range Scaling
31Pre-processing inhomogeneity correction
original
inhomogeneity corrected
joint histogram
Difference ( bias field)
32Pre-processing skull-stripping
Original
Skull-stripped
33Inter-Subject Registration
No skull-stripping
34Inter-Subject Registration
No skull-stripping
35Inter-Subject Registration Skull-stripped
Target Coregistered Object Original O
bject
Note the large ventricles!
AIR 12 parameters Trilinear reslice Align163
sec Reslice9 sec
36EPI registration
T1 256x256x128 1 mm3 voxels
EPI 64x64x30 5.0 x 3.0 x 3.0 mm voxels
37EPI dropout (susceptibility) artifact
38EPI dropout (susceptibility) artifact
39EPI registration
40EPI registration solution
T1
register
T1, coplanar with EPI
assume no movement
EPI
41Adjusting functional activationsusing anatomical
information
Functional Activations
1. Difference in a specific metabolic process
which influences measured signal. 2. Difference
in tissue composition within a supposedly
homogenous structure. 3. Misregistration of a
structure to the target template. 4. Partial
volume effect (PVE), a special case of spatial
blurring.
VBM Activations
1. Differences in the tissue component of a
structure (e.g. more WM in the thalamus). 2.
Misregistration underlying differences in
structure shape not removed by the
coregistration process.
42General Linear Model
Y bx e
Observed data
Error term (unmodeled variance)
regressor variables
coefficient(s)
statistical parametric map
t effect / variance b/e
Does NOT ask, Where is the effect large?, but
rather Where is the effect statistically
reliable?
43PET FDG rhesus
44Human fMRI
Functional activation increases In both size and
magnitude.
Functional activation decreases (falls below
statistical threshold).
45Inter-Subject Registration Gone Awry
or, why visual inspection is important
Target
Coregistered Object