This is probably pretty simple, but I’ve been banging my head on it for an embarrassingly long time and would like some input. I’m looking for a way to extract voxel-wise timecourses based on anatomically defined ROIs in T1w-space. That is, I have regions that are defined in each participants’ anatomical space (defined using https://hub.docker.com/r/nben/occipital_atlas/), and I would like to down-sample those regions into each participants’ functional space for use as a mask.
The data are being processed with fmriprep, and I was hoping that I could avoid re-registering anything by relying on one of the outputs produced in the /work directory. I assumed there was a
.dat I could use with freesurfer’s
mri_label2vol, but I’m not sure which
.dat I should be using. (also, I haven’t used freesurfer much before and so am not confident about
mri_label2vol is necessarily the one I want).
Update: The closest that I’ve gotten is using the “uni_masked_bbreg_sub-01.dat” file from one of the bbregister node, and then
mri_vol2vol, as in:
mri_vol2vol --s sub-01 --mov "sub-01_task-con_run-01_TR-0-1_bold_space-T1w_preproc.nii.gz" --reg "uni_masked_bbreg_sub-01.dat" --nearest --inv --targ "scanner.template_areas.mgz" --o "T1w.template_areas.nii"
where “sub-01_task-con_run-01_TR-0-1_bold_space-T1w_preproc.nii.gz” is a single TR of a functional run and “scanner.template_areas.mgz” contains the labels (which should be in the same space as the raw anatomical image). The result is close, but the labels are slightly offset and contain voxels outside of the brain.