pynetdicom._handlers.doc_handle_set¶
- pynetdicom._handlers.doc_handle_set(event: Event, *args: Sequence[Any]) Tuple[int | Dataset, Dataset | None] [source]¶
Documentation for handlers bound to
evt.EVT_N_SET
.User implementation of this event handler is required if one or more services that use N-SET are to be supported. If a handler is not implemented and bound to
evt.EVT_N_SET
then the N-SET request will be responded to using a Status value of0x0110
- Processing Failure.Event
evt.EVT_N_SET
Supported Service Classes
Status
- Success
0x0000
- Success- Failure
0x0105
- No such attribute0x0106
- Invalid attribute value0x0110
- Processing failure0x0112
- SOP Instance not recognised0x0116
- Attribute value out of range0x0117
- Invalid object instance0x0118
- No such SOP Class0x0119
- Class-Instance conflict0x0121
- Missing attribute value0x0124
- Refused: not authorised0x0210
- Duplicate invocation0x0211
- Unrecognised operation0x0212
- Mistyped argument0x0213
- Resource limitation0xC112
- Applicable Machine Verification Instance not found0xC224
- Reference Beam Number not found within the referenced Fraction Group0xC225
- Referenced device or accessory not supported0xC226
- Referenced device or accessory not found with the referenced beam0xC300
- The UPS may no longer be updated0xC301
- The correct Transaction UID was not provided0xC307
- Specified SOP Instance UID does not exist or is not a UPS Instance managed by this SCP0xC310
- The UPS is not in the ‘IN PROGRESS’ state0xC603
- Image size is larger than image box size0xC605
- Insufficient memory in printer to store the image0xC613
- Combined Print Image size is larger than the Image Box size0xC616
- There is an existing Film Box that has not been printed and N-ACTION at the Film Session level is not supported. A new Film Box will not be created when a previous Film Box has not been printed- Warning
0x0001
- Requested optional attributes are not supported0xB305
- Coerced invalid values to valid values0xB600
- Memory allocation not supported0xB604
- Image size larger than image box size, the image has been demagnified0xB605
- Requested Min Density or Max Density outside of printer’s operating range. The printer will use its respective minimum or maximum density value instead0xB609
- Image size is larger than the Image Box. The Image has been cropped to fit0xB60A
- Image size or Combined Print Image size is larger than the Image Box size. The Image or Combined Print Image has been decimated to fit
- Parameters:
event (events.Event) –
The event representing a service class receiving a N-SET request message.
Event
attributes are:assoc
: theAssociation
that is running the service that received the N-SET request.context
: the presentation context the request was sent under as aPresentationContextTuple
.event
: the event that occurred asInterventionEvent
.request
: the receivedN-SET request
timestamp
: the date and time that the N-SET request was processed by the service asdatetime.datetime
.
Event
properties are:message_id
: the N-SET request’s Message ID asint
.modification_list
: the decodedDataset
contained within the N-SET request’s Modification List parameter. Because pydicom uses a deferred read when decoding data, if the decode fails the returnedDataset
will only raise an exception at the time of use.
args – If the handler was bound to the event using
bind(event, handler, args)
or by passingevt_handlers=[(event, handler, args), ...]
, where args is alist
then there will be one or more optional extra parameters matching the contents of args.
- Returns:
status (pydicom.dataset.Dataset or int) – The status returned to the peer AE in the N-SET response. Must be a valid N-SET status value for the applicable Service Class as either an
int
or aDataset
object containing (at a minimum) a (0000,0900) Status element. If returning aDataset
object then it may also contain optional elements related to the Status (as in DICOM Standard, Part 7, Annex C).dataset (pydicom.dataset.Dataset or None) – If the status category is ‘Success’ or ‘Warning’ then a
Dataset
containing elements of the response’s Attribute List conformant to the specifications in the corresponding Service Class.If the status category is not ‘Success’ or ‘Warning’ then
None
.
- Raises:
NotImplementedError – If the handler has not been implemented and bound to
evt.EVT_N_SET
by the user.
See also
send_n_set()
,N_SET
,PrintManagementServiceClass
,ProcedureStepServiceClass
,RTMachineVerificationServiceClass
,UnifiedProcedureStepServiceClass
References