convert 16 bits medical image (.dcm) into 8 bits
26 views (last 30 days)
Majid Al-Sirafi on 30 Dec 2018
I’m working in the project related to medical image processing. I need medical image (.dcm) of 8 bits. Unfortunately, I couldn’t find this type. I have just image (.dcm) of 16 bits. How can convert 16 bits medical image into 8 bits
Walter Roberson on 31 Dec 2018
im2uint8() to do the conversion.
Note: 16 bit DICOM data is often int16 with a range of about -3000 to +10000 or so, or else uint16 with a range of about 3000 to 16000 or so for the interesting data. These are full ranges recorded by the instruments, but you would typically only be interested in a subset of that range for conversion to uint8. Sometimes you can do useful automatic conversion with mat2gray(), but more often you end up having to play with the data to figure out what range you want. If you have a new enough MATLAB, then volumeViewer() can be useful for figuring out what range you want.
More Answers (1)
Image Analyst on 31 Dec 2018
Why do you want to store the images in 8 bits?
You could just convert to 8 bit with gray2mat():
im8 = uint8(255 * mat2gray(im16)); % Scale min=0, max = 255