Multiple func runs per field map dcm2bids >=3.X.X

Continuing the discussion from Dcm2bids: using intendedFor to specify multiple bold runs:

Multiple func runs per field map dcm2bids >=3.X.X

Hello,

I have the same question/problem, but for the new dcm2bids version >=3.X.X
In my understanding the functional runs now receive an ‘id’ in my case “id_1” for the field map I want to pair it with. Inside the fieldmap I now no longer list the index of the matching id (now listed in sidecar_changes).

As it is running, it seems to recognize that there are multiple runs matched with the same fieldmap:
INFO | sub-35516/ses-20231010/fmap/sub-35516_ses-20231010_dir-invpol_epi has 3 runs

However, in the output the “IntendedFor” field in the json of the fmap only lists 1 bold run.
“IntendedFor”: “bids::sub-35516/ses-20231010/func/sub-35516_ses-20231010_task-localizer_run-01_part-1_bold.nii.gz”

Here I was expecting multiple bold runs to appear (all with “id_1”). I will paste the beginning of my config file below with the first 3 bold runs, followed by my fmap. Any help/pointers would be very much appreciated.

Config file:

	{
"descriptions": [
	{
		"id": "id_1",
		"datatype": "func",
		"suffix": "bold",
		"custom_entities": "task-localizer_run-01_part-1",
		"criteria": {
			"SeriesDescription": "cmrr_mbep2d_bold_2.0iso_AA+15_sess1run1"
		},
		"sidecar_changes": {
			"TaskName": "localizer"
		}
	},
	{
		"id": "id_1",
		"datatype": "func",
		"suffix": "bold",
		"custom_entities": "task-localizer_run-02_part-1",
		"criteria": {
			"SeriesDescription": "cmrr_mbep2d_bold_2.0iso_AA+15_sess1run2"
		},
		"sidecar_changes": {
			"TaskName": "localizer"
		}
	},
	{
		"id": "id_1",
		"datatype": "func",
		"suffix": "bold",
		"custom_entities": "task-localizer_run-03_part-1",
		"criteria": {
			"SeriesDescription": "cmrr_mbep2d_bold_2.0iso_AA+15_sess1run3"
		},
		"sidecar_changes": {
			"TaskName": "localizer"
		}
	},
	{
		"datatype": "fmap",
		"suffix": "epi",
		"sidecar_changes": {
			"IntendedFor": "id_1"
		},
		"criteria": {
			"SeriesDescription": "cmrr_mbep2d_se_2.0iso_normAA+15_sess1fmap1"
		},
		"custom_entities": "dir-norm"
	},
	{
		"datatype": "fmap",
		"suffix": "epi",
		"sidecar_changes": {
			"IntendedFor": "id_1"
		},
		"criteria": {
			"SeriesDescription": "cmrr_mbep2d_se_2.0iso_invAA+15_sess1fmap1"
		},
		"custom_entities": "dir-invpol"
	},

Hello @FabiR,

id has to be unique. If you define one id per description and use all three in IntendedFor it should work as expected.

		"sidecar_changes": {
			"IntendedFor": ["id_1", "id_2","id_3"]
		},

Thank you for your feedback, we will work to make dcm2bids more robust and the documentation even clearer.

Arnaud

1 Like

Hi Arnaud,

thank you so much for your swift reply!

Best
Fabian

I wonder, given that IntendedFor is slowly being phased out in favor of B0FieldIdentifier/Source if we should transition to B0FieldIdentifier/Source? Given that there’s already an id system in place, I imagine it actually may be more straightforward, since B0FieldIdentifier/Source is based off an ID matching system anyway.

I try to take some time to breath (and to drink a glass of scotch :tumbler_glass:) between dcm2bids releases :sweat_smile: but definitively we will move forward with this new standard in the future.

2 Likes