Lookup Tag
imgtools.dicom.lookup_tag
cached
lookup_tag(
keyword: str, hex_format: bool = False
) -> typing.Optional[str]
Lookup the tag for a given DICOM keyword.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
The DICOM keyword to look up. |
required |
|
bool
|
If True, return the tag in hexadecimal format (default is False). |
False
|
Returns:
Type | Description |
---|---|
str or None
|
The DICOM tag as a string, or None if the keyword is invalid. |
Examples:
Lookup a DICOM tag in decimal format:
Lookup a DICOM tag in hexadecimal format: