Missing headers in DICOMs: Which are required for dcm2bids?

I’m encountering an issue with dcm2niix where the following command:

dcm2niix -b y -ba y -z y -f '%3s_%f_%p_%t' -o /path/to/output /path/to/DICOM

produces hundreds of errors:

Error: Too many NIFTI images with the name...

This error is only occurring with a new subject in an ongoing study. Based on advice from this NeuroStars post, I added %b to the filename pattern:

dcm2niix -b y -ba y -z y -f '%3s_%f_%p_%t_%b' -o /path/to/output /path/to/DICOM

This resolved the error, but the output directory for this subject looks different from the others. Filenames do not include labels like “T1w”, “dMRI”, or “T2w”, like they do for other subjects that I put through dcm2niix—instead, there’s a corresponding .nii.gz and .json for each DICOM file:

Example DICOM:
MR.1.3.12.x.x.x.x.x.x.x.x.x.x.x

Example output in tmp_dcm2bids:

001_SUBJECT_XX_YYYYMMDDHHMMSS_MR.1.3.12.x.x.x.x.x.x.x.x.x.x.json
001_SUBJECT_XX_YYYYMMDDHHMMSS_MR.1.3.12.x.x.x.x.x.x.x.x.x.x.nii.gz

Since the output format differs from previous subjects, the dcm2bids conversion fails, as the current config.json is not compatible. The tool prints several “No Pairing” messages and finishes with the warning:

WARNING | NO PAIRING WAS FOUND. BIDS FOLDER "/path/to/output" WON'T BE CREATED. CHECK YOUR CONFIG FILE.

I’m using dcm2bids version 3.2.0. Upon inspecting the DICOM headers for this subject, I noticed several fields missing compared to previous subjects, including Patient Name, Patient ID, and Series Description. I suspect the Series Description was used to name the files in previous runs.

My questions are:

  1. Which DICOM fields are essential for a successful dcm2bids conversion?
  2. Is there a way to recover the Series Description or any other missing fields from the DICOMs?

Any advice would be greatly appreciated!

Hi @swwalsh1,

Which fields are required are based on your config file and the metadata available in the jsons. If there is a minimally sufficient set of metadata criteria to uniquely identify each image, then you are good to go.

Best,
Steven

It turns out the DICOMs were stripped of any useful metadata to distinguish images. Something went wrong when transferring the images from the scanner. I requested the DICOMs be sent from the scanner again and I was able to run dcm2bids and dcm2niix successfully without the need for %b option for -f.