How can I change a pixel value of a CT image series to display HU.
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Nick
2018-11-20
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!