Hi @schillkg , welcome to Neurostars and many thanks for sharing those nice tools: synbold-disco and synb0-disco to the community!
To continue the discussion, here are the results with method 2: using FMRIPREP PEPOLAR method to run directly topup on the two images provided by synbold-disco.
First off, one thing to know is that a "TotalReadoutTime"
of 0 is not accepted through FMRIPREP for the _epi
images to be used for SDC in the fmap/
folder. So I gave a "TotalReadoutTime"
of 0.000001
seconds to the synthetic image BOLD_s_3D.nii.gz
) that I renamed sub-SUB_dir-AP_epi.json
and I gave it "PhaseEncodingDirection": "j-"
since my distorted bold images were with "PhaseEncodingDirection": "j"
FMRIPREP ran with no error with those images but unfortunately the corrected bold images are not great.
Here is an overview of the output images:
Estimated fieldmap:
SDC corrected bold images:
Registration of bold image to T1w image:
I tracked down a bit what went wary, and here is what I saw:
After topup run bold-disco style:
Corrected bold image:
Fieldmap image estimated by topup:
After topup run by FMRIPREP: (same image scaling for display as above)
Corrected bold image:
Estimated fieldmap:
=> the corrected image seems similarly corrected but the estimated fieldmap is drastically different! This is something to track down further…
For reference: topup command ran in synbold-disco style:
singularity exec -e -B /scratch/jsein/BIDS/$study \
/scratch/jsein/my_images/fmriprep-23.0.0.simg \
topup --imain=/scratch/jsein/BIDS/$study/derivatives/synbold/sub-${sub}/BOLD_all.nii.gz \
--datain=/scratch/jsein/BIDS/$study/derivatives/synbold/sub-${sub}/acqparamsJS.txt \
--config=b02b0.cnf --subsamp=1,1,1,1,1,1,1,1,1 --miter=10,10,10,10,10,20,20,30,30 \
--lambda=0.00033,0.000067,0.0000067,0.000001,0.00000033,0.000000033,0.0000000033,0.000000000033,0.00000000000067 --scale=0 \
--out=/scratch/jsein/BIDS/$study/derivatives/synbold/sub-${sub}/my_topup_results \
--fout=/scratch/jsein/BIDS/$study/derivatives/synbold/sub-${sub}/my_field \
--iout=/scratch/jsein/BIDS/$study/derivatives/synbold/sub-${sub}/my_unwarped_images \
--jacout=jac --rbmout=xfm --dfout=warpfield -v
Topup command run by FMRIPREP:
topup --config=/opt/conda/lib/python3.9/site-packages/sdcflows/data/flirtsch/b02b0.cnf \
--datain=/work/temp_data_NEMO_DISCOPE/fmriprep_23_0_wf/single_subject_pilote1_wf/fmap_preproc_wf/wf_B0map/topup/sub-pilote1_dir-PA_epi_regrid001_merged_sliced_volreg_encfile.txt\
--imain=/work/temp_data_NEMO_DISCOPE/fmriprep_23_0_wf/single_subject_pilote1_wf/fmap_preproc_wf/wf_B0map/setwise_avg/sub-pilote1_dir-PA_epi_regrid001_merged_sliced_volreg.nii.gz\
--out=sub-pilote1_dir-PA_epi_regrid001_merged_sliced_volreg_base\
--iout=sub-pilote1_dir-PA_epi_regrid001_merged_sliced_volreg_corrected.nii.gz\
--fout=sub-pilote1_dir-PA_epi_regrid001_merged_sliced_volreg_field.nii.gz\
--jacout=jac\
--logout=sub-pilote1_dir-PA_epi_regrid001_merged_sliced_volreg_topup.log\
--rbmout=xfm --dfout=warpfield