In the spirit of a previous thread, I am exploring ways to preprocess an older fMRI dataset that does not contain any usable fieldmaps. In addition to SyN-SDC and synBOLD-DISCO (using two of @jsein’s suggestions: either synthetic+distorted BOLD as twin EPI inputs or using synbold-disco’s topup-generated fieldmap as input), I’d also like to test the omni pipeline. The end goal would be to use omni’s outputs in fMRIprep.
The main output from the omni-pipeline is a motion-corrected (3dAllineate
using low DVARS volumes as base), distortion-corrected, and MNI152NLin2009cSym-aligned BOLD image. Using an already-processed input seems a bit redundant, plus I think I would need to calculate motion params from omni’s moco workflow.
As part of its processing steps, omni-synth calculates synthetic, undistorted EPI images, using info from T1w and T2w contrasts, at 4, 2, and 1mm resolutions. My naive thought is to take the 1mm synthetic image, rigid-body align and downsample to the distorted BOLD resolution, then use the synthetic and distorted BOLD images as twin-EPI inputs to fMRIprep, a-la SynBOLD-DISCO.
I am curious if anyone else has tried integrating omni-pipeline outputs with fMRIprep?
I ended up using omni to create SDC’ed “raw” bold scans, which were then used as fMRIprep input.
As part of its intermediate processing, omni will generate a warpfield that is used to unwarp a distorted BOLD image. Since omni normally outputs corrected data in template space, you can apply the warpfield to the raw data yourself.
<omni output folder>/
sub-abcd/
ses-abcd/
func/
sub-1_ses-1_task-mytask_bold/
...
epi_proc_1_distortion_correction/
final_epi_to_synth_warp.nii.gz
...
...
func_proc_0_deoblique_func/
sub-abcd_ses-1_task-mytask_bold_deobliqued.nii.gz
...
...
...
For my project, I am using “deobliqued” intermediate data omni generates. However, with the exception of FOV, I have not seen appreciable visual changes when applying the warpfield to raw and “omni deobliqued” data. (using deobliqued anyway out of an “abundance of caution”)
The warpfield is applied using 3dNwarpApply
. (recommended to copy raw data to a new “fakebids” directory and save unwarped BOLD to that, to leave raw data untouched)
OUTOMNI=""
FAKEBIDS=""
subid=""
sesid=""
taskname=""
funclab="sub-${subid}_ses-${sesid}_task-${taskname}_bold"
funcbase="$OUTOMNI/sub-${subid}/ses-${sesid}/func/$funclab/"
towarp="$funcbase/func_proc_0_deoblique_func/${funclab}_deobliqued.nii.gz"
outwarp="$FAKEBIDS/sub-${subid}/ses-${sesid}/func/${funclab}.nii.gz"
warpfield="$funcbase/epi_proc_1_distortion_correction/final_epi_to_synth_warp.nii.gz"
3dNwarpApply \
-verbose \
-overwrite \
-source $towarp \
-master $towarp \
-prefix $outwarp \
-nwarp $warpfield