Where is an affine transformaiton matrix of EPI to T1w in fmriprep output folder

Hi experts,

I have two quick questions about described in title.
I can find three txt file below which look like affine matrix /fmriprep_wf/single_subject_001_wf/func_preproc_task_rest_run_01_wf/bold_reg_wf/bbreg_wf/fsl2itk_inv/affine.txt

Would you tell me which one is the result of bbregister?

Second question is…
Is there EPI image which is resampled with the same matrix of T1w image?
I think this EPI image is the result of bbregister.


It’s both of the above. One is forward (EPI -> T1w) and one is inverse (T1w -> EPI).

There is no such option currently (since this would upsample the data and waste a lot of disk space). You are right that one of the FMRIPREP outputs is already aligned (while maintaining original resolution) with the corresponding T1w volume (which is why we did not see the need to output the affine matrix). In 90% cases there is no need to explicitly upsample the BOLD data, since you can use viewers that respect affine matrices (MAngo, FSLeyes etc.) and toolkits such as nilearn (for example for extracting time series from parcels with two aligned files that have different resolutions).


Hi Chris,

Thank you for your kind response all the time!
I understood it.


1 Like

Hi stars (and superstar @ChrisGorgolewski),

I was looking for the EPI->T1 transform and came across this post. I am a little confused and was hoping someone could clarify.

Perhaps this was different at the time of the original post, but I see several transforms in …/bold_reg_wf/bbreg_wf/:


Are these different formats of the same transform, or altogether different transforms? I see the folder “compare_transforms” so I am guessing the latter - i.e. the above are compared and then the “best” one is selected?

Is the “chosen transform” stored in /mri_coreg/ ?