matlab图像示例笔记2

dicom (a image type using in medical)

To read metadata from a DICOM file, use the dicominfo function


To readimage datafrom a DICOM file, use the dicomread function.


If you just want to view the metadata in a DICOM file, for debugging purposes, you can use the dicomdisp function.


use one of the toolbox image display functions imshow or imtool.


the image data in this DICOM file is signed 16-bit data, you must use the autoscaling syntax with either display function to make the image viewable.
imshow(I,'DisplayRange',[])


use the dicomanon function. Remove Confidential Information


To write image data or metadata to a file in DICOM format, use the dicomwrite function.


Create New DICOM Series

info.SeriesInstanceUID

Generate a new DICOM unique identifier (UID) using the dicomuid function.

uid = dicomuid
info.SeriesInstanceUID = uid;
dicomwrite(Imodified,'ankle_newseries.dcm',info);

The example finds the maximum and minimum values of all pixels in the image. The pixels that form the white text characters are set to the maximum pixel value.


MATLAB command prompt: Enter dicomBrowser.


Image Type Conversion