Low resolution registration of functional data to different spaces

Hi all,

I am trying to register bold volumes to the T2W and template space in order to apply different techniques for rs-functional analysis. While doing so, I intend to always keep the resolution of the bold images, since this would reduce computing time and provide more faithful results.

When I applied the affine transform from-bold-to-T2W.mat, with the first bold volume as reference image, I got a small offset in both the z and y axis (not sure why y as well, since it should have identical FOV as the x axis). These were due to the difference in field of view and voxel size between the bold and T2W spaces, so I was able to correct for it by modifying the last column of from-bold-to-T2W.mat.

Now, I have the same problem while trying to register the bold images to the template space. The warp from-bold-to-template.nii.gz works perfectly when using the atlas as the reference image, but I get a very big offset when trying to use the low resolution image as reference. The problem being that now I can’t easily modify the transform to account for that FOV offset. I tried using my modified affine transform as the --premat argument in fnirt while using from-T2W-to-template.nii.gz as the non-linear transform, but that didn’t work for some reason.

An alternative (and the best?) course of action would be to down-sample the result of each registration after using the high resolution as the reference image, but I was not able to do that. I only found help on FSL’s mailing list about down-sampling to isotropic resolutions with the -applyisoxfm option in flirt. I would be grateful if someone could point me in the direction of a non-isotropic down-sampling that will work with the functional images of the developing-hcp dataset.

I would greatly appreciate any kind of guidance that you could provide me in this regard, even if it’s not an actual solution. Thank you!

Hi @diegoder

The best approach would be to downsample the reference image (T2w or template), then use the original transform but with the downsampled reference to resample the bold.

I would do the downsampling with -applyisoxfm in flirt because the original bold is very nearly isotropic anyway.

I could post some example code if this does not make sense?

Cheers, Sean

Hi Sean,

Thank you very much for your answer. I think I understand you correctly, I would need to do as follows:

flirt -in sub-*_desc-restore_T2w.nii.gz -applyisoxfm 2.16418 -ref sub-*_desc-restore_T2w.nii.gz -out downsampled_sub-*_desc-restore_T2w.nii.gz

flirt -in sub-*_task-rest_desc-preproc_space-bold.nii.gz -ref downsampled_sub-*_desc-restore_T2w.nii.gz -init /xfm/sub-*_from-bold_to-T2w_mode-image.mat -applyxfm -out sub-*_task-rest_desc-preproc_space-T2w.gz

flirt -in dhcp-volumetric-atlas-groupwise/mean/ga_40/template_t2.nii.gz -applyisoxfm 2.16418 -ref dhcp-volumetric-atlas-groupwise/mean/ga_40/template_t2.nii.gz -out dhcp-volumetric-atlas-groupwise/mean/ga_40/downsampled_template_t2.nii.gz

applywarp -i sub-*_task-rest_desc-preproc_space-bold -r dhcp-volumetric-atlas-groupwise/mean/ga_40/downsampled_template_t2.nii.gz -w /xfm/sub*_from-bold_to-template40wk_mode-image.nii.gz -o sub-*_task-rest_desc-preproc_space-template.nii.gz

Is that right? The thing I am least sure about is linearly downsampling the template, do you think that ought to work? (Disregarding that I may introduce distortions because of it not being perfectly isotropic).


Hi Diego

That looks mostly correct.

I am not certain, but you may have to add an xfm to your flirt -applyisoxfm calls. You can just use the identity matrix supplied with FSL as the xfm -init $FSLDIR/etc/flirtsch/ident.mat.


flirt -in sub-*_desc-restore_T2w.nii.gz -applyisoxfm 2.16418 -ref sub-*_desc-restore_T2w.nii.gz -out downsampled_sub-*_desc-restore_T2w.nii.gz -init $FSLDIR/etc/flirtsch/ident.mat

Does it work?

Cheers, Sean

Hello Sean

It worked even before adding the identity matrix. Thank you very much!


1 Like