read_dicom.m

来自「这是一个医学图像处理和传输的标准。在matlab中提供了读写DICOM文件数据的」· M 代码 · 共 14 行

M
14
字号
function X = read_dicom(filename)
% READ_DICOM read in a dicom image and show,support all DICOM image
% format.from grayscale to truecolor,supporting alpha channel
% read_dicom(filename) read in dicom image and show,but the returned image
% data is discarded.
% X = read_dicom(filename) read in dicom image and show out,and the image
% data is reserved in X,X can be uint8,int8,uint16,int16,double
% Note: filename is required whenever.
% this is an *AS* code,No warranty is garanteed!pleaz report any bug to
% ybc2084@163.com or submit on my blog:www.dormforce.net/blog/rockins.

info = dicominfo(filename);
X = dicomread(info);
imshow(X, [0, 2^info.BitDepth - 1]);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?