pynetdicom.pdu_items.TransferSyntaxSubItem

class pynetdicom.pdu_items.TransferSyntaxSubItem[source]

A Transfer Syntax Sub-item.

A Transfer Syntax is a set of encoding rules able to unambiguously represent the data elements defined by one or more Abstract Syntaxes. In particular, it allows communicating Application Entities to agree on the encoding techniques they are able to support (e.g. byte ordering, compression, etc).

Notes

A Transfer Syntax Sub-item requires the following parameters:

  • Item type (1, fixed value, 0x40)

  • Item length (1)

  • Transfer syntax name (1 or more)

Transfer Syntax Names

Transfer Syntax Names are OSI Object Identifiers in a numeric form as defined by ISO 8824. They may be either DICOM registered or privately defined. They’re encoded as an ISO 646:1990-Basic G0 Set Numeric String of bytes (characters 0-9), separated by the character . (0x2e) and shall not exceed 64 total characters. No separator or padding shall be present before the first digit of the first component or after the last digit of the last component.

Encoding

When encoded, a Transfer Syntax Item has the following structure, taken from Part 8, Table 9-15 of the DICOM Standard (offsets shown with Python indexing). Items are always encoded using Big Endian. Encoding of the Transfer Syntax Name parameter follows the rules in Part 8, Annex F.

Offset

Length

Description

0

1

Item type

1

1

Reserved

2

2

Item length

4

Variable

Transfer syntax name

References

__init__() None[source]

Initialise a new Abstract Syntax Item.

Methods

__init__()

Initialise a new Abstract Syntax Item.

decode(bytestream)

Decode bytestream and use the result to set the field values of the PDU item.

encode()

Return the encoded PDU as bytes.

Attributes

item_length

Return the item's Item Length field value as int.

item_type

Return the item's Item Type field value as int.

transfer_syntax

Return the item's Transfer Syntax Name field value.

transfer_syntax_name

Return the item's Transfer Syntax Name field value.

property item_length: int

Return the item’s Item Length field value as int.

property transfer_syntax: UID | None

Return the item’s Transfer Syntax Name field value.

property transfer_syntax_name: UID | None

Return the item’s Transfer Syntax Name field value.