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_DicomSendNGetRequest

Show in webframe

#include "ltdic.h"

L_LTDIC_API L_INT L_DicomSendNGetRequest(hNet, nPresentationID, nMessageID, pszClass, pszInstance, pnAttribute, nCount)

HDICOMNET hNet;

/* a DICOM Network handle */

L_UCHAR nPresentationID;

/* presentation ID */

L_UINT16 nMessageID;

/* message ID */

L_TCHAR * pszClass;

/* class type */

L_TCHAR * pszInstance;

/* instance */

L_UINT32 * pnAttribute;

/* array of attributes */

L_UINT16 nCount;

/* number of attributes */

Sends an N-GET-REQ message to a peer member of a connection.

Parameter

Description

hNet

A DICOM Network handle to the peer member of the connection.

nPresentationID

Presentation ID. The presentation ID provides information about both the class type of the data and the transfer syntax to use when transferring the data.

nMessageID

Message ID. Each message sent by a member of a connection should have a unique ID. Since a member of a connection may send several messages, this ID allows that member to identify when a specific request has been completed.

pszClass

Class affected by the request. This will be an SOP Class or an SOP MetaClass.

pszInstance

The instance of the class. A server may, for example, have three instances of the Nuclear Medicine Class. This value identifies the data with a specific instance.

pnAttribute

An array of the attributes to get. The attributes must be specified using the Data Element Tags. For a list of available Data Element Tags, refer to Data Element Tag Constants.

nCount

Number of attributes being requested.

Returns

DICOM_SUCCESS

The function was successful.

>0

An error occurred. Refer to Return Codes.

Comments

Calling this function generates a call to RECEIVENGETREQUESTCALLBACK on the SCP. The SCP should respond by calling L_DicomSendNGetResponse which will generate a call to RECEIVENGETRESPONSECALLBACK.

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_DicomSendNGetResponse, RECEIVENGETREQUESTCALLBACK, RECEIVENGETRESPONSECALLBACK

Topics:

Working with DICOM Network Connections

Example

#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName
L_INT DicomSendNGetRequestExample(HDICOMNET hNet, L_TCHAR gszGetFile[L_MAXPATH])
{
   L_TCHAR szClassUID[200];
   L_TCHAR szInstance[200];
   L_TCHAR szMsg[200];
   HDICOMPDU hPDU;
   L_UCHAR nID;
   L_UINT32 Attributes[4];
   L_INT nRet;
   
   /* send an N-GET-REQUEST to the server */
   
   /* gszGetFile is a global variable used in the NetReceiveNGetResponse event */
   lstrcpy(gszGetFile, MAKE_IMAGE_PATH(TEXT("N_GET_REQ.dcm")));
   
   /* this sample uses fixed values */
   lstrcpy(szClassUID, UID_SC_IMAGE_STORAGE);
   
   lstrcpy(szInstance, TEXT("998.998.1.19950214.94000.1.102"));
   
   /* here, you must create a list of the identifiers */
   /* that you wish to get from the server */
   Attributes[0] = TAG_PATIENT_NAME;
   Attributes[1] = TAG_PATIENT_ID;
   Attributes[2] = TAG_PATIENT_SEX;
   Attributes[3] = TAG_NUMBER_OF_PATIENT_RELATED_INSTANCES;
   
   hPDU = L_DicomGetAssociate(hNet);
   
   /* now, send a request */
   nID = L_DicomFindAbstract(hPDU, szClassUID);
   if(nID == 0)
   {
      wsprintf(szMsg, TEXT("Abstract Syntax %s Not Supported by Association!"), szClassUID);
      MessageBox(NULL, szMsg, TEXT("Error"), MB_OK);
   }
   else
   {
      nRet = L_DicomSendNGetRequest(hNet, nID, 1, szClassUID, szInstance, Attributes, 4);
      if (nRet != DICOM_SUCCESS)
         return nRet;
   }
   return DICOM_SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.