how to display dicom image in matlab?

user-x picture user-x · Mar 21, 2012 · Viewed 14.9k times · Source

I want to ask about this function in matlab dicomread

example :

a = dicomread ('m.dcm');
imshow(a)

the image showed in the screen but it is very dark.....I wonder way it is dark and not normal. I checked with different dicom images but the problem remain. I hope you can help me and thanks in advance.

Answer

Matt picture Matt · Mar 22, 2012

If you are dealing with monochrome images, you can set a linear scaling between a minimum and maximum pixel value as follows:

img = dicomread('filename');
imshow(img, [minAllowedPixValue maxAllowedPixValue]);

Alternately, you can display the image at full dynamic range:

imshow(img, []);