-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOPUP issues in functionals, even though the topup field looks reasonable #2835
Comments
Thanks much for reporting @cmpetty. May I ask you to re-run this participant with the argument You're right it seems TOPUP is performing properly. Let's now see whether SDCFlows is doing an appropriate handling of the fieldmap. |
Sorry, I'm still digesting all the info in your post (thanks for the thoroughness, it's really useful!)
I would not expect any meaningful change, but just to be sure: could you regenerate one of the figures at the same z-slice? |
i ran v22 with the debug fieldmaps option, but i didn't see any debug info in the report I uploaded the results and my own topup run here: A couple observations i noticed when debugging. When i ran topup with the merged fieldmaps that fmriprep produced, my results looked identical ( poor ). fmriprep merged them as PA, AP. The functionals were acquired AP. When i re-ordered the pepolar images to be AP, PA ( like my original post ) my topup results looked better: A side-by-side of my topup_field and fmriprep's "corrected field": A side-by-side of my topup field and the results from topup, using the PA/AP ordered blips:
A side-by-side of the applied topup field AP/PA ( mine ) and PA/AP ( fmriprep ) on the mean image: the 2nd one is consistent with the fmriprep v21+ output and the first is what i would've expected. |
Very interesting case and discussion. Thank you for all this reporting. |
Indeed this was one thing we implemented in nipreps/sdcflows#278 (towards addressing #2830). Let's see if that was the culprit.
SDCFlows does not use the default parameters, and defines its own (https://github.com/nipreps/sdcflows/blob/6061ed8a215d4be4b77c253f647343244113f2ee/sdcflows/data/flirtsch/b02b0.cnf). However, I do agree that this is a line of future investigation/optimization.
As mentioned in #2830, I strongly recommend against the
This could be investigated, but I would first make sure that this is not just a problem of SDCFlows getting the PE polarities wrong at some point. We will cut a release candidate soon so that @cmpetty can test with the latest fixes.
That option should not be used unless you don't have any fieldmaps. We need to fix this issue :) Thanks for the useful comments! Happy to get you more involved in SDCFlows, @julfou81 -- we really need contributors who know a lot about susceptibility distortions, topup, etc. |
This seems to be the same as #3013. The issue appears to be with the Jacobian correction, which we have been omitting. We need to resolve this soon, because these distortions are part of the correction process, and they need to be attenuated by applying a Jacobian weighting. |
This should be resolved in 23.2.0a1. |
We have some pretty severely distorted images because of a protocol mistake, but we're trying to make the best of them.
PEPolar images below:
The actual SDC correction looks reasonable on the pepolar images:
However, when the field is applied to the functionals things go wrong:
I've verified the PE directions and the readouts are correct. I've limited the number of topup volumes to use, just as a test, which didn't matter. I've tracked that the images look normal up until the "unwarp_wf" stage.
I'm using v21.0.2 via singularity containers with the command below:
${PACKDIR}/singularity/bin/singularity run --cleanenv -B $PACKDIR:/mnt/packages \ ${PACKDIR}/singularity/images/fmriprep-v21.0.2.sif \ /mnt/munin/Neacsiu/${EXPERIMENT}/Data/BIDS/TMSCR \ /mnt/munin/Neacsiu/${EXPERIMENT}/Data/BIDS/fmriprep \ participant --participant-label ${SUBJ} \ --nthreads 12 --omp-nthreads 12 --skip_bids_validation \ --use-aroma --aroma-melodic-dimensionality 30 \ --fs-no-reconall \ --output-spaces MNI152NLin2009cAsym:res-02 \ --work-dir /mnt/munin/Neacsiu/${EXPERIMENT}/Analysis/work \ --topup-max-vols 1 \
Outside of fmriprep i have run topup myself, with the same inputs and the resulting images looks as good as can be expected:
`topup --verbose --imain=bud --datain=acq_params.txt --config=$FSLDIR/src/topup/flirtsch/b02b0.cnf --out=rs_topup --fout=topup_field
applytopup --imain=../bia6_00186_004_01.nii.gz --inindex=1 --method=jac --datain=func_params.txt --topup=rs_topup --out=run004 --verbose
`
If i look at my topup field side-by-side with the fmriprep version, it appears the fmriprep is being stretched and potentially flipped somewhere:
As a sanity check, i went back to v20.#.# where AFNI could be used for pepolar correction and the results seem reasonable with no other variations to my fmriprep call, except the -max-topup-vols:
Just looking for some guidance on where the fieldmap correction may be going wrong and how to get a clean run.
The text was updated successfully, but these errors were encountered: