Available in LEADTOOLS Medical Imaging toolkits. |
LDicomNet::OnReceiveCFindRequest
#include "ltdic.h"
virtual L_VOID LDicomNet::OnReceiveCFindRequest(nPresentationID, nMessageID, pszClass, nPriority, pDS)
L_UCHAR nPresentationID; |
/* presentation ID */ |
L_UINT16 nMessageID; |
/* message ID */ |
L_TCHAR * pszClass; |
/* class type */ |
L_UINT16 nPriority; |
/* priority of the message */ |
LDicomDS* pDS; |
/* data set to be found */ |
Notifies a connection that a C-FIND-REQ command was received. This function is available in the Medical Imaging Suite Toolkit.
Parameter |
Description |
|
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. |
|
nPriority |
The priority level of the message. The Service Class Provider may or may not support priority. Therefore, setting this parameter may or may not have any effect. Possible values are: |
|
|
Value |
Meaning |
|
COMMAND_PRIORITY_LOW |
[0x0002] Low priority message. |
|
COMMAND_PRIORITY_MEDIUM |
[0x0000] Medium priority message. |
|
COMMAND_PRIORITY_HIGH |
[0x0001] High priority message. |
pDS |
Pointer to the data set to be found. |
Returns
None.
Comments
A call to this function is generated on a peer member of a connection when LDicomNet::SendCFindRequest is called.
To customize this function, you must derive a class from LDicomNet and override this function.
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 |
Win32, x64
See Also
Functions: |
LDicomNet::SendCFindRequest, LDicomNet::SendCFindResponse, LDicomNet::OnReceiveCFindResponse |
Topics: |
Example
//In this example:
//
//1. LMyDicomNet is a class derived from LDicomNet
//2. LMyDicomNet has the following member variables:
// m_nClientOrServer: can be (STATUS_NONE, STATUS_SERVER, STATUS_CLIENT)
// identifieds the LMyDicomNet object as a server or a client
// m_nDataCommand: can be (COMMAND_C_MOVE,COMMAND_C_GET)
// set so the server knows how a C-Store Response was generated
//
//3. m_pDicomNet points to a valid LMyDicomNet object
// LMyDicomNet *m_pDicomNet
//
//4. A connection exists between client and server
//5. An association exists between the client and server
#define MAKE_IMAGE_PATH(pFileName) TEXT("C:\\Users\\Public\\Documents\\LEADTOOLS Images\\")pFileName L_VOID LMyDicomNet::OnReceiveCFindRequest(L_UCHAR nPresentationID, L_UINT16 nMessageID, L_TCHAR *pszClass, L_UINT16 nPriority, LDicomDS *pDS) { CString strMsg; L_UINT lPeerPort; L_TCHAR szPeerAddress[100]; GetPeerInfo(szPeerAddress,100, &lPeerPort); strMsg.Format(TEXT("*** OnReceiveCFindRequest ***\nPeer[%s]\nnPresentationID[%d]\nnMessageID[%d]\npszClass[%s]\nnPriority[%d]\npDS[%x]\n"), szPeerAddress, nPresentationID, nMessageID, pszClass, nPriority, pDS); //Load each file and send it to the calling AE //For this example, assume the following two files match the find criteria //load sample file 1 LDicomDS DicomDS1; DicomDS1.LoadDS(MAKE_IMAGE_PATH(TEXT("IMAGE1.dcm")), 0); //send a Find Response � PENDING strMsg=strMsg + "SendCFindResponse\n"; SendCFindResponse (nPresentationID, nMessageID, pszClass, COMMAND_STATUS_PENDING, &DicomDS1); //load sample file 2 LDicomDS DicomDS2; DicomDS2.LoadDS(MAKE_IMAGE_PATH(TEXT("IMAGE1.dcm")), 0); strMsg=strMsg + "SendCFindResponse\n"; //send a Find Response � PENDING SendCFindResponse (nPresentationID, nMessageID, pszClass, COMMAND_STATUS_PENDING, &DicomDS2); strMsg=strMsg + "SendCFindResponse\n"; //now, send a Find Response � SUCCESS SendCFindResponse(nPresentationID, nMessageID, pszClass, COMMAND_STATUS_SUCCESS, 0); AfxMessageBox(strMsg); }