Borrar filtros
Borrar filtros

Convert pixel value to HU

19 visualizaciones (últimos 30 días)
Ahmad Abbas
Ahmad Abbas el 7 de Ag. de 2020
Comentada: Walter Roberson el 14 de Ag. de 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 comentario
Ahmad Abbas
Ahmad Abbas el 7 de Ag. de 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);

Iniciar sesión para comentar.

Respuesta aceptada

Gouri Chennuru
Gouri Chennuru el 14 de Ag. de 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.

Más respuestas (0)

Categorías

Más información sobre DICOM Format en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by