File Exchange

image thumbnail

Siemens DICOM sort and convert to NIfTI

version 1.27 (164 KB) by Simon Robinson
Converts Siemens MRI DICOM data into NIfTI format, and/or anonymises and sorts into scan directories

25 Downloads

Updated 07 Apr 2020

View Version History

View License

The program offers GUI (dicom_sort_convert_main.m) and .m (example_dscm_call.m) input to select input and output directories and determine options. The main functions are

i) sorting of Siemens MR scanner (IMA) data into directories, removal of patient name from file, and lightly anonymisaton (only PatientName fields but not DOB, gender, PatientID, etc)
ii) Conversion to one-file (.nii) or two-file (.img, .hdr) NIfTI format (one per scan), reformatting more complex scans to use up to six dimensions of the NIfTI structure (time-points, echo, RF channel, phase/magnitude, diffusion gradient, etc). Also writes both DICOM header info and the text section of Siemens header info to a text_header.txt file for each scan.
iii) Generation of a list of all scans performed (scan_list.txt) including most relevant parameters (can easily be customised), making it easy to generate a summary sheet for each subject scanned.

Thanks to Jimmy Shen for sharing, developing and supporting his excellent NIfTI toolbox.

Cite As

Simon Robinson (2020). Siemens DICOM sort and convert to NIfTI (https://www.mathworks.com/matlabcentral/fileexchange/22508-siemens-dicom-sort-and-convert-to-nifti), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)

LSS

Thank you for this, it looks like pretty much exactly the thing I need!!! I have a little trouble locating the output files, after running example_dscm_call though. I tried this:

%OPTIONAL PARAMETERS
data.workbar_off = 'no';
data.test = 'no'; % if test='no', the .IMA data are made into a tarball after sorting
data.define_writefile_subdir = 'no';
data.writefile_dir='C:\Desktop\test'

No error messages.

efe ozkaya

Cath H

Thanks for sharing this - my previous converter was having some serious issues with some exported files, but this handled them with ease!

Roberta

Elmar

thanks for sharing simon, this really helped!

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Tools for NIfTI and ANALYZE image

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!