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 LDicomAssociate::LDicomAssociate.

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

LDicomAssociate::SetRequest

LDicomAssociate::SetVersion

LDicomAssociate::SetCalled

LDicomAssociate::SetCalling

LDicomAssociate::SetApplication

LDicomAssociate::SetPresentation

LDicomAssociate::SetResult

LDicomAssociate::SetAbstract

LDicomAssociate::SetTransfer

LDicomAssociate::SetMaxLength

LDicomAssociate::SetImplementClass

LDicomAssociate::SetAsyncOperations

LDicomAssociate::SetRoleSelect

LDicomAssociate::SetImplementVersion

LDicomAssociate::SetUserInfo

LDicomAssociate::SetExtended

LDicomAssociate::AddPresentation

LDicomAssociate::AddTransfer

image\sqrblit.gif To connect to an SCP, call LDicomNet::SendAssociateRequest. This will generate a call to the LDicomNet::OnReceiveAssociateRequest 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 LDicomNet::SendAssociateAccept or LDicomNet::SendAssociateReject. This will generate a call to the LDicomNet::OnReceiveAssociateAccept or the LDicomNet::OnReceiveAssociateReject. If LDicomNet::OnReceiveAssociateAccept 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 LDicomNet::SendAssociateRequest. This generates a call to LDicomNet::OnReceiveAssociateRequest on the SCP.

image\sqrblit.gif When the LDicomNet::OnReceiveAssociateRequest function is called, create the DICOM Associate handle by calling LDicomAssociate::LDicomAssociate.

image\sqrblit.gif Reset the newly created DICOM Associate handle to an Associate Accept by calling LDicomAssociate::Reset, 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 LDicomNet::SendAssociateAccept. This will generate a call to the LDicomNet::OnReceiveAssociateAccept on the SCU. At this time the DICOM Associate connection has been established. To reject the Associate connection request, call LDicomNet::SendAssociateReject. This will generate a call to the LDicomNet::OnReceiveAssociateReject function on the SCU.