Main Content

dicomlookup

Find attribute in DICOM data dictionary

Description

nameOut = dicomlookup(group,element) looks into the current DICOM data dictionary for the attribute with the specified group tag group and element tag element. dicomlookup returns the name of the attribute.

example

[groupOut,elementOut] = dicomlookup(name) looks into the current DICOM data dictionary for the attribute specified by name and returns the group and element tags associated with the attribute.

Examples

collapse all

Find the names of DICOM attributes using their tags.

name1 = dicomlookup("7FE0","0010")
name1 = 
'PixelData'
name2 = dicomlookup(40,4)
name2 = 
'PhotometricInterpretation'

Look up the group and element of a DICOM attribute by the attribute name.

[group,element] = dicomlookup("TransferSyntaxUID")
group = 
2
element = 
16

Read the metadata of a DICOM file. Access the value of a metadata attribute in the file by specifying its group and element tag. This returns the same value even if the data dictionary changes.

metadata = dicominfo("CT-MONO2-16-ankle.dcm");
metadata.(dicomlookup("0028","0004"))
ans = 
'MONOCHROME2'

Input Arguments

collapse all

DICOM group tag, specified as a positive integer decimal number or a character vector or string scalar that contains a hexadecimal value. element and group must use the same type of value:

  • If group is a positive integer decimal number, then element must also be a positive integer decimal number.

  • If group is a character vector or string scalar that contains a hexadecimal value, then element must be either a character vector or a string scalar that contains a hexadecimal value.

Example: 40

Example: '7FE0' or "7FE0"

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | char | string

DICOM element tag, specified as a positive integer decimal number or a character vector or string scalar that contains a hexadecimal value. element and group must use the same type of value:

  • If group is a positive integer decimal number, then element must also be a positive integer decimal number.

  • If group is a character vector or string scalar that contains a hexadecimal value, then element must be either a character vector or a string scalar that contains a hexadecimal value.

Example: 4

Example: '0010' or "0010"

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | char | string

DICOM attribute name, specified as a character vector or string scalar.

Example: 'PhotometricInterpretation' or "PhotometricInterpretation"

Data Types: char | string

Output Arguments

collapse all

Returned DICOM group tag, returned as a positive integer decimal number.

Data Types: double

Returned DICOM element tag, returned as a positive integer decimal number.

Data Types: double

Returned DICOM attribute name, returned as a character vector.

Data Types: char

Extended Capabilities

Version History

Introduced in R2006b

expand all