File Exchange

image thumbnail

alt_dicominfo(img,B​itRange)

Faster and simplest alternative to dicominfo function (only demographic and basic image information)

3 Downloads

Updated 31 Jan 2018

View License

I made this code aiming to avoid the MATLAB DICOMINFO function into my loops. This function may replace the original dicominfo if you only seek demographic and image basic information (described below) from the header. The MATLAB DICOMINFO is very slow due the amount of data indexed. Comparing to the original DICOMINFO in a large MRI DICOM file (4D file), this function may be 100 times faster.
I am not sure if the code will work for every type of DICOM files and I ask you to use this function with responsibility.
Add a dicom (*.dcm) image in variable img and add or not a bit range to search into your image. The code will try to give an oputput as described:
OUTPUT:
DcmInfos.PatientName
DcmInfos.PatientBirth
DcmInfos.PatientID
DcmInfos.PatientSex
DcmInfos.StudyDescrip
DcmInfos.StudyDate
DcmInfos.StudyTime
DcmInfos.SerieDescrip
DcmInfos.SerieTime
DcmInfos.StationName
DcmInfos.EchoTime
DcmInfos.RepetitionTime
DcmInfos.SerieVoxDim
DcmInfos.NumberSlices
DcmInfos.SerieMatrix
DcmInfos.NofVolumes

Cite As

Brunno Machado de Campos (2020). alt_dicominfo(img,BitRange) (https://www.mathworks.com/matlabcentral/fileexchange/65606-alt_dicominfo-img-bitrange), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Exactly what I was looking for.
for me 10x faster.

Updates

1.1.0.0

* Now, I add the "NUmber of Volumes (dynamics) for 4D images, modifying the output field Matrix and adding the field NofVolumes

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