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

image\sqrblit.gif Create the DICOM Associate handle by calling L_DicomCreateAssociate.

image\sqrblit.gif Initialize the newly created DICOM Associate handle by calling L_DicomDefaultAssociate, or set the new DICOM Associate handle using the following functions:

L_DicomSetRequest

L_DicomSetVersion

L_DicomSetCalled

L_DicomSetCalling

L_DicomSetApplication

L_DicomSetPresentation

L_DicomSetResult

L_DicomSetAbstract

L_DicomSetTransfer

L_DicomSetMaxLength

L_DicomSetImplementClass

L_DicomSetAsyncOperations

L_DicomSetRoleSelect

L_DicomSetImplementVersion

L_DicomSetUserInfo

L_DicomSetExtended

L_DicomAddPresentation

L_DicomAddTransfer

image\sqrblit.gif To connect to an SCP, call L_DicomSendAssociateRequest. This will generate a call to the RECEIVEASSOCIATEREQUESTCALLBACK on the SCP to let the SCP know an associate connection request has been received.

image\sqrblit.gif The SCP may accept or reject the request and respond by calling L_DicomSendAssociateAccept or L_DicomSendAssociateReject. This will generate a call to the RECEIVEASSOCIATEACCEPTCALLBACK or the RECEIVEASSOCIATEREJECTCALLBACK. If RECEIVEASSOCIATEACCEPTCALLBACK is called, the DICOM Associate Connection has been established.

Creating an associate handle for an SCP

image\sqrblit.gif When an SCU requests a DICOM Associate connection, the SCU calls L_DicomSendAssociateRequest. This generates a call to RECEIVEASSOCIATEREQUESTCALLBACK on the SCP.

image\sqrblit.gif When the RECEIVEASSOCIATEREQUESTCALLBACK function is called, create the DICOM Associate handle by calling L_DicomCreateAssociate.

image\sqrblit.gif Reset the newly created DICOM Associate handle to an Associate Accept by calling L_DicomResetAssociate, or set the new DICOM Associate handle using the functions given above.

image\sqrblit.gif The DICOM Associate connection request can be accepted or rejected. To accept the Associate connection request, call L_DicomSendAssociateAccept. This will generate a call to the RECEIVEASSOCIATEACCEPTCALLBACK on the SCU. At this time the DICOM Associate connection has been established. To reject the Associate connection request, call L_DicomSendAssociateReject. This will generate a call to the RECEIVEASSOCIATEREJECTCALLBACK function on the SCU.

Freeing allocated memory

When the DICOM Associate handle is no longer needed, call L_DicomFreeAssociate to free the memory allocated for the specified DICOM Associate.