Matlab not seeing DICOM tag RescaleIntercept (0028,1052)
Show older comments
I have a DICOM dataset which contains a RescaleIntercept field that I can see in RadiAnt Viewer. However, when I load the header of that file into Matlab using dicominfo, the field is absent. I've double checked that the name aliases to the same tag ID:
[group,element] = dicomlookup('RescaleIntercept')
group = 40
element = 4178
dec2hex(40,4) = 0028
dec2hex(4178) = 1052
But both of these lookups fail:
DCMINFO.RescaleIntercept
Reference to non-existent field 'RescaleIntercept'.
DCMINFO.(dicomlookup('0028','1052'))
Reference to non-existent field 'RescaleIntercept'.
How might I read the tag in reliably?
Thank you,
Bogdan
Accepted Answer
More Answers (1)
yildiz
on 1 Apr 2022
0 votes
I have the same problem and ı did not solve problem with this answer.I'm trying to get the informationnd the RescaleSlope field from dcm extension file with dicominfo in matlab. In this way, I can calculate the hounsfield unit value, but I get the unrecognized field warning in the program. The info struct does not have the RescaleSlope field . The code is below
yourImage = dicomread('00000002.dcm');
info = dicominfo('00000002.dcm');
rSlope = info.RescaleSlope;
for j = 1 : size(yourImage, 1) % This loop multiply each voxel value by the rescale slope
for i = 1 : size(yourImage, 2)
hounsfieldImage(i,j) = yourImage(i,j)*rSlope;
end
end
figure
imshow(hounsfieldImage, 'DisplayRange', []);
Please help me.
Categories
Find more on DICOM Format in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!