How can I extract fields from metadata in DICOM images without using dicominfo function?

17 views (last 30 days)
I am working with MR DWI (Diffusion Magnetic Resonance Imaging) type DICOM and I want to extract only certain metadata (like the position of the cut the value of the gradient or the value of the field) without using the dicominfo function, because it is very slow for many images.
Does anyone know how to do it?
Thank you :)
  1 Comment
ILÁN FRANCISCO CARRETERO JUCHNOWICZ
Hi,
I recently contacted MathWorks Support and they have advised me the following solution:
''there is an undocumented way you might be able to extract 'dicominfo' faster. Please see the following example.
>> obj = images.internal.dicom.DICOMFile('CT-MONO2-16-ankle.dcm');
>> info = obj.getAttributeByName('SeriesTime');
This method first creates an object to extract the attributesNames and then use 'getAttributeByName' to read the information of a particular attribute. "
I have tried the commands detailed above and it works really well and faster than the dicominfo function.
I hope it helps you!

Sign in to comment.

Answers (1)

Harsha Priya Daggubati
Harsha Priya Daggubati on 16 Jun 2020
Hi,
As far as I know, there is no alternative available to 'dicominfo' in MATLAB, except a file exchange submission. You can have a look at the following link for more details.
  1 Comment
ILÁN FRANCISCO CARRETERO JUCHNOWICZ
Hi,
I try to use the alt_dicominfo function, but this function is only for some parameters and I dont want this parameters specifically.
I want to extract from MR diffusion images, the B value, the gradient directions and the SliceLocation.
However, thanks for the proposal.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!