当前位置:文档之家› spm8_startersguide

spm8_startersguide

(c) Erno Hermans

statistics.

Among the most important topics that have been

left undescribed in this guide are more recent

developments such as DARTEL, Bayesian infer-

ence, dynamic causal modeling, and M/EEG

functions. The best starting point for more infor-

mation is the SPM website at www.fil.ion.ucl.

https://www.doczj.com/doc/ab16148199.html,/spm.

File Type and File Selection

Browsing and selecting files:

All SPM8 functions use the same file

browse dialog box shown here. In the left

panel, you can select a directory to go to.

The right panel will show the contents of a

directory. Clicking once is enough to

switch to a different directory. As is com-

mon in Unix-like environments, “..” stands

for “one level up”. Scans can be selected

by clicking them one by one, which will

make their names move to the box at the

bottom. Instead of clicking them all manu-

ally, you can right-click in the right panel and subsequently click “select all”. Often, however, you will not want to select every file, but only a large subset of files within a directory. In order to do this, you can specify a filter (next to the button “Filt”). This filter works different from most com-mon file filters. Here are the most important uses:

- “.*” : List all contents of a directory (but restricted to the type of image that your SPM function requires).

- “funx” : list all files that contain “funx” in the filename.

- “^funx” : list all files with names that start with “funx”.

After selecting images, you can click the “Ed” button to edit the list of selected files. Right-clicking in this window will take you back.

You can also click the question mark button for a more thorough explanation of the file browse dialog.

Spatial Pre-processing functions Page 9

Statistical functions

Page 21

Visualization

Page 4

The visualization tools Display and Check Reg are used to:

- Look at scans

- Manually manipulate scans to set starting points for spatial

preprocessing

- Check all spatial pre-processing steps.

Display

The display function allows you to view and manipulate a single image.

The most important buttons in the display window are:

Crosshair position: the position of the blue line in the scans in either mm or voxels. Right, forward and up: Move the scan in three directions. These directions only make sense when your scan is in the same orientation as MNI standard space. Pitch, roll, yaw: rotate the scan around the X, Y, or Z axis respectively.

Reorient images: Click here to save changes to the scan you are manipulating and to apply the same changes to other scans. NOTE: here you have to select the image you are working on again in order to save changes (see below).

On the right you can see some useful information about your scan: voxel size, ori-gin, etc.

Except for just viewing images, the display function is used to manually match your images before starting automatic spatial preprocessing. The reason to do this is that if your scans do not approximately match, the algorithms that are used to make exact matches can get stuck in a local minimum, resulting in scans that do not match at all. It is advisable to put all your scans approximately into standard MNI space and orientation before doing anything else, even when you are not going to normalize them. Some scanners or conversion tools may already take care of this, but it is wise to check anyway. In order to do this, use display to view a canonical

T1 image (e.g. located in the “canonical” subdirectory of the SPM8 directory, called “single_subj_T1.nii”) and set the “mm” field under the “Crosshair position” to “0 0 0” to move the crosshair to the origin of the coordinate system. Note the orientation of the scan and its origin (the anterior commissure). Then display your own scans, set the crosshair to “0 0 0” again, and use the right, forward, up, pitch, roll, and yaw settings to manipulate your scan until you are satisfied with the result (note: rota-tions are given in radials; 180 degrees is 3.1416 radials). Do not forget to leave the crosshair at mm 0,0,0 to be able to see where your origin is.

When you made adjustments to your scan, you

can apply these changes to any scan you like.

Any scan that is to be reoriented has to be

entered here, including the one you worked on.

You can add files by clicking on them. Lists of

files can be selected by specifying a filter (e.g.,

“^funx”) to show only the files you want, and

subsequently adding all of them by right-click-

ing in the box containing the names (“select

all”). Lists of selected files can also be edited

by clicking “Ed”.

Click in the scans at different posi-

tions to see if all locations in the

scans match.

Here you see an MNI space

canonical on the upper left, an

individual T1 anatomical image on

the upper right, and an example

functional on the bottom left.

Note that the individual T1 and

functional scans are in the same

orientation as the MNI space

canonical. However, the origins

(where blue lines cross) do not

match. When at least the orienta-

tions match, SPM will mostly be

able to align the images using

automated functions (see next

part), but be sure to check.

called “spmT_000n.img”).

The goals of spatial pre-processing are:

1. To match all scans of an individual subject.

2. To match scans of all subjects into standard space.

The most important tools are: realign (and unwarp), slice timing

correction, coregister, normalize, and smooth. These are

described below.

Realign

Realign is the most basic function to match images. It uses a

tion to manipulate the scans. This means that it allows only translations (moving the image in X, Y, or Z direction) and rotations (over the X, Y

error it tries to find the manipulation that minimizes the difference between two scans. The cost function that is minimized is the sum of squared differences between the two scans. As a consequence, it can only be used

i.e., on scans that have been acquired with the same pulse sequence. It is mostly used to correct for motion of the subject during the functional scans (hence the name realign). Realignment results in changes to the (affine) transformation that is incorporated into your “.nii” files. You can also “reslice” these images into new files containing altered (

In the SPM8 main window, under Realign, use the

drop down menu to select:

Estimate

transformation and incorporate these changes into

the “.nii” file.

Reslice

added at the beginning of the filename).

Estimate and reslice

You are now taken to SPM8’s batch manager. Reslicing after every transformation is not always necessary and can reduce qual-ity. However, reslicing is necessary before starting statistical analysis.

Suppose you chose estimate and reslice. You

can now see that a job called “Realign:

Estimate & Reslice” is shown in the module list

in the left panel. Note that you can add more

modules to create a batch using the menu bar

(mainly under "SPM").

One thing needs to be specified, namely, the

images that need to be realigned. Note that ini-

tially, “<-X” is shown to the right of the item

“Data”. This means that fields within this item

still need to be completed. This is not neces-

sary for the other options, which contain set-

tings that are taken from the defaults, but may

be altered here. For instance, you can change

the the letter that is prepended to your file-

names after reslicing under "filename prefix".

Unwarp

EPI based functional pulse sequences may exhibit strong spatial

distortions around air-filled cavities in the head which are caused

by inhomogeneities in the magnetic field. Unwarp can be used 1)

