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.
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
-
__init__
() → None¶ 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.
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
.item_type
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: _UserInformationPrimitiveType) → None¶ 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
item_length
¶ Return the item’s Item Length field value as
int
.
-
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
dict
-
to_primitive
() → _UserInformationPrimitiveType¶ 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.