Maybe this thread can enlighten you?
I tried skull-stripping only the phasediff image before feeding it into fmriprep, and the output is still very distorted:
Indeed, I looked at your dataset and tried fmriprep v23 vs fmriprep v20.2.6 on your raw data and the difference is dramatic:
Référence image, not corrected for SDC:
Référence SDC-corrected: fmriprep v20.2.6:
Référence SDC-corrected: fmriprep v23:
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:
@jsein Thanks.
So would it be right to say fmriprep v23 is not suitable for use with magnitude+phasediff fieldmap correction?
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:
Any new info on this issue?
Please try fmriprep v23.0.2 where a fix may have solved this issue:
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
Happy to try other stuff though!
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!
Indeed, what you report sounds exactly like the the phase difference method for SDC.
Yes @jsein, it turns out changing only the fMRIPrep version to 20.2.7 led to WAY better distortion correction:
In light of this, I’ll be interested to hear what developers think about next steps.
@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
Dear all,
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!
Best
Simon
Hi Simon,
The cause of these failures was identified and the fix will be released in the next version (23.2).
Best,
Chris
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.
Hi Chris,
I’ve been testing 23.2.0a2. For some reason, my fieldmaps don’t seem to be detected and no sdc is performed. The data includes blip-up/blip-down scans, and I believe that all the correct information is included in the json files (PE direction, “IntendedFor” field). The fieldmaps are recognized and used with previous versions. I’m using a singularity container with the command included below submitted in a batch script. Do you have any idea what I might be doing wrong?
singularity run --cleanenv /storage/group/sjw42/default/sjw42_collab/sw/singularity/fmriprep/fmriprep_v23.2.0a2.sif \
--participant_label 108 \
--nthreads 2 \
--omp-nthreads 1 \
--low-mem \
--mem 39000 \
--level full \
--use-aroma \
--output-layout legacy \
--output-spaces MNI152NLin6Asym:res-2 MNI152NLin6Asym:res-native \
--fs-license-file /storage/group/sjw42/default/sjw42_collab/sw/freesurfer-6.0.1/license.txt \
--work /storage/group/sjw42/default/ASH/LAPS/work \
/storage/group/sjw42/default/ASH/LAPS/bids \
/storage/group/sjw42/default/ASH/LAPS/bids/derivatives \
participants
Hi @Steve_Wilson,
Please share an example field map JSON contents. Also, AROMA is deprecated and mo longer a function of fmriprep (a separate app is in development for it).
Best,
Steven
Hi Steven - I’ve pasted the JSON contents for one of the field maps below. Thanks for letting me know about the change with AROMA!
Steve
{
"Modality": "MR",
"MagneticFieldStrength": 3,
"ImagingFrequency": 123.252515,
"Manufacturer": "Siemens",
"ManufacturersModelName": "MAGNETOM Prisma Fit",
"InstitutionName": "Penn State SLEIC",
"InstitutionAddress": "University Park Chandlee Laboratory,State College,PA,US,16802",
"DeviceSerialNumber": "67039",
"StationName": "AWP67039",
"BodyPartExamined": "BRAIN",
"PatientPosition": "HFS",
"SoftwareVersions": "syngo MR XA30",
"MRAcquisitionType": "2D",
"SeriesDescription": "sms_distortion_map_PA_68_51",
"ProtocolName": "sms_distortion_map_PA_68_51",
"ScanningSequence": "GR\\EP",
"SequenceVariant": "SK",
"ScanOptions": "FS\\PER",
"SequenceName": "*epse2d1_92",
"ImageType": [
"ORIGINAL",
"PRIMARY",
"M",
"ND",
"NORM",
"MFSPLIT"
],
"ImageTypeText": [
"ORIGINAL",
"PRIMARY",
"M",
"NONE"
],
"NonlinearGradientCorrection": false,
"SeriesNumber": 17,
"AcquisitionTime": "13:37:1.482500",
"AcquisitionNumber": 1,
"SliceThickness": 2.4,
"SpacingBetweenSlices": 2.4,
"SAR": 0.127954,
"EchoTime": 0.058,
"RepetitionTime": 7.06,
"FlipAngle": 90,
"PartialFourier": 1,
"BaseResolution": 92,
"ShimSetting": [
-1950,
8279,
9491,
311,
0,
-409,
53,
23
],
"TxRefAmp": 256.527,
"PhaseResolution": 1,
"VendorReportedEchoSpacing": 0.00051,
"ReceiveCoilName": "HeadNeck_64",
"ReceiveCoilActiveElements": "HC1-7;NC1",
"CoilString": "HeadNeck_64",
"PulseSequenceDetails": "%SiemensSeq%\\ep2d_se",
"CoilCombinationMethod": "Sum of Squares",
"MatrixCoilMode": "SENSE",
"PercentPhaseFOV": 100,
"PercentSampling": 100,
"EchoTrainLength": 92,
"PhaseEncodingSteps": 92,
"AcquisitionMatrixPE": 92,
"ReconMatrixPE": 92,
"BandwidthPerPixelPhaseEncode": 21.313,
"EffectiveEchoSpacing": 0.000509997,
"DerivedVendorReportedEchoSpacing": 0.000509997,
"TotalReadoutTime": 0.0464097,
"PixelBandwidth": 2470,
"DwellTime": 2.2e-06,
"PhaseEncodingDirection": "j",
"SliceTiming": [
3.53,
0,
3.6325,
0.1025,
3.7375,
0.2075,
3.84,
0.31,
3.945,
0.415,
4.0475,
0.52,
4.1525,
0.6225,
4.2575,
0.7275,
4.36,
0.83,
4.465,
0.935,
4.5675,
1.0375,
4.6725,
1.1425,
4.775,
1.245,
4.88,
1.35,
4.9825,
1.4525,
5.0875,
1.5575,
5.19,
1.66,
5.295,
1.765,
5.3975,
1.8675,
5.5025,
1.9725,
5.605,
2.075,
5.71,
2.18,
5.8125,
2.2825,
5.9175,
2.3875,
6.02,
2.4925,
6.125,
2.595,
6.23,
2.7,
6.3325,
2.8025,
6.4375,
2.9075,
6.54,
3.01,
6.645,
3.115,
6.7475,
3.2175,
6.8525,
3.3225,
6.955,
3.425
],
"ImageOrientationPatientDICOM": [
0.998511,
-0.0335475,
0.0430195,
0.0402788,
0.985198,
-0.166619
],
"InPlanePhaseEncodingDirectionDICOM": "COL",
"ConversionSoftware": "dcm2niix",
"ConversionSoftwareVersion": "v1.0.20230411",
"Dcm2bidsVersion": "3.1.0",
"IntendedFor": [
"bids::sub-108/func/sub-108_task-lapse_run-01_bold.nii.gz",
"bids::sub-108/func/sub-108_task-lapse_run-02_bold.nii.gz",
"bids::sub-108/func/sub-108_itask-iat_run-01_bold.nii.gz",
"bids::sub-108/func/sub-108_task-iat_run-02_bold.nii.gz"
]
}