Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to display dicom image in matlab?

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.

like image 251
user-x Avatar asked Mar 21 '12 14:03

user-x


Video Answer


2 Answers

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, []);
like image 74
Matt Avatar answered Oct 15 '22 18:10

Matt


I think you need to read the image colormap together with the data, then pass it to IMSHOW:

[a, amap] = dicomread ('m.dcm');
imshow(a,amap)
like image 28
yuk Avatar answered Oct 15 '22 18:10

yuk