Image Processing Toolbox User's Guide Previous page   Next Page

Reading Metadata from a DICOM File

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

The metadata in a DICOM files provides information, such as the size, dimensions, and bit depth of the image. In addition, the DICOM specification defines numerous other metadata fields that describe many other characteristics of the data, such as the modality used to create the data, the equipment settings used to capture the image, and information about the study.

In this example, dicominfo reads the metadata from a file, returning the information in a structure where every field in the structure is a specific piece of DICOM metadata.

You can use the metadata structure returned by dicominfo to specify the DICOM file you want to read using dicomread. For example, you can use this code to read metadata from the sample DICOM file and then pass the metadata to dicomread to read the image from the file.


Previous page  Reading Image Data from a DICOM File Writing Image Data or Metadata to a DICOM File Next page

© 1994-2005 The MathWorks, Inc.