pynetdicom.pdu_items.AbstractSyntaxSubItem¶
-
class
pynetdicom.pdu_items.
AbstractSyntaxSubItem
¶ An Abstract Syntax Sub-item.
An Abstract Syntax is the specification of data elements with associated semantics. In particular it allows communicating Application Entities to negotiate an agreed set of DICOM Data Elements and/or Information Object Class definitions [1].
-
abstract_syntax_name
¶ The Abstract Syntax Name field value.
Type: pydicom.uid.UID 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 (0x30).
Type: int
Notes
An Abstract Syntax Sub-item requires the following parameters:
- Item type (1, fixed value, 0x30)
- Item length (1)
- Abstract syntax name (1)
Abstract Syntax Names
Abstract Syntax Names are OSI Object Identifiers in a numeric form as defined by ISO 8824 [2]. They may be either DICOM registered or privately defined. They’re encoded as an ISO 646:1990-Basic G0 Set Numeric String of bytes (characters 0-9), separated by the character
.
(0x2e) [3] and shall not exceed 64 total characters. No separator or padding shall be present before the first digit of the first component or after the last digit of the last component.Encoding
When encoded, an Abstract Syntax Item has the following structure, taken from Table 9-14 [4] (offsets shown with Python indexing). Items are always encoded using Big Endian [5]. Encoding of the Abstract Syntax Name parameter follows the rules in Part 8, Annex F.
Offset Length Description 0 1 Item type 1 1 Reserved 2 2 Item length 4 Variable Abstract syntax name References
[1] DICOM Standard, Part 8, Annex B [2] ISO/IEC 8824-1:2015 [3] DICOM Standard, Part 8, Annex F [4] DICOM Standard, Part 8, Section 9.3.2.2.1 [5] DICOM Standard, Part 8, Section 9.3.1 -
__init__
()¶ Initialise a new Abstract Syntax Item.
Methods
__init__
()Initialise a new Abstract Syntax 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. Attributes
abstract_syntax
Return the item’s Abstract Syntax Name field value. abstract_syntax_name
Return the item’s Abstract Syntax Name field value. 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. -
abstract_syntax
¶ Return the item’s Abstract Syntax Name field value.
-
abstract_syntax_name
Return the item’s Abstract Syntax Name 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
-
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.
-