Guidance Needed on Implementing Topup for BOLD Sequence Distortion Correction

Dear Forum Members,

I am a newcomer to fMRI analysis and would like to seek your guidance on an important aspect of the preprocessing pipeline: the implementation of the topup correction to address distortion in my BOLD sequence.

I have been following several tutorials to preprocess and conduct my first-level analysis using SPM12. However, I did not apply the topup correction at any stage, and I have encountered conflicting information regarding its implementation. I understand that topup is typically not performed within SPM and should instead be done using FSL.

Unfortunately, I have found the discussions in various forums to be quite complex and not particularly beginner-friendly, which has made it challenging to grasp the necessary steps. Additionally, I am unclear about the appropriate timing for incorporating the topup correction—whether it should be done before any preprocessing steps, after realignment, or at another stage.

To clarify my understanding, I have a few questions:

  1. At what point in the analysis pipeline should I incorporate the topup correction?

  2. What are the specific steps needed to apply the topup correction? I have outlined the following steps, but I would appreciate your feedback on their accuracy and completeness:
    a) Merge the opposite-phase reference scans using fsl’s fslmerge to combine the AP and PA scans into a single 4D file
    b) Create the Acquisition Parameters File
    c) Estimate the Distortion Field Using fsl’s topup
    d) Apply the Estimated Distortion Correction to Functional Images using applytopup
    e) use corrected data for preprocessing steps in SPM12

  3. How can I verify the results from the above steps to ensure that the topup correction was successfully implemented?

  4. If you are aware of any beginner-friendly tutorials or resources related to this process, I would greatly appreciate your recommendations.

Thank you very much for your assistance. I look forward to your insights!

Dear all,

I am a beginner regarding fMRI analysis and I am currently trying to correct distortion with my topup. So I have my fMRI data with 640 volumes with PA phase encoding and the topup with 5 volumes in AP encoding. This is my code:

fslroi mbep2d_bold_2mm_MB4_AST_topup_AP_10.nii AP 0 1
fslroi fMRI_AST_mbep2d_bold_2mm_MB4_PA_Run1_8.nii PA 0 1

fslmerge -t AP_PA_topup AP.nii.gz PA.nii.gz

nano acq_params.txt
0 1 0 0.0692986 # AP scan
0 -1 0 0.0692986 # PA scan

topup --imain=AP_PA_topup.nii.gz --datain=acq_params.txt --config=b02b0.cnf --out=topup_results --fout=fieldmap --iout=corrected_images

applytopup --imain=fMRI_AST_mbep2d_bold_2mm_MB4_PA_Run1_8.nii --topup=topup_results_fieldcoef --datain=acq_params.txt --inindex=1 --method=jac --out=fMRI_AST_mbep2d_bold_2mm_MB4_PA_Run1_8_dcorrected.nii.gz

When I check the now supposedly distortion-corrected fMRI data, I can see that it looks even more distorted than the uncorrected data. That is, the anterior part looks more elongated and pointy, and the posterior part of the brain more squished. As I do not fully grasp the topup and applytopup lines of code I am not sure what went wrong. Could someone help me out please?

Thanks in advance!