The following steps provide the basic information required to create an SCP:
Initialize the DICOM DLL by calling DicomNet.Startup. This must be done before any DICOM Network Operations methods are called. Please note that this only needs to be called once for each application.
Create the DICOM Network object by instantiating the DicomNet class.
To listen for incoming connection requests, call DicomNet.Listen.
When an SCU wishes to connect to an SCP, the SCU calls DicomNet.Connect. This generates a call to the DicomNet.OnAccept method on the SCP, to let the SCP know that a connection request has been received.
The SCP should respond by creating a DICOM Network object and specifying this new object in a call to the DicomNet.Accept method. Creating an object for this specific connection allows the SCP to maintain information about the connection. Calling DicomNet.Accept will generate a call to DicomNet.OnConnect on the SCU. At this time the DICOM Network connection has been established. (An SCP should always accept a connection request. Once the connection is made the SCP can check the SCU and close the connection if it does not wish to maintain it. Since the connection requests are queued, if the connection is not accepted, it remains in the queue. When the next request is received, it is placed in the queue behind the first request. Calling DicomNet.Accept at this point will connect the first request, not the second, since the first request is still in the queue.)
Establish a security layer. For more information on security layers, refer to Adding Security to a DICOM Connection and Adding TLS Security to a DICOM Connection.
When an SCU requests a DICOM Associate connection, the SCU calls DicomNet.SendAssociateRequest. This generates a call to DicomNet.OnReceiveAssociateRequest on the SCP.
When the DicomNet.OnReceiveAssociateRequest method is called, create the DICOM Associate object by instantiating the DicomAssociate class.
Reset the newly created DICOM Associate object to an Associate Accept by calling DicomAssociate.Reset, or set the object using the following methods:
DicomAssociate.ApplicationContextName
DicomAssociate.SetPresentationContextID
DicomAssociate.SetAsynchronousOperations
DicomAssociate.ImplementationVersionName
The DICOM Associate connection request can be accepted or rejected. To accept the Associate connection request, call DicomNet.SendAssociateAccept. This will generate a call to DicomNet.OnReceiveAssociateAccept on the SCU. At this time the DICOM Associate connection has been established. To reject the Associate connection request, call DicomNet.SendAssociateReject. This will generate a call to DicomNet.OnReceiveAssociateReject on the SCU.
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET