Hello,
I ran fmriprep on some multi-echo fmri data. I then used this script to collect echo-wise files in the working directory to run tedana for denoising. I was able to run tedana, and now I’m trying to transform desc-optcomDenoised_bold.nii.gz into T1w space so that I can run ciftify.
I used the following script to transform desc-optcomDenoised_bold.nii.gz into MNI space.
maindir=fmriprep/sub-$1/ses-$2
tedanaOutput=${maindir}/func/desc-optcomDenoised_bold.nii.gz
tedanaOutputMNI=${maindir}/func/sub-$1_ses-$2_task-rest_space-MNI152NLin2009cAsym_res-2_desc-MEICAmdl_bold.nii.gz
reference=$HOME/.cache/templateflow/tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_T1w.nii.gz
scan2T1w=${maindir}/func/sub-$1_ses-$2_task-rest_*scanner_to-T1w_mode-image_xfm.txt
T1w2MNI=${maindir}/anat/sub-$1_ses-$2_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5
antsApplyTransforms --dimensionality 3 \\
--input-image-type 3 \\
--input ${tedanaOutput} \\
--default-value 0 \\
--float 1 \\
--interpolation LanczosWindowedSinc \\
--output ${tedanaOutputMNI} \\
--reference-image ${reference} \\
--transform ${T1w2MNI} \\
--transform ${scan2T1w} \\
--verbose 1
However, how could I transform desc-optcomDenoised_bold.nii.gz into T1w space? Would I just change the reference image to the preprocessed T1w image and remove the "–transform ${T1w2MNI} line? Like below? I ran the commands below but the file was very big (>8GB).
maindir=fmriprep/sub-$1/ses-$2
tedanaOutput=${maindir}/func/desc-optcomDenoised_bold.nii.gz
tedanaOutputT1w=${maindir}/func/sub-$1_ses-$2_task-rest_space-T1w_desc-MEICAmdl_bold.nii.gz
referenceT1w=${maindir}/anat/sub-$1_ses-$2_desc-preproc_T1w.nii.gz
scan2T1w=${maindir}/func/sub-$1_ses-$2_task-rest_*scanner_to-T1w_mode-image_xfm.txt
antsApplyTransforms --dimensionality 3 \\
--input-image-type 3 \\
--input ${tedanaOutput} \\
--default-value 0 \\
--float 1 \\
--interpolation LanczosWindowedSinc \\
--output ${tedanaOutputT1w} \\
--reference-image ${referenceT1w} \\
--transform ${scan2T1w} \\
--verbose 1
Any help or thoughts would be appreciated. Thanks!