Dear Gian Marco,
You may first convert the .mgz files to NIFTI (.nii) format, and then use any regular ROI extraction tool to obtain the BOLD timeseries from those locations. For example, if you are using CONN (one of the SPM toolboxes, see conn-toolbox.org), you could start using a Matlab command like:
conn_mgh2nii /mydata/mri/aparc.a2009s+aseg.mgz;
to convert your .mgz to .nii format, and then something like:
[data, labels] = conn_rex('/mydata/functional/aurest.nii', '/mydata/mri/aparc.a2009s+aseg.nii', 'level', 'clusters');
to extract a #timepoints x #rois matrix with the BOLD timeseries within each ROI. Note that your functional data (in this example the file aurest.nii) is expected to be already preprocessed, and in particular co-registered to your anatomical data (to the same anatomical volume that was analyzed by freesurfer); e.g. in the CONN toolbox you may use one of the default subject-space pipelines for that but you can of course also do that in any number of different ways directly from SPM.
Hope this helps
Alfonso
On Thu, 6 Apr 2023 20:18:45 +0100, Gian Marco Duma <[log in to unmask]> wrote:
>Dear SPM experts, I have a resting state data in fMRI. I have segmented with freesurfer the anatomy. So now I would like to extract the ROI timeseries based on the the aparc2009 segmentation atlas from Freesurfer. Is there a simple way to extract the BOLD time series from ROI based on freesurfer atlas? I would only need to obtain a matrix n (regions) x m (time point of the BOLD).
>Thanks
|