MATLAB读取显示DICOM图像

查询资料总结了下

str='文件名';
Image_dicom=dicomread(str); 
figure;imshow(Image_dicom, 'DisplayRange',[]);
title('dicom图像');

figure, imshow(x, ‘DisplayRange’,[]); 解释如下:
displayrange是显示范围,如果赋值为空的话,显示[min(I(),max(I()],是图片灰度的最小值和最大值,不一定是[0,1],中间灰度平均分布。
如果图片的灰度在直方图上看不是平均分布在0-255之间,而是偏向某一端的时候,这个设置很有用。

‘DisplayRange’ — Display range of grayscale image[min(I() max(I()] (default) | two-element vector

Display range of a grayscale image, specified as a two-element vector [LOW HIGH]. imshow displays the value low (and any value less than low) as black, and the value high (and any value greater than high) as white. Values in between are displayed as intermediate shades of gray, using the default number of gray levels. If you specify an empty matrix ([]), imshow uses [min(I() max(I()]; that is, use the minimum value in I as black, and the maximum value as white

你可能感兴趣的:(MATLAB)