Available in LEADTOOLS Medical Imaging toolkits. |
Creating an SCU
The following steps provide the basic information required to create an SCU:
Initialize the DICOM DLL by calling LDicomNet::StartUp. 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.
Create the DICOM Network object by calling LDicomNet::LDicomNet.
To connect to an SCP, call LDicomNet::Connect. This will generate a call to the LDicomNet::OnAccept function on the SCP to let the SCP know that a connection request has been received.
The SCP should respond by calling LDicomNet::Accept. This will generate a call to the LDicomNet::OnConnect 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 object by calling LDicomAssociate::LDicomAssociate.
Initialize the newly created DICOM Associate object by calling LDicomAssociate::Default, or set the new DICOM Associate object using the following functions:
LDicomAssociate::SetApplication
LDicomAssociate::SetPresentation
LDicomAssociate::SetImplementClass
LDicomAssociate::SetAsyncOperations
LDicomAssociate::SetRoleSelect
LDicomAssociate::SetImplementVersion
LDicomAssociate::AddPresentation
To connect to an SCP, call LDicomNet::SendAssociateRequest. This will generate a call to LDicomNet::OnReceiveAssociateRequest 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 LDicomNet::SendAssociateAccept or LDicomNet::SendAssociateReject. This will generate a call to LDicomNet::OnReceiveAssociateAccept or LDicomNet::OnReceiveAssociateReject. If LDicomNet::OnReceiveAssociateAccept is called, the DICOM Associate Connection has been established.