dicomlookup
Find attribute in DICOM data dictionary
Description
[
looks into the current DICOM data dictionary for the attribute specified by
groupOut
,elementOut
] = dicomlookup(name
)name
and returns the group and element tags associated with
the attribute.
Examples
Find DICOM Attributes in Data Dictionary
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
group
— DICOM group tag
positive integer decimal | character vector | string scalar
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, thenelement
must also be a positive integer decimal number.If
group
is a character vector or string scalar that contains a hexadecimal value, thenelement
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
element
— DICOM element tag
positive integer decimal | character vector | string scalar
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, thenelement
must also be a positive integer decimal number.If
group
is a character vector or string scalar that contains a hexadecimal value, thenelement
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
name
— DICOM attribute name
character vector | string scalar
DICOM attribute name, specified as a character vector or string scalar.
Example: 'PhotometricInterpretation'
or
"PhotometricInterpretation"
Data Types: char
| string
Output Arguments
groupOut
— Returned DICOM group tag
positive integer decimal
Returned DICOM group tag, returned as a positive integer decimal number.
Data Types: double
elementOut
— Returned DICOM element tag
positive integer decimal
Returned DICOM element tag, returned as a positive integer decimal number.
Data Types: double
nameOut
— Returned DICOM attribute name
character vector
Returned DICOM attribute name, returned as a character vector.
Data Types: char
Version History
Introduced in R2006b
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other bat365 country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)