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에서 DICOM Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!