Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS DICOM C DLL Help

L_DicomCreateAssociate

Show in webframe

#include "ltdic.h"

L_LTDIC_API HDICOMPDU L_DicomCreateAssociate(bRequest)

L_BOOL bRequest;

/* flag that indicates the type of association to create */

Creates a handle to a DICOM Associate of the specified type.

Parameter

Description

bRequest

Flag that indicates whether to create an Associate Request or an Associate Accept. possible values are:

 

Value

Meaning

 

TRUE

Create an Associate Request.

 

FALSE

Create an Associate Accept.

Returns

A handle to the newly created DICOM Associate.

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.

The characteristics of the DICOM Associate Connection may be set using L_DicomDefaultAssociate or by calling 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

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

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

Platforms

Win32, x64, Linux.

See Also

Functions:

L_DicomFreeAssociate, L_DicomDefaultAssociate, L_DicomResetAssociate, 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

Topics:

Working with DICOM Associate Connections

 

Creating a DICOM Associate Connection

 

Closing a DICOM Associate Connection

Example

L_INT DicomCreateAssociateExample(L_VOID)
{
   HDICOMPDU hPDU;
   
   /*create the Associate Class as Request*/
   hPDU = L_DicomCreateAssociate(TRUE);
   /*set the Associate to the default*/
   L_DicomDefaultAssociate(hPDU);
   /*Get presentations here*/
   if (L_DicomIsRequest(hPDU))
      MessageBox(NULL, TEXT("Associate Request? TRUE"), TEXT("Test"), MB_OK);
   else
      MessageBox(NULL, TEXT("Associate Request? FALSE"), TEXT("Test"), MB_OK);
   /*reset the Associate class to Accept*/
   L_DicomResetAssociate(hPDU, FALSE);
   /*set the Associate to the default*/
   L_DicomDefaultAssociate(hPDU);
   if (L_DicomIsRequest(hPDU))
      MessageBox(NULL, TEXT("Associate Request? TRUE"), TEXT("Test"), MB_OK);
   else
      MessageBox(NULL, TEXT("Associate Request? FALSE"), TEXT("Test"), MB_OK);
   /*free the Associate class*/
   L_DicomFreeAssociate(hPDU);
   return DICOM_SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.