[fMRIPrep] No susceptibility distortion correction despite "IntendedFor" field in fmap .json files

Summary of what happened:

I can run fMRIPrep without error, but it does not run the susceptibility distortion correction.
I get the following message for each scan run: None of the available B0 fieldmaps are associated to </path/to/bold.nii.gz>

Despite this, I have an IntendedFor field in my fmap .json files indicating the func files with which they should be associated.

The field map I am using has two phase maps and two magnitude images. I’ve included an example .json file for the first phase map below.

Command used (and if a helper script was used, a link to the helper script or the command generated):

unset PYTHONPATH; singularity run --cleanenv -B /project/gottfried/samlyons/olfunc:/data \
    -B /project/gottfried/samlyons/olfunc/derivatives:/olfunc/derivatives \
    -B /project/gottfried/samlyons/work:/work \
    -B /project/gottfried/samlyons/images/license.txt:/license.txt \
    -B /project/gottfried/samlyons/olfunc \
    /project/gottfried/samlyons/images/fmriprep-23.0.2.simg \
    /project/gottfried/samlyons/olfunc/sub-olfunc007/ses-olfunc007 \
    /project/gottfried/samlyons/olfunc/derivatives \
    participant \
    --participant-label olfunc007 \
    --skip-bids-validation \
    --fs-license-file /license.txt \
    --stop-on-first-crash \
    --nthreads 16 \
    --omp-nthreads 16 \
    -w /work \
    --fs-no-reconall

Version:

23.0.2

Environment (Docker, Singularity, custom installation):

Singularity

Data formatted according to a validatable standard? Please provide the output of the validator:

No errors from BIDS validator.

Relevant log outputs (up to 20 lines):

230614-15:02:09,396 nipype.workflow CRITICAL:
	 None of the available B0 fieldmaps are associated to </project/gottfried/samlyons/olfunc/sub-olfunc007/ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-01_bold.nii.gz>

Screenshots / relevant information:

.json file for phase 1 of fieldmap. Phase 2 looks basically the same, except the echotime is different.


