#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. |
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
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.
Functions: |
L_DicomSendNGetResponse, RECEIVENGETREQUESTCALLBACK, RECEIVENGETRESPONSECALLBACK |
Topics: |
#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;
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET