You can map the fmri volume into the anatomical space, something like mri_vo2vol --mov fmri.nii --reg register.dof6.lta --fstarg --o fmri.anat.nii.gz
(Note fmri.anat.nii.gz will be a big file that you may not want to keep around) Then run mri_segstats, like mri_segstats --i fmri.anat.nii.gz --seg $SUBJECTS_DIR/subject/mri/aparc+aseg.mgz --sum sum.dat --avgwf avgwf.dat --excludeid 0 On 05/09/2018 08:34 PM, Ben Smith wrote: > > > I have an event-related paradigm with variable length, and I would > like to get a functional activity parcellation ROI measurement for > each trial individually in order to enter into a reinforcement > learning model at a trial level. > > Can I extract ROIs for parcellations directly from preprocessing > output (e.g., fmcpr.sm5.fsaverage.rh.nii.gz) created by preproc-sess? > I would then apply an HRF gamma function myself to each time series > and then match each trial to the activity at that time point. > > I initially tried creating paradigm files for mkanalysis-sess where > every trial was essentially its own condition. But this seems clumsy > and might not work well because there's a differing number of > 'conditions' (trials) in different subjects and runs. > > So now I'm wondering if there's a way to extract time courses > associated with each cortical parcellation? So, for instance with the > Destrieux Atlas there are 58 parcellation units, so for each session I > would be ultimately looking for a 58*/t/ matrix where /t/ is the > number of time points in that session. > > I've already run the anatomical parcellations, so I'd think the next > step is to match those to the preprocessed functional data > like fmcpr.sm5.fsaverage.rh.nii.gz, then extract across the time course. > > I tried: > > mri_segstats \ > --seg > functional_preprocessed/sub261sess/bold/004/fmcpr.sm5.fsaverage.rh.nii.gz > \ > --annot $SUBJECTS_DIR/msm20171025T154741sub261/label/rh.aparc.annot \ > --avgwf testoutavgwf.dat --sum testoutsum.dat > > This ran, but didn't create testoutavgwf.dat in the working directory, > though I did get a testoutsum.dat. But the time course is what I'm > looking for in this case. > > Is it possible to do what I'm doing or should I be inputing a result > from vol2surf instead of from preprocessing output? > > Thanks in advance for any help you can provide! > > Best regards > > Ben Smith > > > _______________________________________________ > Freesurfer mailing list > Freesurfer@nmr.mgh.harvard.edu > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.