imageio.plugins.pydicom.PydicomPlugin.metadata#

PydicomPlugin.metadata(*, index: Any = Ellipsis, exclude_applied: bool = True, raw: bool = False) → Dict[str, Any][source]#

Read (non-data) DICOM tags.

Parameters:
indexEllipsis or int

Metadata is built by layered dict.update:

  1. If index is ... or None, add instance-level tags (FG sequences omitted as top-level keys; TransferSyntaxUID included from file_meta).

  2. If a shared functional group is present, update with its macros.

  3. If index is an int, update with that frame’s per-frame FG (per-frame wins on conflict).

Classic files with no FG data therefore yield {} for an integer index.

exclude_appliedbool

If True (default) and raw is False, drop tags consumed by the default read / iter reconstruction (rescale / windowing). Otherwise, leave those tags in the returned dict.

rawbool

Pair with read(..., raw=...). If False (default), exclude_applied may drop reconstruction tags. Otherwise, those tags are kept even when exclude_applied is True.

Returns:
metadatadict

Keyword → value mapping (pydicom keyword names).