{
    "AcquisitionMatrix": [
        112,
        0,
        0,
        112
    ],
    "AcquisitionMatrixPE": 112,
    "AcquisitionNumber": 1,
    "AcquisitionTime": "11:21:22.980000",
    "B0FieldIdentifier": "phases_fmap0",
    "BaseResolution": 112,
    "BodyPartExamined": "BRAIN",
    "CoilCombinationMethod": "Adaptive Combine",
    "Columns": 112,
    "ConsistencyInfo": "N4_VE12U_LATEST_20181126",
    "ConversionSoftware": "dcm2niix",
    "ConversionSoftwareVersion": "v1.0.20211006",
    "DeviceSerialNumber": "79106",
    "EchoNumber": 1,
    "EchoTime": 0.00299,
    "EchoTime1": 0.00299,
    "EchoTime2": 0.00525,
    "EchoTrainLength": 2,
    "FlipAngle": 15,
    "ImageComments": "007@gottfried:OlfUnc",
    "ImageOrientationPatientDICOM": [
        0.998864,
        -0.0335361,
        -0.0338444,
        0.0071479,
        0.807771,
        -0.589454
    ],
    "ImageType": [
        "ORIGINAL",
        "PRIMARY",
        "P",
        "ND",
        "PHASE"
    ],
    "ImagingFrequency": 296.942,
    "InPlanePhaseEncodingDirection": "COL",
    "InPlanePhaseEncodingDirectionDICOM": "COL",
    "InstitutionAddress": "Curie Blvd 422,Philadelphia,PA,US,19104",
    "InstitutionName": "SC7T",
    "IntendedFor": [
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-01_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-02_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-03_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-04_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-05_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-06_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-07_bold.nii.gz",
        "ses-olfunc007/func/sub-olfunc007_ses-olfunc007_task-olfunc_run-08_bold.nii.gz"
    ],
    "MRAcquisitionType": "2D",
    "MagneticFieldStrength": 7,
    "Manufacturer": "Siemens",
    "ManufacturersModelName": "Investigational_Device_7T",
    "MatrixCoilMode": "GRAPPA",
    "Modality": "MR",
    "ParallelReductionFactorInPlane": 2,
    "PartialFourier": 1,
    "PatientPosition": "HFS",
    "PercentPhaseFOV": 100,
    "PercentPhaseFieldOfView": 100.0,
    "PercentSampling": 100.0,
    "PhaseEncodingDirection": "j-",
    "PhaseEncodingSteps": 112,
    "PhaseResolution": 1,
    "PixelBandwidth": 630,
    "PixelSpacing": [
        1.9642857313156,
        1.9642857313156
    ],
    "ProcedureStepDescription": "Research^Ludwig",
    "ProtocolName": "B0map2D_2mm",
    "PulseSequenceDetails": "%AdjustSeq%\\AdjGreSeq",
    "ReceiveCoilActiveElements": "HE1-4;NE1,2",
    "ReceiveCoilName": "1Tx32Rx_Head",
    "ReconMatrixPE": 112,
    "RefLinesPE": 24,
    "RepetitionTime": 0.032,
    "Rows": 112,
    "SAR": 0.0172858,
    "ScanningSequence": "GR",
    "SequenceName": "*fl2d2",
    "SequenceVariant": "SP",
    "SeriesDescription": "AdjGre",
    "SeriesNumber": 11,
    "ShimSetting": [
        27,
        -70,
        594,
        17,
        -151,
        602,
        -110,
        163
    ],
    "SliceThickness": 2,
    "SliceTiming": [
        0,
        2.17969,
        4.35156,
        6.53125,
        8.70312,
        10.8828,
        13.0547,
        15.2344,
        17.4141,
        19.5859,
        21.7656,
        23.9375,
        26.1172,
        28.2891,
        30.4688,
        32.6406,
        34.8203,
        36.9922,
        39.1719,
        41.3438,
        43.5234,
        45.6953,
        47.875,
        50.0547,
        0.00781,
        2.1875,
        4.36719,
        6.53906,
        8.71094,
        10.8906,
        13.0625,
        15.2422,
        17.4219,
        19.5938,
        21.7734,
        23.9453,
        26.125,
        28.2969,
        30.4766,
        32.6484,
        34.8281,
        37,
        39.1797,
        41.3516,
        43.5312,
        45.7031,
        47.8828,
        50.0547,
        0.01562,
        2.19531,
        4.36719,
        6.54688,
        8.72656,
        10.8984,
        13.0703,
        15.25,
        17.4297,
        19.6016,
        21.7812,
        23.9531,
        26.1328,
        28.3047,
        30.4844,
        32.6562,
        34.8359,
        37.0078,
        39.1875,
        41.3672,
        43.5391,
        45.7109,
        47.8906,
        50.0625,
        0.02344,
        2.20312,
        4.375,
        6.55469,
        8.73438,
        10.9062,
        13.0859,
        15.2578,
        17.4297,
        19.6094,
        21.7891,
        23.9609,
        26.1406,
        28.3125,
        30.4922,
        32.6641,
        34.8438,
        37.0156,
        39.1953,
        41.3672,
        43.5469,
        45.7266,
        47.8984,
        50.0703
    ],
    "SoftwareVersions": "syngo MR E12",
    "SpacingBetweenSlices": 2.0,
    "StationName": "AWP79106",
    "TxRefAmp": 230.174
}

Hi @samlyons,

Perhaps you will have better luck using the B0FieldIdentifier/B0FieldSource method? See here: FmriPrep SDC Fails to Associate To Bold Image, Preprocess Working - #10 by emdupre

But before that, lets also fix some things about your command:

It looks like you are inputting a subject folder to fMRIPrep. You should be putting in the root directory.

This flag is not recommended (see here).

You make these bindings, but do not use some of them (in particular /data and /olfunc/derivatives).

Try this as your command (I am also removing the skip-bids-validation in case something BIDS related is causing a problem):

unset PYTHONPATH; singularity run --cleanenv -B /project/gottfried/samlyons/olfunc:/data \
    -B /project/gottfried/samlyons/olfunc/derivatives:/derivatives \
    -B /project/gottfried/samlyons/work:/work \
    -B /project/gottfried/samlyons/images/license.txt:/license.txt \
    /project/gottfried/samlyons/images/fmriprep-23.0.2.simg \
    /data \
    /derivatives \
    participant \
    --participant-label olfunc007 \
    --fs-license-file /license.txt \
    --stop-on-first-crash \
    --nthreads 16 \
    --omp-nthreads 16 \
    -w /work \

Best,
Steven

Thank you @Steven, much appreciated! It turns out that this was probably a binding issue due to my bad fmriprep command code lol. I now get a message saying that the B0 maps can be found, so it looks like things are fixed without having to change the .json files.

1 Like