I am working with multi-echo fMRI data and I have preprocessed the images with fMRIPrep (version 22.0.0) and tedana (v 0.0.12) afterwards. I am now transforming tedana’s output (optcomDenoised_bold.nii.gz) to the MNI space using antsApplyTransforms with the transformations created by fMRIPrep and using the follwoing commands (on singularity).
I am first applying the fMRIPrep created transform (scanner_to-T1w_mode-image_xfm.txt ) on tedana’s output to transorm it from T1w to native space. Next, I intend to apply the T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 to transorm the output of the previous transormation into the MNI space.
I was wondering first, whether my approach does make sense and if yes, am I using the right parameters for the transformations? Second, what reference images should I use for these transformations, is it correct to use acq-MPRAGE_desc-preproc_T1w.nii.gz for native2T1w transformation?
Also for the T1w2MNI transormation, does using acq-MPRAGE_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz make sense as a reference image or I need to use the MNI152NLin2009cAsym template itself?
During applying the native2T1w transfrom, I am receiving the follwoing error although I have dedicated 80G of memory to the task:
terminate called after throwing an instance of 'itk::MemoryAllocationError'
Failed to allocate memory for image.
You should apply those two transformations in one step with antsApplyTransforms`, in that way you will interpolate your data only once, and thus limitate the smoothing inherent to this process.
It is exactly what FMRIPREP is doing: this is an example from my data where you can see that several transforms are applied at once:
Just to double check: adding the two transforms (scanner2T1w & T1w2MNI) at the same time with the right reference image (sub-MTL0002_ses-FU84_acq-MPRAGE_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz) discards the issue of bold to T1w image issue?
I was also not sure of how ants handels the order of transforms inputted which I assume is first come first served order in the commands?
Accordingly, I modified my command to this and it has successfully completed the job, I highly appreciate it if you could please have a quick look at it:
I think you should better use a boldref image computed by fmriprep in the space MNI152NLin2009cAsym. Which resolution did you get for those bold images in MNI space with FMRIPREP?
But perhaps the image sub-MTL0002_ses-FU84_acq-MPRAGE_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz has the same resolution than you bold images in the MNI space and in that case you are fine.
It was a 2mm resolution MNI152NLin2009cAsym. Just to make sure, I used the sub-MTL0002_ses-FU84_task-rest_run-01_space-MNI152NLin2009cAsym_res-2_boldref.nii.gz image as my reference image.
I visualzied the output with sub-MTL0002_ses-FU84_acq-MPRAGE_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz and it was good too as you expected too.
Thank you very much for your time and guidance,