Creating a DICOM Associate Connection
Once a DICOM Network Connection has been established, a DICOM Associate Connection must be established before DICOM messages and data can be transferred between two AEs.
The AE acting as an SCP must have a DICOM Associate handle and the AE acting as an SCU must have a DICOM Associate handle. Steps for establishing a DICOM Associate connection are given below for both the SCU and the SCP.
Creating an associate handle for an SCU
Create the DICOM Associate handle by calling the CreateAssociate.
Initialize the newly created DICOM Associate handle by calling DefaultAssociate, or set the new DICOM Associate handle using the following functions:
SetPresentationAbstract method
To connect to an SCP, call the SendAssociateRequest method. This will generate a NetReceiveAssociateRequest event on the SCP to let the SCP know an associate connection request has been received.
The SCP may accept or reject the request and respond by calling the SendAssociateAccept method or SendAssociateReject method. This will generate a NetReceiveAssociateAccept event or the NetReceiveAssociateReject event. If the NetReceiveAssociateAccept event is generated, the DICOM Associate Connection has been established.
Creating an associate handle for an SCP
When an SCU requests a DICOM Associate connection, the SCU calls the SendAssociateRequest method. This generates a NetReceiveAssociateRequest event on the SCP.
When the NetReceiveAssociateRequest event is called, create the DICOM Associate handle by calling the CreateAssociate method.
Reset the newly created DICOM Associate handle to an Associate Accept by calling the ResetAssociate method, or set the new DICOM Associate handle using the methods given above.
The DICOM Associate connection request can be accepted or rejected. To accept the Associate connection request, call the SendAssociateAccept method. This will generate a NetReceiveAssociateAccept event on the SCU. At this time the DICOM Associate connection has been established. To reject the Associate connection request, call SendAssociateReject method. This will generate a NetReceiveAssociateReject event on the SCU.