Rejection

There are two kinds of Rejection during association establishment, Association Rejection and Contexts Rejection.

Contents

Association Rejection

SCP can reject any incoming association for many reasons. It could be something not right in the information provided by the calling SCU, like CallingAET or CalledAET mismatch, non-DICOM or unsupported contexts, etc. Incoming association could also be rejected for reasons like traffic congestion or SCP's limit of concurrent connection has been exceeded.

Whenever there is a rejection, a good SCP should always send back a sensible reason, together with the source and result of the rejection as defined in the DICOM standard.

  • Result - This Result field shall contain an integer value encoded as an unsigned binary number. One of the following values shall be used:
    • Rejected Permanent
    • Rejected Transient
  • Source - This Source field shall contain an integer value encoded as an unsigned binary number. One of the following values shall be used:
    • DICOM UL Service User
    • DICOM UL Service Provider (ACSE related function)
    • DICOM UL Service Provider (Presentation related function)
  • Reason - This field shall contain an integer value encoded as an unsigned binary number. Reason varies for different Reject Source:
    • For Source "DICOM UL Service User":
      • 1 - No Reason Given
      • 2 - Application Context Name Not Supported
      • 3 - Calling AE Title Not Recognized
      • 4-6 - Reserved
      • 7 - Called AE Title Not Recognized
      • 8-10 - Reserved
    • For Source "DICOM UL service provided (ACSE related function)":
      • 1 - No Reason Given
      • 2 - Protocol Version Not Supported
    • For Source "DICOM UL service provided (Presentation related function)":
      • 0 - Reserved
      • 1 - Temporary Congestion
      • 2 - Local Limit Exceeded
      • 3-7 - Reserved

Note: The reserved fields are used to preserve symmetry with OSI ACSE/Presentation Services and Protocols.

How to Reject Incoming Association with DicomObjects

Association Rejection in COM Version of DicomObjects

In the latest Version of DicomObjects (4.3.51.2 and later) user will have a new method called "SetRejectionCode", which takes 3 parameters as "Result", "Source" and "Reason". This method can be used in DicomViewer/DicomServer's AssociationRequest2 Event where user can set IsOK to false in order to reject the incoming association, as shown in the following vb code:

Private Sub DicomViewer1_AssociationRequest2(ByVal Connection As DicomObjects.DicomConnection, isOK As Boolean)
   Connection.SetRejectionCode 2, 2, 2  ' Reject the Connection and send sensible info back
   isOK = False
End Sub

Association Rejection in .NET Version of DicomObjects

In .NET version of DicomObjects, we have Reject method for DicomServer's AssociationRequestArgs and in the DicomServer's AssociationRequest Event, user can call it as shown in the following VB.NET sample code:

Private Sub Server_AssociationRequest(ByVal sender As Object, ByVal e As DicomObjects.DicomServer.AssociationRequestArgs) 
                                      Handles Server.AssociationRequest
   e.Reject(Result, Source, Reason)  ' Define your own Result, Source and Reason
End Sub

 

Contexts Rejection

Contexts Rejection happens during the association negotiation but unlike Association Rejection which kills the association, it rejects some or all the Presentation Contexts proposed by SCU, according to the SCP's own rules. It should be clearly stated in the SCP's conformance statement which Presentation Contexts it supports.

How to Reject Presentation Contexts with DicomObjects

Presentation Contexts Rejection in COM Version of DicomObjects

Reject method can be found in DicomContext object in COM version of DicomObjects, either in AssociationRequest event or its replacement AssociationRequest2 event, as shown in the following VB6 sample code:

Private Sub DicomViewer1_AssociationRequest(ByVal CallingAE As String, ByVal CalledAE As String, ByVal CallingIPAddress As String, 
                                            ByVal Association As Long, isOK As Boolean, ByVal Contexts As DicomObjects.DicomContexts)
   Contexts.Item(1).Reject  ' for example, reject the first Presentation Context
End Sub
Private Sub DicomViewer1_AssociationRequest2(ByVal Connection AsDicomObjects.DicomConnection, isOK As Boolean)
   Connection.Contexts.Item(1).Reject  ' for example, reject the first Presentation Context
End Sub

Presentation Contexts Rejection in .NET Version of DicomObjects

Private Sub Server_AssociationRequest(ByVal sender As Object, ByVal e As DicomObjects.DicomServer.AssociationRequestArgs) 
                                      Handles Server.AssociationRequest
   e.Association.RequestedContexts(1).Reject(Reason) ' for example, reject the first Presentation Context
End Sub
Relevance: