pynetdicom.pdu_items.SOPClassCommonExtendedNegotiationSubItem¶
-
class
pynetdicom.pdu_items.
SOPClassCommonExtendedNegotiationSubItem
¶ A SOP Class Common Extended Negotiation Sub-item.
A SOP Class Common Extended Negotiation Sub-item allows Application Entities to exchange application information in a generic non-Service class specific form.
-
item_length
¶ The number of bytes from the first byte following the Item Length field to the last byte of the Item.
Type: int
-
item_type
¶ The Item Type field value (0x57).
Type: int
-
sub_item_version
¶ The Sub Item Version field value.
Type: int
-
sop_class_uid_length
¶ The SOP Class UID Length field value.
Type: int
-
sop_class_uid
¶ The SOP Class UID field value.
Type: pydicom.uid.UID
-
service_class_uid_length
¶ The Service Class UID Length field value.
Type: int
-
service_class_uid
¶ The Service Class UID field value.
Type: pydicom.uid.UID
The Related General SOP Class Identification Length field value.
Type: int
The UIDs in the Related General SOP Class UID Identification field value.
Type: list of pydicom.uid.UID
Notes
A SOP Class Common Extended Negotiation Sub-item requires the following parameters:
- Item type (1, fixed, 0x57)
- Sub-item version (1, fixed, 0x00)
- Item length (1)
- SOP class UID length (1)
- SOP class UID (1)
- Service class UID length (1)
- Service class UID (1)
- Related general SOP class identification length (1)
- Related general SOP class identification sub fields (0 or more)
- Related general SOP class UID length (1)
- Related general SOP class UID (1)
Encoding
When encoded, a SOP Class Common Extended Negotiation Sub-item has the following structure, taken from Table D.3-12 [1] (offsets shown with Python indexing). Items are always encoded using Big Endian [2]. The SOP Class UID, Service Class UID and the UIDs in the Related General SOP Class Identification parameters are encoded as UIDs as per the rules in Part 5, Section 9.1 (ie NO trailing padding null byte).
Offset Length Description 0 1 Item type 1 1 Sub item version 2 2 Item length 4 2 SOP class UID length 6 Variable SOP class UID 6 + SOP UID length 2 Service class UID length 8 + SOP UID length Variable Service class UID 8 + SOP UID length + Service UID length 2 Related general SOP class ID length 10 + SOP UID length + Service UID length Variable Related general SOP class ID The Related General SOP Class Identification field is made up of a number of sub-fields with the following structure, taken from Table D.3-13 [1].
Offset Length Description 0 2 Related general SOP class UID length 2 Variable Related general SOP class UID References
[1] (1, 2) DICOM Standard, Part 7, Annex D.3.3.6 [2] DICOM Standard, Part 8, Section 9.3.1 -
__init__
()¶ Initialise a new Implementation Version Name Item.
Methods
__init__
()Initialise a new Implementation Version Name 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 SOP Class Common Extended Negotiation primitive. to_primitive
()Return an SOP Class Common Extended Negotiation primitive from the current Item. Attributes
item_length
Return the item’s Item Length field value as an int. item_type
Return the item’s Item Type field value as an int. related_general_sop_class_identification
Return the item’s Related General SOP Class Identification field value. related_general_sop_class_identification_length
Return the item’s Related General SOP Class Identification Length field value. service_class_uid
Return the item’s Service Class UID field value. service_class_uid_length
Return the item’s Service Class UID Length field value. sop_class_uid
Return the item’s SOP Class UID field value. sop_class_uid_length
Return the item’s SOP Class UID Length 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
-
from_primitive
(primitive)¶ Set the item’s values using a SOP Class Common Extended Negotiation primitive.
Parameters: primitive (pdu_primitives.SOPClassCommonExtendedNegotiation) – The primitive to use to set the Item’s field values.
-
item_length
Return the item’s Item Length field value as an int.
-
item_type
Return the item’s Item Type field value as an int.
-
related_general_sop_class_identification
Return the item’s Related General SOP Class Identification field value.
-
related_general_sop_class_identification_length
Return the item’s Related General SOP Class Identification Length field value.
-
service_class_uid
Return the item’s Service Class UID field value.
-
service_class_uid_length
Return the item’s Service Class UID Length field value.
-
sop_class_uid
Return the item’s SOP Class UID field value.
-
sop_class_uid_length
Return the item’s SOP Class UID Length field value.
-
to_primitive
()¶ Return an SOP Class Common Extended Negotiation primitive from the current Item.
Returns: The primitive representation of the current Item. Return type: pdu_primitives.SOPClassCommonExtendedNegotiation
-