how to display dicom image in matlab?

青春壹個敷衍的年華 提交于 2020-01-12 07:12:50

问题


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.


回答1:


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, []);



回答2:


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)



回答3:


dicomread returns a multi-band image.

Try

a = dicomread ('m.dcm');
figure();imshow(a(:,:,:,1));



回答4:


Try

im = dicomread('image.dcm');

im = im2double(im); % this line to convert from uint16 to double

im = mat2gray(im); % this line to put the data in range [0,1]

figure;imshow(im);



来源:https://stackoverflow.com/questions/9806368/how-to-display-dicom-image-in-matlab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!