This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

dicomlookup

Find attribute in DICOM data dictionary

Syntax

nameOut = dicomlookup(group,element)
[groupOut,elementOut] = dicomlookup(name)

Description

example

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

[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 a DICOM attribute's tag (GROUP and ELEMENT) using its name.

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

Examine the metadata of a DICOM file. 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.

Example: 40

Example: '7FE0' or "7FE0"

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

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 represent the same type of value:

  • If group is a positive integer, then element is also a positive integer.

    If group is a character vector or string scalar that contains a hexadecimal value, then element is 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 group tag, returned as a positive integer decimal number.

Data Types: double

Returned DICOM attribute name, returned as a character vector.

Data Types: char

Introduced in R2006b