Print

Print


Dear Elisabeth and Zuo

You asked for instructions on extracting ROIs for a DCM analysis, where each subject’s ROI is automatically positioned at their individual peak response. I hope you don’t mind me CC’ing the SPM mailing list so others can benefit.

 

For this example we’ll have a large fixed sphere, which will be in the same location for each subject. Within that sphere, we’ll have a smaller sphere that moves to the nearest local maximum on a subject-by-subject basis, confined to the area of the larger sphere. (I haven’t thoroughly tested the following instructions and attached script, so please check your results carefully.)

 

1. Ensure every subject’s GLM has an Effects of Interest F-contrast. This tells SPM which effects (regressors) are interesting. Any regressors not included in the contrast will be regressed out during ROI extraction. This F-contrast is a matrix where each row indicates a condition of interest. For example, to include the first 3 regressors:

 

[1 0 0;

0 1 0;

0 0 1];

 

Or to only include regressors 1 and 3:

 

[1 0 0;

0 0 1];

 

2a. Either customise the attached Matlab script (keep it in the same folder as the attached batch .mat file). Alternatively, follow these click-by-click steps for the GUI:

 

2b. Open the Batch editor (click Batch in the main SPM window). At the top of the window, click SPM -> Util -> Volume of Interest.

 

3. Select the SPM.mat, set ‘Adjust data’ to the index of the contrast you made in step 1. E.g. if it’s the first contrast, set this to 1. Set the index of the session (run) and give the ROI (VOI) a name.

 

4. Click “Region(s) of Interest” then “New: Thresholded SPM”. Select the SPM.mat filename again and the index of the contrast you wish to use for identifying the subject’s peak. E.g. set this 2 to use the second contrast. The other boxes could be left at their default values.

 

5. Again click “Regions(s) of Interest” and click “New: Sphere”. This will be the outer sphere, in a fixed position across subjects. Set the Centre and Radius of the sphere in mm. Leave the Movement of centre set to “Fixed”.

 

6. Again click “Regions(s) of Interest” and click “New: Sphere”. This will be the smaller sphere which varies across subjects. Set Centre to the same mm coordinates as the above and “Movement of centre” to “Nearest local maximum”. For “SPM index”, select 1 (this tells it to use the SPM you specified in step 4). For Mask expression, type: “i2”. This tells it to use the larger sphere (specified in step 5) as the mask. It’s i2 because the larger sphere is the second entry in the list of Region(s) of Interest.

 

7. For Expression, type: i1 & i2 & i3   .This tells it to include voxels in the intersection of the SPM (i1), the larger sphere (i2) and the smaller sphere (i3).

 

8. Run the above batch (green play button). You can repeat this for each subject by saving the batch as a .mat file, then writing a script to loop over subjects, as in the attached files.

 

I hope that helps,

Peter

 

Peter Zeidman, PhD

Methods Group

Wellcome Trust Centre for Neuroimaging

12 Queen Square

London WC1N 3BG

[log in to unmask]