LDicomNet::GetAssociate

#include "ltdic.h"

LDicomAssociate * LDicomNet::GetAssociate(L_VOID)

Returns the DICOM Associate for the DICOM Network object. This function is available in the PACS Imaging Toolkit.

Returns

The DICOM Associate associated with the DICOM Network object.

Comments

A DICOM Association must be established between an SCU and an SCP before any DICOM messages or data can be transmitted between them. For more information on creating a DICOM Association, refer to Creating a DICOM Associate Connection.

When the DICOM Association is no longer needed, it should be closed. For more information, refer to Closing a DICOM Associate Connection.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Topics:

Working with DICOM Associate Connections

Example

This example is called by the client after a connection has been made with the

server, and an association has been sent and accepted.

LMyDicomNet is a class derived from LDicomNet

In this example, assume

1. m_pDicomNet points to a valid object

2. A connection exists between client and server

3. An associate request has been sent and accepted

L_INT LDicomNet_GetAssociateExample(LMyDicomNet* m_pDicomNet)
{
   L_UCHAR nID;
   //get the associate object for this client computer's connection
   LDicomAssociate *pDicomAssociate  = m_pDicomNet->GetAssociate();
   //find the id for UID_VERIFICATION_CLASS within this association
   //if it is supported by the association
   nID = pDicomAssociate->FindAbstract(UID_VERIFICATION_CLASS);
   if (nID == 0)
      AfxMessageBox(TEXT("Not Supported by this association!"));
   else
   {
      CString strMsg;
      strMsg.Format(TEXT("Found[%d]"), nID);
      AfxMessageBox(strMsg);
   }
   return DICOM_SUCCESS;
}