How do I convert a 16 bit depth "DICOM" image file to a 12 bit depth "DICOM" image file?

info: Filename '00000.dcm' ColorType 'grayscale' BitDepth 16
convert to
info: Filename '00001.dcm' ColorType 'grayscale' BitDepth 12

3 Comments

Hi, I have the same issue of converting a 16 bits DICOM into a 12 bits DICOM. Apparently the DICOMWRITE function can not write 12 bits DICOMS but only 8 or 16 bits. Is there a solution to this issue within the MATLAB framework ?
THX Regards, Marco
If your voxel values exceed the range of an 8 bit value (0-255), you must write a 16 bit value. By convention, the value will be unsigned, so the image value range must be rescaled before writing to disk.
For instance, I have a DICOM CT file whose voxels should have Hounsfield value range (-1000 to +3000). That's a range of 4000 values (or 12 bits). So the DICOM file header variables are: BitsAllocated=16, BitDepth=12, and RescaleIntercept=-1024.
Then each voxel value will be scaled upward by 1024 so the minimum value in the image is 0, allowing the data type to be unsigned 16 bit, although only 12 bits are actually used. When the image file is read, -1024 must be added to each voxel to produce the correct Hounsfield intensity values.
Hi, I use dicomread function to read DICOM images and get the image data. My question is about the Rescale Intercept. It seems that this value is not taken into account within dicomread function. Do I need to do the conversion myself in order to get consistent CT Hounsfield values ? Thank you, Maia

Sign in to comment.

Answers (0)

Categories

Find more on Convert Image Type in Help Center and File Exchange

Asked:

on 25 Feb 2014

Commented:

on 20 Aug 2018

Community Treasure Hunt

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

Start Hunting!