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

Contents

  • Association Rejection
    • How to Reject Incoming Association with DicomObjects
      • Association Rejection in COM Version of DicomObjects
      • Association Rejection in .NET Version of DicomObjects
  • Contexts Rejection
    • How to Reject Presentation Contexts with DicomObjects
      • Presentation Contexts Rejection in COM Version of DicomObjects
      • Presentation Contexts Rejection in .NET Version of DicomObjects \

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
      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 .NET Version

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 code snippet below:

 void Server_AssociationRequest(object Sender, AssociationRequestArgs e)
 {
	e.Reject(Result, Source, Reason);  // Define your own Result, Source and Reason
 }

Association Rejection in COM Version

In the COM version you can use the SetRejectionCode. This method can be used in DicomServer’s AssociationRequest2 Event where user can set IsOK to false in order to reject the incoming association, as shown in code snippet below:

 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

\

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 .NET Version

 void Server_AssociationRequest(object Sender, AssociationRequestArgs e)
 {
	//  For e.g. reject the first Presentation Context
	e.Association.RequestedContexts[1].Reject(Reason);
 }

Presentation Contexts Rejection in COM Version

 Private Sub server_AssociationRequest(ByVal Connection As DicomObjects8.DicomConnection,
 					isOK As Boolean)
	'For e.g. reject the first Presentation Context
	Connection.Contexts.Item(1).Reject Reason
 End Sub