How to go from BOLD T1w space to anatomical T1w space?

In fMRIPrep, I have the anatomical sub-{}_desc-preproc_T1w.nii.gz file as well as BOLD functionals like sub-{}_ses-1_task-colorgray_run-001_space-T1w_desc-preproc_bold.nii.gz. I was assuming these are already in the same “T1w space” and that the functionals were coregistered with the anatomical, but is this not the case? My anatomical has the dimensions (176, 224, 256) and my functionals have dimensions of (77, 82, 74, 121) – I know that the last dimension (121) is the number of volumes so that’s fine, but why are the other dimensions not the same? Is it just a difference in bounding box (because I can overlay them fine in freeview). This becomes problematic when I try to use an ROI that is in the anatomical T1w space to mask out a region of the functional T1w image – I can’t figure out how to find what voxel goes with the other voxel when the dimensions are different.

I read through the documentation and other forum posts but still am having trouble, so I’m sorry if this was readily available information. Thanks very much for help.

I think you are right about the difference just being the bounding box.

If you created an ROI from the anatomical T1, you can resample it to match the BOLD functional bounding box. I would use 3dresample from afni, something like this:

3dresample -rmode NN -input t1_roi.nii.gz -master bold.nii.gz -prefix bold_roi.nii.gz

1 Like

Ahh thanks so much! I’m glad it’s a simple solution, I didn’t realize that resample would fix a boundary box adjustment. Was also able to work with spm_reslice.