How to resample probseg maps in BOLD space via T1w-to-BOLD transform?

Hello Neurostars team,

I want to generate timeseries confounds by running aCompcor and tCompcor from HCP minimally preprocessed data and for that I ran sMRIPrep for Structural preprocessing which gave me anatomical derivates. I noticed that fMRIPrep does lot of preprocessing such as Resample probseg maps in BOLD space via T1w-to-BOLD transform, ApplyMask, Binarize and then these maps are fed into acompcor to generate confounds timeseries. Here is a code from fmriprep fmriprep/confounds.py at master · nipreps/fmriprep · GitHub


same file as above
image

I would like to know how can perform such preprocessing like fmriprep on probability segmentation maps? I tried to follow the code but there are so many prerequisites workflows which needs to be run whose outputs are taken as inputs for preprocessing these masks. May I know if I am on the right track and if there is an easier way to do it? Thanks