pynetdicom.pdu.PresentationDataValueItem¶
-
class
pynetdicom.pdu.
PresentationDataValueItem
¶ A Presentation Data Value Item.
Presentation Data Value (PDV) Items are used to contain DIMSE Messages that have been fragmented into Command and Data fragments [1], with each fragment placed into its own PDV Item.
-
item_length
¶ The Item Length field value.
Type: int
-
presentation_context_id
¶ The Presentation Context ID field value.
Type: int
-
presentation_data_value
¶ The Presentation Data Value field value.
Type: bytes
Notes
A Presentation Data Value Item requires the following parameters:
- Item length (1)
- Presentation context ID (1)
- Presentation data value (1)
Encoding
When encoded, a Presentation Data Value Item has the following structure, taken from Tables 9.24 [2] (offsets shown with Python indexing). Items are always encoded using Big Endian [3].
Offset Length Description 0 4 Item length 4 1 Presentation context ID 5 Variable Presentation data value References
[1] DICOM Standard, Part 8, Annex E [2] DICOM Standard, Part 8, Section 9.3.5.1 [3] DICOM Standard, Part 8, Section 9.3.1 -
__init__
()¶ Initialise a new Presentation Data Value Item.
Methods
__init__
()Initialise a new Presentation Data Value 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
context_id
Return the item’s Presentation Context ID field value. data
Return the item’s Presentation Data Value field value. item_length
Return the item’s Item Length field value as an int. item_type
Raise NotImplementedError as Presentation Data Value Items have no Item Type field. message_control_header_byte
Return the message control header byte as a formatted string. -
context_id
¶ Return the item’s Presentation Context ID field value.
-
data
¶ Return the item’s Presentation Data Value field value.
-
decode
(bytestream)¶ Decode bytestream and use the result to set the field values of the PDU item.
Parameters: bytestream (bytes) – The PDU data to be decoded.
-
encode
()¶ Return the encoded PDU as bytes.
Returns: The encoded PDU. Return type: bytes
-
item_length
Return the item’s Item Length field value as an int.
-
item_type
¶ Raise NotImplementedError as Presentation Data Value Items have no Item Type field.
-
message_control_header_byte
¶ Return the message control header byte as a formatted string.
-