Regions of Interest (ROIs)¶
When conducting fMRI analyses, we often focus on specific brain regions based on theoretical or empirical questions. These Regions of Interest (ROIs) are defined areas in the brain that we hypothesize to be relevant to a particular cognitive function or task.
By restricting the analysis to ROIs, researchers can improve statistical power, focus on hypothesized brain areas, and extrat data for multivariate pattern analyses (MVPA).
Commonly Used ROI Types¶
The following types of ROIs are commonly used in fMRI research:
- Anatomical ROIs: These are based on anatomical landmarks, often derived from standard brain atlases.
- Functional ROIs: Defined based on brain activation patterns observed in functional localizer tasks.
- Spherical ROIs: Spheres around specific MNI coordinates, offering a quick, automated way to generate ROIs.
Example: Creating Spherical ROIs with the GUI¶
TODO: add info and screenshots on how to do this using marsbar GUI
Example: Creating Spherical ROIs with a Script¶
Below is an example MATLAB script designed to creare bilateral ROIs. This script leverages MarsBaR and SPM to generate spherical ROIs around given MNI coordinates. The ROIs are saved as NIfTI files, which can be further used in analyses such as multivariate decoding.
Script for Creating Spherical ROIs in MATLAB
makeROISpheres.m | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
|
This script will output a folder as follow:
rois
└── radius_5mm
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-Caudatus.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-CoS_PPA1.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-CoS_PPA2.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-FFA.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-LOC.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-OTJ.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTG.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTG_OTJ.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTL_OTJ.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-PPA.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-RSC_PCC.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-SMG1.nii
├── hemi-B_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-TPJ.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-Caudatus.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-CoS_PPA1.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-CoS_PPA2.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-FFA.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-LOC.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-OTJ.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-PCC1.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTG.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTG_OTJ.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTL_OTJ.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-PPA.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-RSC_PCC.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-SMG1.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-SMG2.nii
├── hemi-L_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-TPJ.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-Caudatus.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-CoS_PPA1.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-CoS_PPA2.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-FFA.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-LOC.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-OTJ.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTG.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTG_OTJ.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-pMTL_OTJ.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-PPA.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-RSC_PCC.nii
├── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-SMG1.nii
└── hemi-R_space-MNI152NLin2009cAsym_res-2_radius-5mm_label-TPJ.nii
With right (hemi-R
), left (hemi-L
) and bilateral (hemi-B
) masks.
The size of the ROIs is defined in millimeters, and is a list of radii such as m.radii = [5, 10];
(see line 19 of the makeROISpheres.m
script).
Warning
The bilateral masks will be generated automatically only when both R and L coordinates are provided for a given ROI. If only R or L coordinates are provided, only the R or L mask will be saved.
Intersecting ROI Masks with GLM Results¶
In our lab, we apply an additional refinement step to Region of Interest (ROI) masks to precisely target the most relevant brain voxels. This involves intersecting the mask (e.g., a spherical or anatomical ROI) with the significant activation of a specific contrast. This approach is particularly beneficial for analyses like multivariate pattern analysis (MVPA), where targeted voxel selection is crucial for decoding tasks.
For instance, suppose we want to perform an MVPA to determine if we can distinguish between Female and Male faces in the Fusiform Face Area (FFA). Here’s how we might set up the analysis:
-
Create an Initial ROI Mask:
- First, we create a NIfTI file with values of 1 in the FFA region and 0 elsewhere. This mask can be created either anatomically (using an atlas) or by defining a spherical mask centered on FFA coordinates.
-
Run a First-Level Analysis to Identify Activation in the ROI:
- In SPM, perform a First-Level analysis to obtain significant activation for a relevant contrast, such as Faces vs. Objects. This will produce a t-map that indicates the t values of all voxels for the given contrast.
What contrasts should I use?
- If we use a localizer run (i.e., a run where participants are shown categories for functional localization), then we can set up contrasts based on well-established literature. For example, for the FFA, the Faces > Objects contrast is commonly used; for LOC, Objects > Scrambled is typical.
- If we use the experimental task run (i.e., when participants perform the main task), we generally choose contrasts that reflect overall activity in the region. For example, we might use an All > Rest contrast where all experimental conditions are positive and rest blocks are negative, capturing the regions most active during the task overall.
-
Threshold the Activation Map
- Apply a statistical threshold to the t-map, setting a significance level (e.g., p < .001) to identify the voxels significantly active for the contrast of interest.
-
Intersect Masked and Activated Voxels
- Generate a new ROI that includes only the voxels both significantly active in the contrast and within the initial mask (e.g., sphere or anatomical region).
-
Extract beta values from selected voxels
- We use the generated ROI to filter voxels in the beta images (the
beta_00*.nii
images in the SPM GLM output folder) for further MVPA.
- We use the generated ROI to filter voxels in the beta images (the
This approach has two key benefits:
- Selective Targeting of Relevant Voxels: It ensures that the ROI captures only the voxels relevant for the cognitive function of interest, maximizing information and minimizing potential noise from uninformative voxels.
- Feature Reduction: Reducing the number of features (voxels) helps improve the classifier's performance by mitigating the Curse of Dimensionality (see this article on dimensionality reduction for more info).
Example: Generating Refined ROIs by Intersecting Masks with Activation Maps¶
The following MATLAB script refines ROIs by intersecting an initial mask (e.g., anatomical or spherical) with a subject-specific activation map from an SPM contrast. This approach is particularly valuable for targeted analyses, such as multivariate pattern analysis (MVPA).
Script Workflow¶
- Thresholding: Applies a statistical threshold to the contrast map, identifying only voxels with significant activation.
- Intersection: Intersects these significant voxels with the ROI mask to focus on relevant areas within the predefined region.
- Voxel Count Check: Ensures the resulting ROI contains a minimum number of significant voxels (default: 25). If the voxel count is too low, the significance threshold is incrementally relaxed until the minimum count is met.
- Saving Results: Exports the final ROI in both NIfTI (
.nii
) and MATLAB (.mat
) formats, making it ready for further analysis.
Finding Contrast Names in SPM
To find the exact names of contrasts in an SPM model, load the SPM.mat file and check SPM.xCon.name
. This allows you to confirm the contrast names required for the contrastName
field in roisStruct
.
Script to Create ROIs from an Image Mask and Statistical Activation Map
intersectROIandGLM.m | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
|
This code generates a new folder containing subject-specific ROIs. While previous spherical or anatomical masks were likely generic—created in a standard space (e.g., MNI) and therefore applicable to any subject within that space — these new ROIs are specific for each subject, since they are created by intersecting the generic mask with the subject's unique pattern of activation from the GLM t-map.
Now that you have your beta images (from the GLM) and your ROIs, you have everything you need to run your multi-variate analysis. → MVPA
- TODO: mention the roi stuff Filippo did, and perhaps ask him to write something about it?
https://neuroimaging-core-docs.readthedocs.io/en/latest/pages/atlases.html#id4 https://neurosynth.org/ https://openneuro.org/