Main Content


Get information about DICOM unique identifier



details = images.dicom.decodeUID(UID) returns information about the DICOM unique identifier contained in UID. details contains the name of the UID and its type (SOP class, transfer syntax, etc.). If UID corresponds to a transfer syntax, details also contains the endianness, the DICOM value representation necessary for reading the image pixels, and information about compression.

The images.dicom.decodeUID function can interpret IDs defined in the PS 3.6-1999 specification, with some additions from PS 3.6-2009.


collapse all

Read metadata from a DICOM file and extract a UID field.

info = dicominfo('CT-MONO2-16-ankle.dcm');
uid = info.SOPClassUID;

Decode the UID.

uid_info = images.dicom.decodeUID(uid)
uid_info = struct with fields:
    Value: '1.2.840.10008.'
     Name: 'Secondary Capture Image Storage'
     Type: 'SOP Class'

Input Arguments

collapse all

DICOM unique identifier, specified as a string or character vector.

Example: uid_info = images.dicom.decodeUID('1.2.840.10008.')

Data Types: char | string | cell

Output Arguments

collapse all

Information from UID, returned as a struct.

Introduced in R2017b