|
|
|
|
|
Goal: bring images collected with
different methods and at different times into alignment |
|
Facilitates comparison of data on a
voxel-by-voxel basis |
|
Functional time series data will be
less contaminated by artifacts due to subject movement |
|
Can compare results across scanning
sessions once images are properly registered |
|
Most (all?) image registration methods
now in use do pairwise aligment: |
|
Given a base image J(x) and target
image I(x), find a geometrical transformation T[x] so that I(T[x])ÅJ(x) |
|
T[x] will depend on some parameters |
|
Goal is to find the parameters that
make the transformed I a Ôbest fitÕ to J |
|
To register an entire time series, each
volume In(x) is aligned to J(x) with its own transformation Tn[x],
for n=0, 1, É |
|
Result is time series In(Tn[x])
for n=0, 1, É |
|
User must choose base image J(x) |
|
|
|
|
|
|
Most image registration methods make 3
algorithmic choices: |
|
How to measure mismatch E (for error)
between I(T[x]) and J(x)? |
|
How to adjust parameters of T[x] to
minimize E? |
|
How to interpolate I(T[x]) to the J(x)
grid? |
|
So can compare voxel intensities
directly |
|
Existing AFNI programs match images by
grayscale (intensity) values |
|
E = (weighted) sum of squares differences = Sx w(x) á {I(T[x]) - J(x)}2 |
|
Only useful for registering Ôlike
imagesÕ: |
|
SPGR…SPGR, EPI…EPI, but not SPGR…EPI |
|
Parameters in T[x] are adjusted by
Ògradient descentÓ |
|
Several interpolation methods are
available: |
|
Default method is Fourier interpolation |
|
Polynomials of order 1, 3, 5, 7
(linear, cubic, quintic, and heptic) |
|
Alternative method would be to match
features computed from grayscale images: |
|
Brain outline |
|
Edges (places where image intensity
changes abruptly in 1-2 pixels) |
|
Such techniques can be used to match
SPGR…EPI volumes |
|
Program 3dAnatNudge can estimate SPGR…EPI
translations |
|
But not rotations or warping |
|
|
|
|
|
AFNI program 3dvolreg is for aligning
3D volumes |
|
T[x] has 6 parameters: |
|
Shifts along x-, y-, and z-axes;
Rotations about x-, y-, and z-axes |
|
Generically useful for intra- and
inter-session alignment |
|
Motions that occur within a single TR
(2-3 s) cannot be corrected this way, since method assumes a rigid movement
of the entire volume |
|
AFNI program 2dImReg is for aligning 2D
slices |
|
T[x] has 3 parameters for each slice in volume: |
|
Shift along x-, y-axes; Rotation about
z-axis |
|
Useful for sagittal EPI scans where
dominant subject movement is ÔnoddingÕ motion that my be faster than TR |
|
It is possible and sometimes even
useful to run 2dImReg to clean up nodding motion, followed by 3dvolreg to
deal with out-of-slice motion |
|
Hybrid Ôslice-into-volumeÕ
registration: |
|
Put each separate 2D image slice into
the target volume with its own 6 movement parameters (3 out-of-plane as well
as 3 in-plane) |
|
Has been attempted by some AFNI users
but the results are not wildly better than volume registration; method often
fails on slices near edge of brain |
|
More work is needed (i.e., send money) |
|
|
|
|
|
Intra-session registration: |
|
3dvolreg -base 4 -heptic
-clipit -zpad 4 \ |
|
-prefix fred1_epi_vr \ |
|
-dfile fred1_vr_dfile \ |
|
fred1_epi+orig |
|
-base 4 Þ Selects sub-brick #4 of
dataset fred1_epi+orig as base image J(x) |
|
-heptic Þ Use 7th order polynomial interpolation (my personal
favorite) |
|
-clipit Þ Clip off negative voxels to
zero |
|
Negative voxels are artifacts of
high-order interpolation methods |
|
-zpad 4 Þ Pad each target image, I(x), with layers of zero voxels 4 deep on each face prior
to shift/rotation, then strip them off afterwards |
|
Zero padding is particularly desireable
for -Fourier interpolation |
|
Is also good for polynomial methods,
since if there are large rotations, some data may get ÔlostÕ when no zero
padding if used (due to 4-way shift algorithm used for fast rotation) |
|
-prefix fred1_epi_vr Þ Save output
dataset into a new dataset with the given prefix name (e.g., fred1_epi_vr+orig) |
|
-dfile fred1_vr_dfile Þ Save estimated
movement parameters into a 1D (i.e., text) file with the given name |
|
Can be plotted with command |
|
1dplot -volreg -dx 5 -xlabel
Time Ôfred1_vr_dfile[1..6]Õ |
|
|
|
|
|
|
Recipe for intra-subject S2-to-S1
transformation: |
|
Compute S2-to-S1 transformation: |
|
3dvolreg -twopass -clipit -zpad 4
-base S1+orig \
-prefix
S2reg S2+orig |
|
Rotation/shift parameters are saved in S2reg+orig.HEAD |
|
If not done before (e.g., in to3d),
zero pad E1 datasets: |
|
3dZeropad -z 4 -prefix E1pad E1+orig |
|
Register E1 datasets within the
session: |
|
3dvolreg -clipit -base
ÔE1pad+orig[4]Õ -prefix E1reg \
E1pad+orig |
|
Register E2 datasets within the
session, at the same time executing larger rotation/shift to session 1
coordinates that were saved in S2reg+orig.HEAD: |
|
3dvolreg -clipit -base ÔE2+orig[4]Õ
\ -rotparent S2reg+orig \ |
|
-gridparent E1reg+orig \ |
|
-prefix E2reg
E2reg+orig |
|
-rotparent tells where the
inter-session transformation comes from |
|
-gridparent defines the output grid
location/size of new dataset |
|
Output dataset will be shifted and zero
padded as needed to lie on top of E1reg+orig |
|
|
|
|
|
|
Recipe above does not address problem
of having different slice thickness (EPI and/or SPGR) in different sessions |
|
Best solution: pay attention when you
are scanning, and always use the same slice thickness for the same type of
image |
|
OK solution: use 3dZregrid to linearly
interpolate datasets to a new slice thickness |
|
Recipe above does not address issues of
slice-dependent time offsets stored in data header from to3d (e.g., Ôalt+zÕ) |
|
After interpolation to a rotated grid,
voxel values can no longer be said to come from a particular time offset,
since data from different slices will have been combined |
|
Before doing this spatial
interpolation, it makes sense to time-shift dataset to a common temporal
origin |
|
Time shifting can be done with program 3dTshift |
|
Or by using the -tshift option in 3dvolreg,
which first does the time shift to a common temporal origin, then does the 3D
spatial registration |
|
|
|
Further reading at the AFNI web site |
|
File README.registration (plain text)
has more detailed instructions and explanations about usage of 3dvolreg |
|
File regnotes.pdf has some background
information on issues and methods used in FMRI registration packages |