How can I change a pixel value of a CT image series to display HU.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How can I change a pixel value of a CT image series stored as a variable in Matlab format to HU units,.... as in how can I subtract 1024 from all the pixels so they display in matlab as HUs?
0 Kommentare
Antworten (1)
Nick
am 20 Nov. 2018
Your question is not really clear to what your intent is. If you just want to subtract 1024 of each pixel it would be:
HUImage = CTImage-1024;
Ofcourse you would need to make sure you have a value type that can be less that 0 so you could make sure it is capable of being signed for example int16's or doubles:
HUImage = int16(CTImage)-1024; % this is assuming your CT image is something like: uint16 or so which seems unlikely
% or
HUImage = double(CTImage)-1024;
% then display it using something like:
imshow(HUImage, []) % rescale to min and max value
% or
imshow(HUImage,[-1000 2000]) % set display range yourself, outliers will be black for lower than -1000 or white for higher than 2000
But houndsfield units are not just subtracting a certain value from some image, it is a relationship of the average linear attentuation coefficient inside a voxel compared to this of water and air:
If your CTImage is a doubles array of linear attenuation coefficients then you need to know the linear attentuation coefficients of water and air and could turn the image into HU using:
uWater % linear att water
uAir % linear att air -> uAir is so much smaller than uWater that u can prolly ignore this
linearAttCoef = double(CTImage); % already assuming its double but just putting it here
% calculate HU from linear attenuation coefficients
HUImage = ((linearAttCoef - uWater)./(uWater - uAir)) .* 1000; % HU unit conversion formula
Hopefully this clears out enough for you, without more information on your problem we cannot answer your question fully.
1 Kommentar
Siehe auch
Kategorien
Mehr zu DICOM Format finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!