pydicom.hooks.raw_element_vr

pydicom.hooks.raw_element_vr(raw: RawDataElement, data: dict[str, Any], *, encoding: str | MutableSequence[str] | None = None, ds: Dataset | None = None, **kwargs: Any) None[source]

Determine the VR to use for raw.

Added in version 3.0.

Default callback function for the "raw_element_vr" hook.

Parameters:
  • raw (RawDataElement) – The raw data element to determine the VR for.

  • data (dict[str, Any]) – A dict to store the results of the VR lookup, which should be added as {"VR": str}.

  • ds (pydicom.dataset.Dataset | None) – The dataset the element belongs to.

  • **kwargs (dict[str, Any]) – Additional keyword arguments.