Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
The value to use for the *Message ID Being Responded To* parameter.
"""
if isinstance(value, int):
if 0 <= value < 2**16:
self._message_id_being_responded_to = value
else:
raise ValueError("Message ID Being Responded To must be "
"between 0 and 65535, inclusive")
elif value is None:
self._message_id_being_responded_to = value
else:
raise TypeError("Message ID Being Responded To must be an int")
# DIMSE-N Service Primitives
class N_EVENT_REPORT(DIMSEPrimitive):
"""Represents a N-EVENT-REPORT primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | \- |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Affected SOP Class UID | M | U(=) |
+------------------------------------------+---------+----------+
| Affected SOP Instance UID | M | U(=) |
+------------------------------------------+---------+----------+
| Event Type ID | M | C(=) |
+------------------------------------------+---------+----------+
| Event Information | U | \- |
"""Return the *Attribute List* as :class:`io.BytesIO`."""
return self._dataset_variant
@AttributeList.setter
def AttributeList(self, value):
"""Set the *Attribute List*.
Parameters
----------
io.BytesIO
The value to use for the *Attribute List* parameter.
"""
self._dataset_variant = (value, 'AttributeList')
class N_DELETE(DIMSEPrimitive):
"""Represents a N-DELETE primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | \- |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Requested SOP Class UID | M | \- |
+------------------------------------------+---------+----------+
| Requested SOP Instance UID | M | \- |
+------------------------------------------+---------+----------+
| Affected SOP Class UID | \- | U |
+------------------------------------------+---------+----------+
| Affected SOP Instance UID | \- | U |
"""Return the *Priority* as :class:`int`."""
return self._Priority
@Priority.setter
def Priority(self, value):
"""Set the *Priority*.
Parameters
----------
int
The value to use for the *Priority* parameter.
"""
self._Priority = value
class C_MOVE(DIMSEPrimitive):
"""Represents a C-MOVE primitive.
+-------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+===============================+=========+==========+
| Message ID | M | U |
+-------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+-------------------------------+---------+----------+
| Affected SOP Class UID | M | U(=) |
+-------------------------------+---------+----------+
| Priority | M | \- |
+-------------------------------+---------+----------+
| Move Destination | M | \- |
+-------------------------------+---------+----------+
| Identifier | M | U |
"""
return self._RequestedSOPInstanceUID
@RequestedSOPInstanceUID.setter
def RequestedSOPInstanceUID(self, value):
"""Set the *Requested SOP Instance UID*.
Parameters
----------
pydicom.uid.UID, bytes or str
The value to use for the *Requested SOP Instance UID* parameter.
"""
self._RequestedSOPInstanceUID = value
class N_SET(DIMSEPrimitive):
"""Represents a N-SET primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | \- |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Requested SOP Class UID | M | \- |
+------------------------------------------+---------+----------+
| Requested SOP Instance UID | M | \- |
+------------------------------------------+---------+----------+
| Modification List | M | \- |
+------------------------------------------+---------+----------+
| Attribute List | \- | U |
"""
return self._RequestedSOPInstanceUID
@RequestedSOPInstanceUID.setter
def RequestedSOPInstanceUID(self, value):
"""Set the *Requested SOP Instance UID*.
Parameters
----------
pydicom.uid.UID, bytes or str
The value to use for the *Requested SOP Instance UID* parameter.
"""
self._RequestedSOPInstanceUID = value
class N_CREATE(DIMSEPrimitive):
"""Represents a N-CREATE primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | \- |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Affected SOP Class UID | M | U(=) |
+------------------------------------------+---------+----------+
| Affected SOP Instance UID | U | C |
+------------------------------------------+---------+----------+
| Attribute List | U | U |
+------------------------------------------+---------+----------+
| Status | \- | M |
int
The value to use for the *Status* parameter.
"""
if isinstance(value, int) or value is None:
self._status = value
else:
raise TypeError("DIMSE primitive's 'Status' must be an int")
@property
def msg_type(self):
"""Return the DIMSE message type as :class:`str`."""
return self.__class__.__name__.replace('_', '-')
# DIMSE-C Service Primitives
class C_STORE(DIMSEPrimitive):
"""Represents a C-STORE primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | U |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Affected SOP Class UID | M | U(=) |
+------------------------------------------+---------+----------+
| Affected SOP Instance UID | M | U(=) |
+------------------------------------------+---------+----------+
| Priority | M | \- |
+------------------------------------------+---------+----------+
| Move Originator Application Entity Title | U | \- |
"""Return the *Priority* as :class:`int`."""
return self._Priority
@Priority.setter
def Priority(self, value):
"""Set the *Priority*.
Parameters
----------
int
The value to use for the *Priority* parameter.
"""
self._Priority = value
class C_ECHO(DIMSEPrimitive):
"""Represents a C-ECHO primitive.
+-------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+===============================+=========+==========+
| Message ID | M | U |
+-------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+-------------------------------+---------+----------+
| Affected SOP Class UID | M | U(=) |
+-------------------------------+---------+----------+
| Status | \- | M |
+-------------------------------+---------+----------+
| Error Comment | \- | C |
+-------------------------------+---------+----------+
@EventTypeID.setter
def EventTypeID(self, value):
"""Set the *Event Type ID*.
Parameters
----------
int
The value to use for the *Event Type ID* parameter.
"""
if isinstance(value, int) or value is None:
self._event_type_id = value
else:
raise TypeError("'N_EVENT_REPORT.EventTypeID' must be an int.")
class N_GET(DIMSEPrimitive):
"""Represents an N-GET primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | \- |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Requested SOP Class UID | M | \- |
+------------------------------------------+---------+----------+
| Requested SOP Instance UID | M | \- |
+------------------------------------------+---------+----------+
| Attribute Identifier List | U | \- |
+------------------------------------------+---------+----------+
| Affected SOP Class UID | \- | U |
"""
return self._RequestedSOPInstanceUID
@RequestedSOPInstanceUID.setter
def RequestedSOPInstanceUID(self, value):
"""Set the *Requested SOP Instance UID*.
Parameters
----------
pydicom.uid.UID, bytes or str
The value to use for the *Requested SOP Instance UID* parameter.
"""
self._RequestedSOPInstanceUID = value
class N_ACTION(DIMSEPrimitive):
"""Represents a N-ACTION primitive.
+------------------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+==========================================+=========+==========+
| Message ID | M | \- |
+------------------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+------------------------------------------+---------+----------+
| Requested SOP Class UID | M | \- |
+------------------------------------------+---------+----------+
| Requested SOP Instance UID | M | \- |
+------------------------------------------+---------+----------+
| Action Type ID | M | C(=) |
+------------------------------------------+---------+----------+
| Action Information | U | \- |
"""Return the *Priority* as :class:`int`."""
return self._Priority
@Priority.setter
def Priority(self, value):
"""Set the *Priority*.
Parameters
----------
int
The value to use for the *Priority* parameter.
"""
self._Priority = value
class C_GET(DIMSEPrimitive):
"""Represents a C-GET primitive.
+-------------------------------+---------+----------+
| Parameter | Req/ind | Rsp/conf |
+===============================+=========+==========+
| Message ID | M | U |
+-------------------------------+---------+----------+
| Message ID Being Responded To | \- | M |
+-------------------------------+---------+----------+
| Affected SOP Class UID | M | U(=) |
+-------------------------------+---------+----------+
| Priority | M | \- |
+-------------------------------+---------+----------+
| Identifier | M | U |
+-------------------------------+---------+----------+
| Status | \- | M |