SPM Realign

I've covered motion correction in a previous post, and the concept is the same in SPM as it is in the other major software analysis packages. One difference, however, is that SPM realigns the first volume in each run to the first volume of the first run, and then registers each image in each run to the first volume of that run. This may not seem optimal if the anatomical scan is taken after the last functional run, and thus would be spatially closer to the very last image of the last functional scan; but it's the way SPM operates, and hey, I didn't make it - so deal with it, wuss.

spm_realign and spm_reslice are the command line options to run motion correction, and both the command line and GUI approaches will output a graph of motion parameters in the x-, y-, and z-directions, as well as pitch, roll and raw estimates for each run. The motion of each volume relative to the first volume in that run is output into an rp_*.txt file, which can be used for nuisance regressors to soak up any variance associated with motion. (Does anybody else notice how often people use cleaning metaphors when discussing variance? As though it is some messy substance that needs to be mopped up or soaked up, as opposed to appreciated, cared for, and loved.)

Although most of the defaults are fine, you may want to turn up the interpolation order a few notches if you have the computing power to do it, and don't mind waiting longer for the realignment to complete. The higher the interpolation order you use, the better results you get, but the benefits get smaller the higher you go, as though the return on your realignment begins to diminish. Someone should come up with a name for that phenomenon.

Anyway, here's some sample commands for running realignment from the command line:

P = spm_select('ExtList', pwd, '^ar01.nii', 1:165);

More details, along with my soothing, anodyne voice, can be found in the following screencasts.

SPM Realign from the GUI

SPM Estimate & Reslice from the command line