pynetdicom.pdu_items.UserInformationItem¶
-
class
pynetdicom.pdu_items.
UserInformationItem
[source]¶ 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.
-
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
-
implementation_version_name
¶ The implementation version name for the Implementation Version Name Sub-item, or
None
if not present.
-
item_length
¶ The number of bytes from the first byte following the Item Length field to the last byte of the Item.
- Type
-
maximum_length
¶ The maximum length received value for the Maximum Length Sub-item, or
None
if not present.
-
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.
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 Part 8, Table 9-16 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
Variable
User data
References
DICOM Standard, Part 8, Section 9.3.2.3
DICOM Standard, Part 8, Section 9.3.1
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.
Return a list of User Information primitives from the current Item.
Attributes
Return the Asynchronous Operations Window Sub-item, if available.
Return the SOP Class Common Extended Negotiation Sub-items.
Return the SOP Class Extended Negotiation Sub-items.
Return the item’s Implementation Class UID field value, if available.
Return the item’s Implementation Version Name field value, if available.
Return the item’s Item Length field value as
int
.Return the item’s Item Type field value as
int
.Return the item’s Maximum Length Received field value, if available.
Return the SCP/SCU Role Selection Sub-items.
Return the User Identity Sub-item, if available.
-
property
async_ops_window
¶ Return the Asynchronous Operations Window Sub-item, if available.
-
property
common_ext_neg
¶ Return the SOP Class Common Extended Negotiation Sub-items.
-
property
ext_neg
¶ Return the SOP Class Extended Negotiation Sub-items.
-
from_primitive
(primitive)[source]¶ 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
-
property
implementation_class_uid
¶ Return the item’s Implementation Class UID field value, if available.
-
property
implementation_version_name
¶ Return the item’s Implementation Version Name field value, if available.
-
property
maximum_length
¶ Return the item’s Maximum Length Received field value, if available.
-
property
role_selection
¶ Return the SCP/SCU Role Selection Sub-items.
- Returns
The SCP/SCU Role Selection items as {item.uid : item}.
- Return type
-
to_primitive
()[source]¶ 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
-
property
user_identity
¶ Return the User Identity Sub-item, if available.
-