Quick question about transformation matrices of head motion correction and EPI to T1w

Hello,

I am in the process of writing my own preprocessing pipeline in nipype/niworkflows, which is inspired by fMRIPrep. I have to do so because we have BOLD data with a lot of artefacts and T1 with really poor gm/wm contrast and fMRIPrep fails to coregister the EPI to T1w frequently. With my own pipeline, I use the T2 for wm mask estimation, which works better and coregistration seems to work rather well.

My question now is: fMRIPrep concatenates the xforms from head motion correction and EPI to T1w registration in one step. Is that something that is necessary and yields better results? Or is it done purely for convenience?

@oesteban, maybe you can quickly enlighten me on this matter :slight_smile:
Thanks in advance!
Johannes

It’s actually inconvenient to do it this way, but it avoids resampling each volume multiple times and accumulating error.

When you resample, you are taking the voxel location in the target image, following the transforms back to a location in the source image, finding the nearest voxels to that location and interpolating their values to estimate what the value should be placed in the resulting image. This has some amount of error, or at least uncertainty, so the fewer times you can do it, the less you’re compounding that error.

1 Like

Hello @effigies and thanks for the quick reply and good explanation. Makes total sense, now that you mention it.

1 Like