Dcm2bids with reverse phase encoding

Dear experts,

I am trying to convert my dicom data to bids (to be used with fmriprep and qsiprep), but I encounter a problem when I try to convert the reverse-phase encoded B0s:

INFO:dcm2bids.sidecar:_T1w  <-  005_20210609_t1_mprage_sag_20210609125309
INFO:dcm2bids.sidecar:_T2w  <-  006_20210609_t2_space_sag_20210609125309
INFO:dcm2bids.sidecar:No Pairing  <-  007_20210609_DTI_rev_20210609125309
INFO:dcm2bids.sidecar:_dwi  <-  008_20210609_DTI_AP_20210609125309
INFO:dcm2bids.sidecar:_bold  <-  027_20210609_ep2d_pace_p2_20210609125309

I’ve been playing with the config file, but I can not make it work. Any clue of what’s going on?

 {
   "descriptions": [
      {
         "dataType": "anat",
         "modalityLabel": "T1w",
         "criteria": {
            "SeriesDescription": "*t1_mprage_sag*"
         }
      },
      {
         "dataType": "dwi",
         "modalityLabel": "dwi",
         "criteria": {
            "SidecarFilename": "008_20210609_DTI_AP_2*"
         }
      },
      {
         "dataType": "anat",
         "modalityLabel": "T2w",
         "criteria": {
            "SeriesDescription": "*t2_space_sag*"
         }
      },
      {
         "dataType": "func",
         "modalityLabel": "bold",
         "criteria": {
            "SeriesDescription": "*ep2d_pace_p2*"
         }
      },
      {
         "dataType": "fmap",
         "modalityLabel": "epi",
         "criteria": {
            "SeriesDescription": "DTI_rev*",
         "IntendedFor": 1
        }
    }
   ]
}

Thanks in advance.

Best regards,

Manuel

Hi Manuel,

I believe you’ll need the B0 dwi fieldmap portion of the configuration file to look like this:

       {
         "dataType": "fmap",
         "modalityLabel": "epi",
         "customLabels": "dir-PA",
         "criteria": {
            "SeriesDescription": "*DTI_rev*",
         "IntendedFor": [1]
        }

Since this is a fmap acquisition, you need to specify the dir entity label, done in dcm2bids with customLabels. In the SeriesDescription, you’d need a wildcard at the beginning of the string. Lastly, I believe the IntendedFor information needs to be in a list, all of which is done in my example above.

Hopefully this resolves your issue.

Hi @dlevitas ,

Thanks for the response, but the issue still persists. Any clue what could go wrong?

Best regards,

Manuel

You might need to change to "SidecarFilename": "*DTI_rev*", since that’s what you used to specify the DWI acquisition.

Also, I made an error earlier. For the IntendedFor field it can simply be "IntendedFor": 1 for a single index value; a list is only needed for mutiple indices.

Hi,

I think you are right, looks like the error is in the "SidecarFilename" but I don’t know what to write here. Just in case this is the corresponding .json (a part of it)

"BodyPartExamined": "BRAIN",
"PatientPosition": "HFS",
"SoftwareVersions": "syngo MR E11",
"MRAcquisitionType": "2D",
"SeriesDescription": "DTI_rev",
"ProtocolName": "DTI_rev",
"ScanningSequence": "EP",
"SequenceVariant": "SK\\SP",
"ScanOptions": "PFP\\FS",
"SequenceName": "*ep_b0",
"ImageType": ["ORIGINAL", "PRIMARY", "DIFFUSION", "NONE", "ND", "NORM"],
"SeriesNumber": 7,

Thanks in advance.

Best regards,

Manuel

Does "SidecarFilename": "*DTI_rev*" not resolve the issue? The SidecarFilename refers to 007_20210609_DTI_rev_20210609125309, so the wildcards we’ve placed at the beginning and end of the string should catch it all DICOMS with that substring.

Also, what version of dcm2bids are you using?

Hi,

I found the error. The config file that works is:

 "dataType": "fmap",
 "modalityLabel": "epi",
 "customLabels": "dir-PA",
 "IntendedFor": 1,
 "criteria": {
    "SidecarFilename": "*DTI_rev*"

The problem was that before the section "IntendedFor" was inside the criteria. Thanks for the help.

Best regards,

Manuel

1 Like

You will also want to make sure that the two sequences have reversed phase encoding polarity. So (assuming axial scans with AP phase encoding) one scan will report:

"PhaseEncodingDirection": "j-",

and the other will report

"PhaseEncodingDirection": "j",

I notice that your scans come from a Siemens E11 system. The forward and reversed PE scans require all other parameters are the same, so the standard way to acquire these was to use “Copy References”. Unfortunately, a bug in E11 caused issues with reversed phase encoding, e.g. if the first scan was A>>P and the second (with copy references) was P>>A, the second scan would be run with “R>>L”. This would appear in the JSON as phase encoding direction in columns (i) rather than rows (j).

"PhaseEncodingDirection": "i",

If your scans were acquired this way, they are not suitable for TOPUP, and you will be unable to include a reversed dataset. I believe this bug impacted all sequences, with the exception of the CMRR research sequences.

I strongly urge all Prisma E11 users to make sure that they get the SH05 patch installed on their scanner. I Siemens installed this patch in November 2020 at my center.

Dear @Chris_Rorden,

Thanks for pointing this out. I forwarded the message to the people in the scanner.

I check all my sequences and doesn’t seem to be affected.

Best regards,

Manuel