Dicom to Bids (Unconventionally organized dicoms)

I have been assigned to a new project and the dicom files are organized in a way that I haven’t seen before. All dicom files of the subject are in one directory and they are not named as the conventional “006-…” Have you seen anything like this? (See below)

I need to convert them to bids format (at a cluster). Any suggestion would be great!

MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.853.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.854.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.855.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.856.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.857.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.858.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.859.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.860.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.861.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.862.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.863.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.864.dcm
...
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987328.870.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987329.100.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987329.101.dcm
MR.1.2.840.113619.2.374.4722639.4348446.16552.1575987329.102.dcm
...
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.268.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.269.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.26.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.270.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.271.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.272.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.273.dcm
MR.1.2.840.113619.2.374.4722639.4348446.18900.1575995524.274.dcm
...

It is common for DICOM files to be named based on their MediaStorageSOPInstanceUID (0002,0003). If you really want pretty DICOM names, you can rename your DICOMs with the command

dcm2niix -r y /path/to/dicomfolder
By default, this will rename DICOMs using the file naming pattern -f %t/%s_%p/%4r_%o.dcm, so the path and name will include the date time, series number, protocol name, instance number and mediaObjectInstanceUID. However, the DICOM file names are really irrelevant for converting your data to BIDS. The tools will look at the meta data of the DICOM files to derive the proper file naming structure.

I suggest you look at the links section of the dcm2niix home page to choose a tool that can convert your DICOM data to BIDS.

Here is a nice tutorial for one method of converting DICOM data to BIDS.

@aliyarozercan - you can use heudiconv to convert this, which uses @Chris_Rorden dcm2niix underneath it, but allows you to restructure according to bids via a heuristic.

for future collection i would recommend looking at the reproin conventions for your scanner.

1 Like