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.