Summary of what happened:
Hello,
I am trying to BIDS-ify some DICOMs using dcm2bids. It works fine for the anat and func, but I am having some issues with the fmaps. Based on my reading of the helper .json files, I have magnitude1, magnitude2, and phase difference files. I have included my config file contents under “validator output” below.
Here are some of the strange things that happened as I was tinkering with the config file:
At first, it worked for magnitude1 and magnitude2, but failed to pair for phasediff. I have tried several criteria to uniquely identify the phasediff file (including the helper file .json filename, “ImageType”, and “EchoTime1” and “EchoTime2” together), but I either get the message that it pairs with both magnitude2 and phasediff or it seems like it is ignored.
Then, I tried deleting the entry for phasediff, but then it seemed to ignore magnitude 2 (the next-to-last entry in the config file)–not even saying that it did not pair. So that was also very strange.
Most recently, it has counted the phasediff file as a second run of magnitude2.
Also strange: I updated dcm2niix with pip, but I keep getting the message that there is a newer version.
Please help me–I think this should be fairly straightforward but I’m not sure what I’m missing.
Thank you.
Command used (and if a helper script was used, a link to the helper script or the command generated):
dcm2bids -d Downloads/DICOM -p P156 -c tmp_dcm2bids/code/dcm2bids_config.json
Version:
PUT VERSION HERE
Environment (Docker, Singularity / Apptainer, custom installation):
Installed on python using pip, linux environment.
Data formatted according to a validatable standard? Please provide the output of the validator:
{
"descriptions": [
{
"datatype": "func",
"suffix": "bold",
"criteria": {
"SeriesDescription": "ep_bold_mb4_task"
}
},
{
"datatype": "anat",
"suffix": "T1w",
"criteria": {
"SeriesDescription": "MPRAGE SAG"
}
},
{
"datatype": "fmap",
"suffix": "magnitude1",
"criteria": {
"SeriesDescription": "gre_field_mapping",
"EchoTime": 0.00492
},
"sidecar_changes": {
"intendedFor": "ep_bold_mb4_task"
}
},
{
"datatype": "fmap",
"suffix": "magnitude2",
"criteria": {
"SeriesDescription": "gre_field_mapping",
"EchoTime": "0.00738"
},
"sidecar_changes": {
"intendedFor": "ep_bold_mb4_task"
}
},
{
"datatype": "fmap",
"suffix": "phasediff",
"criteria": {
"SidecarFilename": "014_DICOM_gre_field_mapping_20241029134745_e2_ph.json"
},
"sidecar_changes": {
"intendedFor": "ep_bold_mb4_task" }
}
]
}
Relevant log outputs (up to 20 lines):
```INFO | --- dcm2bids start ---
INFO | Running the following command: /home/UWO/pkalra7/venv/bin/dcm2bids -d Downloads/DICOM -p P156 -c tmp_dcm2bids/code/dcm2bids_config.json
INFO | OS version: Linux-5.15.0-140-generic-x86_64-with-glibc2.35
INFO | Python version: 3.10.12 (main, Feb 4 2025, 14:57:36) [GCC 11.4.0]
INFO | dcm2bids version: 3.2.0
INFO | dcm2niix version: v1.0.20250505
INFO | Checking for software update
INFO | Currently using the latest version of dcm2bids.
WARNING | A newer version exists for dcm2niix: v1.0.20250506
WARNING | You should update it -> https://github.com/rordenlab/dcm2niix.
INFO | participant: sub-P156
INFO | config: /home/UWO/pkalra7/tmp_dcm2bids/code/dcm2bids_config.json
INFO | BIDS directory: /home/UWO/pkalra7
INFO | Auto extract entities: False
INFO | Reorder entities: True
INFO | Validate BIDS: False
INFO | Running: dcm2niix -b y -ba y -z y -f %3s_%f_%p_%t -o /home/UWO/pkalra7/tmp_dcm2bids/sub-P156 Downloads/DICOM
INFO | Check log file for dcm2niix output
INFO | SIDECAR PAIRING
INFO | No Pairing <- 001_DICOM_AAHScout_20241029134745
INFO | No Pairing <- 002_DICOM_AAHScout_20241029134745_i00001
INFO | No Pairing <- 002_DICOM_AAHScout_20241029134745_i00002
INFO | No Pairing <- 002_DICOM_AAHScout_20241029134745_i00003
INFO | No Pairing <- 002_DICOM_AAHScout_20241029134745_i00004
INFO | No Pairing <- 003_DICOM_AAHScout_20241029134745_i00001
INFO | No Pairing <- 003_DICOM_AAHScout_20241029134745_i00002
INFO | No Pairing <- 003_DICOM_AAHScout_20241029134745_i00003
INFO | No Pairing <- 004_DICOM_AAHScout_20241029134745_i00001
INFO | No Pairing <- 004_DICOM_AAHScout_20241029134745_i00002
INFO | No Pairing <- 004_DICOM_AAHScout_20241029134745_i00003
INFO | sub-P156_bold <- 005_DICOM_ep_bold_mb4_task_20241029134745
INFO | sub-P156_bold <- 006_DICOM_ep_bold_mb4_task_20241029134745
INFO | sub-P156_bold <- 007_DICOM_ep_bold_mb4_task_20241029134745
INFO | sub-P156_T1w <- 008_DICOM_MPRAGE_SAG_20241029134745
INFO | sub-P156_bold <- 009_DICOM_ep_bold_mb4_task_20241029134745
INFO | sub-P156_bold <- 010_DICOM_ep_bold_mb4_task_20241029134745
INFO | sub-P156_bold <- 011_DICOM_ep_bold_mb4_task_20241029134745
INFO | sub-P156_magnitude1 <- 013_DICOM_gre_field_mapping_20241029134745_e1
INFO | sub-P156_magnitude2 <- 013_DICOM_gre_field_mapping_20241029134745_e2
WARNING | Several Pairing <- 014_DICOM_gre_field_mapping_20241029134745_e2_ph
WARNING | -> _magnitude2
WARNING | -> _phasediff
INFO | No Pairing <- 012_DICOM_ep_bold_mb4_PA_20241029134745
INFO | sub-P156/func/sub-P156_bold has 6 runs
INFO | Adding run information to the acquisition
INFO | Moving acquisitions into BIDS folder "/home/UWO/pkalra7/sub-P156".