fMRI data: filenames

Hi everyone,

I’m going through some fMRI data for one participant that was collected by someone else but the filenames are not in order. How do I rearrange this? Do I need to look at the DICOM file? What specifically do I look for?

Thank you in advance for your help.



Hi Rubina,

This may vary depending on the acquisition, scanner manufacturer/model, and reconstruction ( e.g. images in Siemens mosaic format vs single slices ).

One way to sort the files would be to use the acquisition time in the relevant DICOM tag ( check (0019, 1029) for Siemens ). Take a look here for more details.

It may be simpler to use a file conversion tool such as dcm2niix and convert to NIFTI format, which may take care of the sorting for you.

I hope this helps!

Hi @imageClarity,

Thank you for getting back to me.

Yes, that’s true because it may vary due to many factors but I couldn’t convert it to NIFTI format because the DICOM filenames were not in order. However, I figured it out. When I opened the DICOM header for one filename, the filenames were stored in Series, Acquisition, and Instance no. This would be like this for example:

“C0123061-0005-0007-0007” (C0123061 is a participant number)



1 Like
Category icons made by Freepik from