#include "ltdic.h"
L_LTDIC_API L_INT L_DicomSendNGetRequest(hNet, nPresentationID, nMessageID, pszClass, pszInstance, pnAttribute, nCount)
Sends an N-GET-REQ message to a peer member of a connection.
A DICOM Network handle to the peer member of the connection.
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.
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.
Class affected by the request. This will be an SOP Class or an SOP MetaClass.
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.
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.
Number of attributes being requested.
Value | Meaning |
---|---|
DICOM_SUCCESS | The function was successful. |
>0 | An error occurred. Refer to Return Codes. |
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
Win32, x64, Linux.
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;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document