Effacer les filtres
Effacer les filtres

Convert pixel value to HU

19 vues (au cours des 30 derniers jours)
Ahmad Abbas
Ahmad Abbas le 7 Août 2020
Commenté : Walter Roberson le 14 Août 2020
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 commentaire
Ahmad Abbas
Ahmad Abbas le 7 Août 2020
% 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);

Connectez-vous pour commenter.

Réponse acceptée

Gouri Chennuru
Gouri Chennuru le 14 Août 2020
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.

Plus de réponses (0)

Catégories

En savoir plus sur DICOM Format dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by