pynetdicom.pdu_items.MaximumLengthSubItem¶
- class pynetdicom.pdu_items.MaximumLengthSubItem[source]¶
A Maximum Length Sub-item.
The Maximum Length Sub-item allows the receivers to limit the size of the Presentation Data Values List parameters of each P-DATA PDU.
Notes
A Maximum Length Sub-item requires the following parameters:
Item type (1, fixed,
0x51
)Item length (1)
Maximum length received (1)
Encoding
When encoded, a Maximum Length Sub-item has the following structure, taken from Table D.1-1 of the DICOM Standard (offsets shown with Python indexing). Items are always encoded using Big Endian.
Offset
Length
Description
0
1
Item type
1
1
Reserved
2
2
Item length
4
4
Maximum length received
References
DICOM Standard, Part 8, Annex D.1
DICOM Standard, Part 8, Section 9.3.1
Methods
__init__
()Initialise a new Maximum Length 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.
from_primitive
(primitive)Set the item's values using a Maximum Length primitive.
Return a Maximum Length primitive from the current Item.
Attributes
Return the item's Item Length field value as
int
.item_type
Return the item's Item Type field value as
int
.- from_primitive(primitive: MaximumLengthNotification) None [source]¶
Set the item’s values using a Maximum Length primitive.
- Parameters:
primitive (pdu_primitives.MaximumLengthNotification) – The primitive to use to set the Item’s field values.
- to_primitive() MaximumLengthNotification [source]¶
Return a Maximum Length primitive from the current Item.
- Returns:
The primitive representation of the current Item.
- Return type: