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


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.

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

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

We use cookies to give you the best possible experience on our website. By continuing to use this website, you agree with our use of cookies. for more information please click HERE