I am running fmriprep on my data with fieldmap (2 magnitude images + 1 phase diff image). The output image looks weird, and very distorted. Any idea on possible reason?
Command used (and if a helper script was used, a link to the helper script or the command generated):
Data formatted according to a validatable standard? Please provide the output of the validator:
ExperimentalWarning: The fs.promises API is experimental
1: [WARN] Task scans should have a corresponding events.tsv file. If this is a resting state scan you can ignore this warning or rename the task to include the word "rest". (code: 25 - EVENTS_TSV_MISSING)
./sub-01/func/sub-01_task-regret_run-01_bold.nii.gz
./sub-02/func/sub-02_task-regret_run-01_bold.nii.gz
./sub-03/func/sub-03_task-regret_run-01_bold.nii.gz
./sub-04/func/sub-04_task-regret_run-01_bold.nii.gz
./sub-05/func/sub-05_task-regret_run-01_bold.nii.gz
./sub-06/func/sub-06_task-regret_run-01_bold.nii.gz
./sub-07/func/sub-07_task-regret_run-01_bold.nii.gz
./sub-08/func/sub-08_task-regret_run-01_bold.nii.gz
./sub-09/func/sub-09_task-regret_run-01_bold.nii.gz
./sub-10/func/sub-10_task-regret_run-01_bold.nii.gz
... and 28 more files having this issue (Use --verbose to see them all).
Please visit https://neurostars.org/search?q=EVENTS_TSV_MISSING for existing conversations about this issue.
2: [WARN] Not all subjects/sessions/runs have the same scanning parameters. (code: 39 - INCONSISTENT_PARAMETERS)
./sub-01/func/sub-01_task-regret_run-01_bold.nii.gz
./sub-02/func/sub-02_task-regret_run-01_bold.nii.gz
./sub-03/func/sub-03_task-regret_run-01_bold.nii.gz
./sub-04/func/sub-04_task-regret_run-01_bold.nii.gz
./sub-06/func/sub-06_task-regret_run-01_bold.nii.gz
./sub-07/func/sub-07_task-regret_run-01_bold.nii.gz
./sub-08/func/sub-08_task-regret_run-01_bold.nii.gz
./sub-09/func/sub-09_task-regret_run-01_bold.nii.gz
./sub-12/func/sub-12_task-regret_run-01_bold.nii.gz
./sub-13/func/sub-13_task-regret_run-01_bold.nii.gz
... and 23 more files having this issue (Use --verbose to see them all).
Please visit https://neurostars.org/search?q=INCONSISTENT_PARAMETERS for existing conversations about this issue.
3: [WARN] The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification. (code: 101 - README_FILE_MISSING)
Please visit https://neurostars.org/search?q=README_FILE_MISSING for existing conversations about this issue.
4: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)
Relevant log outputs (up to 20 lines):
Screenshots / relevant information:
I do not have a pic of the erroneous outputs at this moment as I gave deleted them but I can try to upload them later. In any case,
I am attaching the BOLD file and fieldmap:
I have relabeled your post as Software Support and added the corresponding post template, please fill in the other requested information by editing your so we an best help. Also, in the Screenshots section, please post the SDC images from the HTML report.
hi @Steven@Chris_Rorden, thank you. I have populated the related fields in the form, except the picture of the output from preprocessing. I deleted that previously but should be able to upload it later. Otherwise, I have provided all required information.
Note 1: The difference of contrast in image for correction version of v20.2.6 vs v23 is that in fmriprep v20.2.6, I used the SBref image as reference, whereas for fmriprep v23, I ignored the SBref.
Note 2: In fact in fmriprep v23, I did not proved a masked 'phasediffimage but the phasediff`image was well masked when I looked at it in the working directory. The issue seems to be coming in the creation of the field coefficient, with B-Spline functions. Here is the look at the fieldmap applied for fmriprep v23:
I’m having what looks like the same issue. Used fMRIPrep v23 and got “corrected” BOLD images that look quite distorted in posterior areas around the occipital lobe:
Thanks @jsein, and apologies for not being more clear. I did use the latest version:
About
fMRIPrep version: 23.0.2
fMRIPrep command: /opt/conda/bin/fmriprep /home/cmccabe/data/NTR/data/NTR0019_bids /home/cmccabe/data/NTR/data/work participant --participant-label NTR0019 --fs-license-file /home/wgraves/software/freesurfer/license.txt
Date preprocessed: 2023-05-04 09:30:50 -0400
Thank you @wwgraves for sharing this example of SDC going wrong with fmriprep v 23.0.2! Do you confirm that the SDC correction method used in your case by fmriprep v23.0.2 is the “phase difference” case?
May you try with fmriprep v20.2.7 and confirm that the SDC correction is still much better with this earlier version?
Yes, as far as I know it’s a “phase difference” case. I used the field map sequence that came with our Siemens Prisma. Using dcm2bids output two magnitude images, and one phase image, where the phase image had two echo times. That’s why I assume it’s a phase difference map. Please let me know if there’s a better way to verify.
I’m running fMRIPrep v20.2.7 now. I’ll post here once I’ve gotten a chance to take a look at the results!
@jsein@Steven Replying to confirm that phasediff fieldmap correction is still providing incorrect distortion correction in the latest fmriprep versions. Only version 20.2.7 seems to work with phasediff fieldmap input.
@wwgraves@jsein@Steven So far only solution seems to be to convert the phasediff + magnitude fieldmap into a rad/s fieldmap (and appropriately name it as per direct fieldmap under BIDS convention) before feeding it to fmriprep.
Instructions on how to create a rad/s fieldmap are found in the FSL website: FUGUE/Guide - FslWiki
after updating fmriprep to version 23.1.3 we unfortunately have encountered similar problems. We acquired our fieldmaps also at a Siemens MAGNETOM Prisma Scanner, and used two magnitude and the phasediff images for fieldmap correction.
Resulting fieldmaps using fmriprep version 23.1.3:
These fieldmaps then resulted also in heavily distorted func images, like shown in the post above. These problems did not occure when using fmriprep version 20.2.1. Our current workaround is therefore to simply use fmriprep 20.2.1 for this project, but we would be also highly interested in using newer versions of fmriprep in the future for our projects. Would very much apprecite any help or official fix for this problem!
Note to readers of this thread that 23.2.0a1 is out, which is a pre-release. It is “feature complete”, in that everything we intend to have in 23.2.0 is in it, but we want to give some time for people to run tests and catch bugs before we make it the obvious latest release. If you had any of the issues described here, we would love to hear from you about how it runs.
Actually, before everybody’s off to the races, please wait on 23.2.0a2, which should be out by tomorrow morning. @Steven found a bug that will affect anybody using T2w images and we’re fixing it ASAP.