to correct the resulting static deformations based on a B0 field

map and 2) correct changes in these deformations that occur

because of movement. Such deformations can be thought of as

comparable to moving up and down in front of a funny mirror.

Thus, not only the position, but also the shape of the volume changes as a function of time. When these distortions are present, realignment using rigid body transfor-mations as described above is insufficient to remove motion artifacts. When you choose unwarping, these deformations are accounted for by (un)warping the imag-es so that they match onto each other again. Note, however, that you should only use unwarping when there is reason to believe that your scans are warped in the first place. The default option in SPM8 is to unwarp only with respect to pitch and movements, which correspond to nodding yes and no, respectively. These are

In the batch editor window you now get the options for “Slice Timing”.

The first field that needs to be com-pleted is the “Data” field. This works exactly the same as specifying file-names for realignment. You can also use multiple sessions here.

The second field can be completed by first clicking “Number of Slices” and then “Edit value”. Here you must enter the number of EPI slices you acquired.

The third field will ask you for the (vol-

Here you are asked to enter the Slice Order of you scans. You will have to make absolutely sure what this order was by checking the settings during scanning. Two types are common:

Ascending or descending: Slices were

acquired one by one from top to bot-

tom or the other way around. In the

slice order field, enter:

[1:30]: for 30 slices, bottom to top.

[30:-1:1]: for 30 slices, top to bottom.

(note: these are Matlab expressions)

Interleaved: In interleaved EPI scans,

first all even-numbered slices are

acquired, after which odd-numbered

slices are done (or reversed).

These orders can be entered as:

[2:2:30,1:2:29]: ascending, even first

[29:-2:1,30:-2:2]: descending, odd first.

You can check these Matlab expressions by typing them in the Matlab command window first. Alternatively, you can enter any order manually: [1,3,5,7,2,4,6,8]: ascending, odd first.

Finally, enter the reference slice. This is the slice that the others are corrected to. Most people will opt for the slice that was acquired halfway the scan. This way you minimize the timing corrections that are made to your data.

Optionally, you can alter the prefix that is prepended to your file names after slice timing correction by altering the Filename Prefix".

As this example shows, minimization of the sum of squared differences will not work because the difference is very high when the scans match. Therefore, a differ-ent cost function is used, called Mutual Information

1

2 This is the mutual information 2D-histogram of the above two scans when perfectly

In the main window drop down

menu under coregistration, select:

Estimate:

transformation parameters, and

incorporate them into the “.nii” file

of the scan without actually chang-

ing the bitmap.

Reslice:

tion to a scan and create new bit-

map image files.

Estimate & Reslice:

For estimate, you will be asked for:

Suppose you choose

Estimate&Write. The following

fields need to be completed:

First go to data, add a subject,

then click “Source Image” and

specify the file that is to be used

to determine the deformation

parameters from to match onto

the MNI template. These can

subsequently be applied to other

images. Usually, the highest

quality image is used for this.

If you wish, you can use a

“Source weighting image” in

order to mask lesions in dam-

aged brains.

Next, take a look at the “estima-

tion options”. The only required

field is the “Template image”

field. Browse to the “template”

subdirectory of your SPM direc-

tory and select a modality for the

template that matches the

modality of the scan that you will

use to determine the normaliza-

tion parameters from.

All other settings are usually left

unchanged.

Next, you need to specify which images should be resliced after applying the trans-formation. This will create new bitmap images with a “w” (or optional other prefix selected in the writing options) before the original filename.

Before starting normalization,

you should consider changing

some of the defaults "writing"

options. One important setting is

the “bounding box”. This setting

defines the portion of MNI space

that is to be incorporated in your

new files. This setting is impor-

tant, particularly because the

default setting does not contain

the entire cerebellum. You

should therefore consider which

parts of the brain (or the entire

brain) you scanned, and deter-

mine (by looking at the template)

which boundaries to use. Bounding boxes are specified with two rows and three columns of numbers. The two rows define the starts and ends, respectively, and columns stand for dimen-sions in X (left-right), Y (posterior-anterior), and Z (bottom to top) directions.

Next, you may alter the voxel size of your new scans. By default, SPM will reslice your new normalized images at a voxel size of 2*2*2 mm. In some circumstances, it is advisable to change this setting to your original voxel size or the closest round number. Smaller voxels will substantially increase the size of your dataset and the time required for statistical calculations, but may be beneficial for smoothness esti-mations that SPM uses for multiple comparisons corrections.

Also, make sure your voxels fit into the bounding box. For instance, 4*4*4 voxels fit into a -80 to 80,-112 to 76, -68 to 88] bounding box, because all these boundaries can be devided by four.

Finally, consider changing the interpolation method that is used when reslicing the images, that is, the method that is used when calculating the voxel values of your new MNI-images. The default option, trilinear interpolation, is a quick but somewhat imprecise method. When computational time is not critical, opt for higher order (e.g., 4th) B-spline interpolation instead, especially when you have not yet resliced your images after realignment.

The size of the Gaussian is given by its Full Width at Half Maximum (FWHM). The larger the FWHM, the more smoothing you get. As a rule of thumb, most fMRI researchers use a Gaussian with a FWHM that is twice (a single dimension of) the

相关主题
文本预览
相关文档 最新文档