Available in LEADTOOLS Medical Imaging toolkits. |
Creating an SCU
The following steps provide the basic information required to create an SCU:
Create the DICOM Network handle by calling L_DicomCreateNet.
Initialize the DICOM Network handle by calling L_DicomStartUp. This must be done before any DICOM Network Operations functions are called.. Please note that this only needs to be called once for each application.
Call L_DicomSetCallback to set the callback functions you wish to use.
To connect to an SCP, call L_DicomConnect. This will generate a call to the ACCEPTCALLBACK function on the SCP to let the SCP know that a connection request has been received.
The SCP should respond by calling L_DicomAccept. This will generate a call to the CONNECTCALLBACK on the SCU. At this time the DICOM Network connection has been established.
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.
Create the DICOM Associate handle by calling L_DicomCreateAssociate.
Initialize the newly created DICOM Associate handle by calling L_DicomDefaultAssociate, or set the new DICOM Associate handle using the following functions:
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.
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.