Combine ROIs using MarsBaR - mind-lab-bos/MBI_Project_MRI_Analysis GitHub Wiki
We have a set of default CONN atlas files saved in /work/mindlab/ROIs/CONN_Atlas/Atlas/
(the files are all zipped, you would need to unzip them before use). The auditory and reward ROIs are saved in /work/mindlab/ROIs/Wang_etal_ROIs/
.
Open a Matlab session on Discovery.
Type the following lines of code in command window:
addpath('/work/mindlab/Programs/spm12')
addpath('/work/mindlab/Programs/spm12/toolbox/marsbar')
marsbar
The fish will pop up. That's MarsBaR.
- First we need to convert those .nii files into .mat files for MarsBaR to read (Eva has done this for all CONN atlases and saved the mat files in the
/work/mindlab/ROIs/CONN_Atlas/Atlas/mat/
folder). We can do so by running this script/work/mindlab/ROIs/ROI_nii2mat.m
or manually by following these steps:
ROI Definition -> Build
Type of ROI -> Image
Select the ROI .nii file you'd like to import
Maintain as binary image -> No Apply function to image -> No Description & Label for ROI: no need to change, just press enter
Select a folder to save the new .mat file
Do this for other ROIs you'd like to import.
- Combine ROIs
ROI Definition -> Transform
Transform:... -> Combine ROIs
Function to combine ROIs: r1+r2 (can change function if you'd like to do other things to these ROIs)
Select a folder to save the .mat file for the new combined ROI
- Export the ROIs into .nii (these settings apply when you'd like to keep it consistent with other default ROIs in CONN)
ROI Definition -> Export
Export ROI(s) to:... -> image
Choose "Base space for ROIs"
Select a folder to save the new .nii file. Now this new ROI is ready to be imported into CONN.