pydicom.uid.register_transfer_syntax#
- pydicom.uid.register_transfer_syntax(uid: str | UID, implicit_vr: bool | None = None, little_endian: bool | None = None, name: str = '', keyword: str = '') UID[source]#
Register a private or unknown public transfer syntax with the
uidmodule so it can be used when reading datasets withdcmread().Changed in version 3.1: Added the name and keyword arguments and support for adding public transfer syntaxes.
Public transfer syntaxes will be added to the UID data dictionary, the
pydicom.uidmodule using the supplied keyword andpydicom.uid.AllTransferSyntaxes.- Parameters:
uid (str | pydicom.uid.UID) – A UID which may or may not have had the corresponding dataset encoding set using
set_private_encoding().implicit_vr (bool, optional) – If
Truethen the transfer syntax uses implicit VR encoding, otherwise ifFalsethen it uses explicit VR encoding. Required when uid has not had the encoding set usingset_private_encoding()and ignored when registering a public transfer syntax.little_endian (bool, optional) – If
Truethen the transfer syntax uses little endian encoding, otherwise ifFalsethen it uses big endian encoding. Required when uid has not had the encoding set usingset_private_encoding()and ignored when registering a public transfer syntax.name (str, optional) – The name of the transfer syntax, required if adding a public transfer syntax and ignored otherwise.
keyword (str, optional) – The keyword for the transfer syntax. Must be a valid Python identifier and must not be a Python keyword. Required if adding a public transfer syntax and ignored otherwise.
- Returns:
The registered UID.
- Return type: