Dcm2bids: using intendedFor to specify multiple bold runs

Hi there,

I’m using dcm2bids, and having an issue with the intendedFor field. My data includes 8 runs of bold data, two anatomical scans and a field map. I used intendedFor: 0 to indicate that the field map should be applied to the bold data (see config file below). But, rather than naming all 8 runs (e.g. sub-1004_task-aim_run-01_bold.nii.gz, sub-1004_task-aim_run-02_bold.nii.gz, …), I get a generic file name in the fieldmap .json file (“IntendedFor”: “func/sub-1004_task-aim_bold.nii.gz”), and this file doesn’t exist.
Is there a way to specify all 8 runs without having to do this manually? Thanks!

config file:
{
“descriptions”: [
{
“dataType”: “func”,
“modalityLabel”: “bold”,
“customLabels”: “task-aim”,
“criteria”: {
“ProtocolName”: “EPI_1.7_MB3_PF6_8~188”
},
“sidecarChanges”: {
“TaskName”: “AIM”
}},
{
“dataType”: “anat”,
“modalityLabel”: “T1w”,
“criteria”: {
“SeriesDescription”: “T1_MPRAGE_OblSag_Ipat2”
}
},
{
“dataType”: “anat”,
“modalityLabel”: “T2w”,
“criteria”: {
“ProtocolName”: “t2_tse*”
}
},
{
“dataType”: “fmap”,
“modalityLabel”: “phasediff”,
“criteria”: {
“ProtocolName”: “gre_field_mapping”
},
“intendedFor”: 0,
“sidecarChanges”: {
“EchoTime1”: “0.00492”,
“EchoTime2”: “0.00738”}
}
]
}

Hi @jrobin,

I believe there are a few issues in how you’ve set up your configuration file.

1). For each run, the customLabels field also needs to include the run information, so for example, "customLabels: “task-aim_run-01”. Also, is the “ProtocolName”: “EPI_1.7_MB3_PF6_8~188” information different for each functional run? If not, I don’t think dcm2bids can tell which functional run is which. Personally, I use SidecarFilename instead, where each value pertains to the series number. Of course, feel free to use what works best for you, but what is in your criteria subfields will need to contain information that differentiates the functional runs. Here’s a quick example:

{
   "descriptions": [
      {
         "dataType": "func",
         "modalityLabel": "bold",
         "customLabels": "task-aim_run-01",
         "criteria": {
            "SidecarFilename": "002*"
         },
         "sidecarChanges": {
            "TaskName": "AIM"
         }
      },
      {
         "dataType": "func",
         "modalityLabel": "bold",
         "customLabels": "task-aim_run-02",
         "criteria": {
            "SidecarFilename": "003*"
         },
         "sidecarChanges": {
            "TaskName": "AIM"
         }
      },

2). Regarding the intendedFor field in your fieldmap, it would need to look something like this:

   {
         "dataType": "fmap",
         "modalityLabel": "phasediff",
         "IntendedFor": [
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7
         ],
         "criteria": {
            "SidecarFilename": "012*"
         },
         "sidecarChanges": {
            "EchoTime1": 0.00492,
            "EchoTime2": 0.00738
         }
     },

3). In addition to your phasediff file, do you also have magnitude1 and magnitude2 files? I believe you’ll also need to specify them in your configuration file as well to be BIDS compliant.

Disclaimer: You can ignore the SidecarFilename in my examples above since they’re arbitrary.

Thank you very much for your help!

MANAGED BY INCF