What is difference between dicomdisp vs dicominfo?

Good afternoon, I am trying to access data within a dicom rt file. When I use dicomdisp the data I am interested is shown but when dicominfo is called on this file, the data is not displayed. What are the differences between a function call of dicomdisp and dicominfo that would cause this data loss?

 Accepted Answer

What you're seeing here is the hierarchical nature of DICOM files. The "FluenceMapSeqeuence" struct in the dicominfo output contains the fields you want. (You can see this in the output of dicomdisp in the non-zero values of the "Level" column.)
In your example, you'd want to write something like this:
metadata = dicominfo('c:\file.dcm');
metadata.FluenceMapSequence.Item_1.FluenceDataScale
I hope this helps.

More Answers (1)

Walter Roberson
Walter Roberson on 8 Feb 2016
Edited: Walter Roberson on 8 Feb 2016
One difference is that dicomdisp() is for displaying only, but dicominfo() returns the information as a structure and so is for program use.
Some of the information returned by dicominfo does not get displayed by default because what is being returned is a struct array and the default display of struct arrays give summaries of the content if the content is more than a fairly small size. To see that information you would need to store the resulting struct and ask to display a particular field of it.

6 Comments

Thanks Walter for your input. I think an example might be in order here. I am attaching an example code.
An Example:
So to store the struct, that would be:
data_dicom=dicominfo('file.dcm');
and to access a element of the struct would be
ssd = data_dicom.RadiationMachineSSD
which would have ssd = 1000 from data below.
dicomdisp Result:
File: 'C:\file.dcm' (73412 bytes)
Read on an IEEE little-endian machine.
File begins with group 0002 metadata at byte 132.
Transfer syntax: 1.2.840.10008.1.2.1 (Explicit VR Little Endian).
DICOM Information object: 1.2.840.10008.5.1.4.1.1.481.1 (RT Image Storage).
Location Level Tag VR Size Name Data
----------------------------------------------------------------------------------------------------
0001092 0 (3002,0020) SH 0 bytes - RadiationMachineName []
0001100 0 (3002,0022) DS 0 bytes - RadiationMachineSAD []
0001108 0 (3002,0024) DS 4 bytes - RadiationMachineSSD [1000]
0001120 0 (3002,0026) DS 4 bytes - RTImageSID [1000]
0001132 0 (3002,0040) SQ 48 bytes - FluenceMapSequence
0001144 1 (FFFE,E000) UN 40 bytes - Item
0001152 2 (3002,0041) CS 8 bytes - FluenceDataSource [MEASURED]
0001168 2 (3002,0042) DS 16 bytes - FluenceDataScale [6.65966666666667]
0001192 0 (300A,00B3) CS 0 bytes - PrimaryDosimeterUnit []
0001200 0 (7FE0,0010) OW 72200 bytes - PixelData []
dicominfo Result:
Filename: 'C:\file.dcm'
RadiationMachineName: ''
RadiationMachineSAD: []
RadiationMachineSSD: 1000
RTImageSID: 1000
FluenceMapSequence: [1x1 struct]
PrimaryDosimeterUnit: ''
The data I want to access is FluenceDataScale which is in the dicomdisp but not dicominfo. I shortened output to relevant data I am interested in.
I dont know why this information is not available in dicominfo. That why I was asking if, besides displaying, that something else is going on here.
Sorry, this is beyond my experience.
Thanks for your time Walter. Have a great day.
This was very helpful. Do You know how I can read multiple control points ?
Hi all,
I want to extract the RescaleSlope value from dicominfo for each slice. But i have 135 slice images. This is my code to extract RescaleSlope. But still failed. I JUST CAN EXTRACT ONE BY ONE ONLY.
P = zeros(256, 256, 135);
for K = 1 : 135
petname = sprintf('PET_I1001_PT%03d.dcm', K);
P(:,:,K) = dicominfo(petname);
end
info=dicominfo(P(:,:,K));
[r,c,slice] = findND (info.RescaleSlope);
Anyone who can help me solve this problem???

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!