Convert pixel value to HU

33 次查看(过去 30 天)
How can I change a voxel value of a Micro CT image series to HU units ?
i need to change the voxel value and the header in dicom to use the new dicom in the treatment planning system
the linear equation i will be used to change the voxel is
y = 0.7966x-568.5
  1 个评论
Ahmad Abbas
Ahmad Abbas 2020-8-7
% this is the code i used to create histogram, which help me to create the equation (tmp11) which then i convert the pixel value to HU ( i am not sure if it is correct or not )
% i am trying to save the result with the metadata and changes, please can someone help
clear
myFolder = 'C:\Users\Admin\Desktop\MATLAB\Crop cochlea';
filePattern = fullfile(myFolder, '*dcm');
theFiles = dir(filePattern);
crop=zeros(209,218,394);
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
fprintf(1, 'Now reading %s\n',fullFileName);
x = dicomread(fullFileName);
crop(:,:,k)=x;
end
%histogram(crop)
tmp11 = min(max (0.7966*crop -568.5, -1000),4096);
hu = uint16(tmp11);

请先登录,再进行评论。

采纳的回答

Gouri Chennuru
Gouri Chennuru 2020-8-14
Hi Ahmad,
In order to convert the data found in CT data to Housefield Units you have to apply a linear transformation to the data.
The equation, which is used for converting into HouseField Units,
HU = pixel_value*slope +intercept
The tags are alse called as Rescale Slope and Rescale Intercept.
The slope and intercept are found in the DICOM file itself and you can read the DICOM image to MATLAB using dicomread.
Thanks & Regards,
Gouri Chennuru.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 DICOM Format 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by