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:
- Which DICOM fields are essential for a successful
dcm2bids
conversion? - Is there a way to recover the Series Description or any other missing fields from the DICOMs?
Any advice would be greatly appreciated!