pynetdicom.pdu_items.UserInformationItem¶
-
class
pynetdicom.pdu_items.
UserInformationItem
¶ A User Information Item.
Used by the association requestor and acceptor to include user information in the association negotiation.
-
async_ops_window
¶ The Asynchronous Operations Window Sub-item or None if not present.
Type: pdu_items.AsynchronousOperationsWindowSubItem or None
-
common_ext_neg
¶ The SOP Class Common Extended Negotiation Sub-item(s).
Type: list of pdu_items.SOPClassCommonExtendedNegotiationSubItem
-
ext_neg
¶ The SOP Class Extended Negotiation Sub-item(s).
Type: list of pdu_items.SOPClassExtendedNegotiationSubItem
-
implementation_class_uid
¶ The implementation class UID from the Implementation Class UID Sub-item, or None if not present.
Type: pydicom.uid.UID or None
-
implementation_version_name
¶ The implementation version name for the Implementation Version Name Sub-item, or None if not present.
Type: bytes or None
-
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 (0x50).
Type: int
-
maximum_length
¶ The maximum length received value for the Maximum Length Sub-item, or None if not present.
Type: int or None
-
role_selection
¶ The SCP/SCU Role Selection Sub-item(s).
Type: list of pdu_items.SCP_SCU_RoleSelectionSubItem
-
user_identity
¶ The User Identity Sub-item (RQ or AC), or None if not present.
Type: pdu_items.UserIdentitySubItemRQ or pdu_items.UserIdentitySubItemAC or None
Notes
A User Information Item requires the following parameters:
- Item type (1, fixed, 0x50)
- Item length (1)
- User data sub-items (2 or more)
- Maximum Length Received Sub-item (1)
- Implementation Class UID Sub-item (1)
- Optional User Data Sub-items (0 or more)
Encoding
When encoded, a User Information Item has the following structure, taken from Table 9-16 [1] (offsets shown with Python indexing). Items are always encoded using Big Endian [2].
Offset Length Description 0 1 Item type 1 1 Reserved 2 2 Item length 4 Variable User data References
[1] DICOM Standard, Part 8, Section 9.3.2.3 [2] DICOM Standard, Part 8, Section 9.3.1 -
__init__
()¶ Initialise a new User Information Item.
Methods
__init__
()Initialise a new User Information 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 up the current Item using User Information primitives. to_primitive
()Return a list of User Information primitives from the current Item. Attributes
async_ops_window
Return the Asynchronous Operations Window Sub-item, if available. common_ext_neg
Return the SOP Class Common Extended Negotiation Sub-items. ext_neg
Return the SOP Class Extended Negotiation Sub-items. implementation_class_uid
Return the item’s Implementation Class UID field value, if available. implementation_version_name
Return the item’s Implementation Version Name field value, if available. 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. maximum_length
Return the item’s Maximum Length Received field value, if available. role_selection
Return the SCP/SCU Role Selection Sub-items. user_identity
Return the User Identity Sub-item, if available. -
async_ops_window
Return the Asynchronous Operations Window Sub-item, if available.
-
common_ext_neg
Return the SOP Class Common Extended Negotiation Sub-items.
-
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
-
ext_neg
Return the SOP Class Extended Negotiation Sub-items.
-
from_primitive
(primitive)¶ Set up the current Item using User Information primitives.
Parameters: primitive (list of User Information primitives) – Must contain:
- MaximumLengthNotification
- ImplementationClassUIDNotification
May optionally contain one or more:
- ImplementationVersionnameNotification
- AsynchronousOperationsWindowNegotiation
- SCP_SCU_RoleSelectionNegotiation
- SOPClassExtendedNegotiation
- SOPClassCommonExtendedNegotiation
- UserIdentityNegotiation
-
implementation_class_uid
Return the item’s Implementation Class UID field value, if available.
-
implementation_version_name
Return the item’s Implementation Version Name field value, if available.
-
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.
-
maximum_length
Return the item’s Maximum Length Received field value, if available.
-
role_selection
Return the SCP/SCU Role Selection Sub-items.
Returns: The SCP/SCU Role Selection items as {item.uid : item}. Return type: dict
-
to_primitive
()¶ Return a list of User Information primitives from the current Item.
Returns: Must contain: - MaximumLengthNotification
- ImplementationClassUIDNotification
May optionally contain one or more:
- ImplementationVersionnameNotification
- AsynchronousOperationsWindowNegotiation
- SCP_SCU_RoleSelectionNegotiation
- SOPClassExtendedNegotiation
- SOPClassCommonExtendedNegotiation
- UserIdentityNegotiation
Return type: list of User Information primitives
-
user_identity
Return the User Identity Sub-item, if available.
-