📄 dimse.h
字号:
DIC_US MessageID; /* M */ DIC_UI AffectedSOPClassUID; /* M */ T_DIMSE_Priority Priority; /* M */ T_DIMSE_DataSetType DataSetType; /* M */ DIC_AE MoveDestination; /* M */ /* Identifier provided as argument to DIMSE functions *//* M */} ;struct T_DIMSE_C_MoveRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U(=) */ T_DIMSE_DataSetType DataSetType; /* M */ DIC_US DimseStatus; /* M */ DIC_US NumberOfRemainingSubOperations; /* C */ DIC_US NumberOfCompletedSubOperations; /* C */ DIC_US NumberOfFailedSubOperations; /* C */ DIC_US NumberOfWarningSubOperations; /* C */ unsigned int opts; /* which optional items are set */#define O_MOVE_AFFECTEDSOPCLASSUID 0x0001#define O_MOVE_NUMBEROFREMAININGSUBOPERATIONS 0x0002#define O_MOVE_NUMBEROFCOMPLETEDSUBOPERATIONS 0x0004#define O_MOVE_NUMBEROFFAILEDSUBOPERATIONS 0x0008#define O_MOVE_NUMBEROFWARNINGSUBOPERATIONS 0x0010} ;/* C-CANCEL */struct T_DIMSE_C_CancelRQ { DIC_US MessageIDBeingRespondedTo; /* M */ T_DIMSE_DataSetType DataSetType; /* M */} ;/* N-EVENT-REPORT */struct T_DIMSE_N_EventReportRQ { DIC_US MessageID; /* M */ DIC_UI AffectedSOPClassUID; /* M */ DIC_UI AffectedSOPInstanceUID; /* M */ T_DIMSE_DataSetType DataSetType; /* M */ DIC_US EventTypeID; /* M */ /* EventInformation provided as argument to DIMSE functions *//* U */} ;struct T_DIMSE_N_EventReportRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U(=) */ DIC_US DimseStatus; /* M */ DIC_UI AffectedSOPInstanceUID; /* U(=) */ T_DIMSE_DataSetType DataSetType; /* M */ DIC_US EventTypeID; /* C(=) */ /* EventReply provided as argument to DIMSE functions *//* C */ unsigned int opts; /* which optional items are set */#define O_NEVENTREPORT_AFFECTEDSOPCLASSUID 0x0001#define O_NEVENTREPORT_AFFECTEDSOPINSTANCEUID 0x0002#define O_NEVENTREPORT_EVENTTYPEID 0x0004} ;/* N-GET */struct T_DIMSE_N_GetRQ { DIC_US MessageID; /* M */ DIC_UI RequestedSOPClassUID; /* M */ DIC_UI RequestedSOPInstanceUID; /* M */ T_DIMSE_DataSetType DataSetType; /* M */ /* * In the following array, the attributes to get should be coded * in pairs along the array (e.g. {g,e,g,e,g,e,...}). The ListCount * variable should contain the number of 'DIC_US' values in the * array (not the number of pairs). */ int ListCount; DIC_US *AttributeIdentifierList; /* U */} ;struct T_DIMSE_N_GetRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U */ DIC_US DimseStatus; /* M */ DIC_UI AffectedSOPInstanceUID; /* U */ T_DIMSE_DataSetType DataSetType; /* M */ /* AttributeList provided as argument to DIMSE functions *//* C */ unsigned int opts; /* which optional items are set */#define O_NGET_AFFECTEDSOPCLASSUID 0x0001#define O_NGET_AFFECTEDSOPINSTANCEUID 0x0002} ;/* N-SET */struct T_DIMSE_N_SetRQ { DIC_US MessageID; /* M */ DIC_UI RequestedSOPClassUID; /* M */ DIC_UI RequestedSOPInstanceUID; /* M */ T_DIMSE_DataSetType DataSetType; /* M */ /* ModificationList provided as argument to DIMSE functions *//* M */} ;struct T_DIMSE_N_SetRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U */ DIC_US DimseStatus; /* M */ DIC_UI AffectedSOPInstanceUID; /* U */ T_DIMSE_DataSetType DataSetType; /* M */ /* AttributeList provided as argument to DIMSE functions *//* U */ unsigned int opts; /* which optional items are set */#define O_NSET_AFFECTEDSOPCLASSUID 0x0001#define O_NSET_AFFECTEDSOPINSTANCEUID 0x0002} ;/* N-ACTION */struct T_DIMSE_N_ActionRQ { DIC_US MessageID; /* M */ DIC_UI RequestedSOPClassUID; /* M */ DIC_UI RequestedSOPInstanceUID; /* M */ DIC_US ActionTypeID; /* M */ T_DIMSE_DataSetType DataSetType; /* M */ /* ActionInformation provided as argument to DIMSE functions *//* U */} ;struct T_DIMSE_N_ActionRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U */ DIC_US DimseStatus; /* M */ DIC_UI AffectedSOPInstanceUID; /* U */ DIC_US ActionTypeID; /* C(=) */ T_DIMSE_DataSetType DataSetType; /* M */ /* ActionReply provided as argument to DIMSE functions *//* C */ unsigned int opts; /* which optional items are set */#define O_NACTION_AFFECTEDSOPCLASSUID 0x0001#define O_NACTION_AFFECTEDSOPINSTANCEUID 0x0002#define O_NACTION_ACTIONTYPEID 0x0004} ;/* N-CREATE */struct T_DIMSE_N_CreateRQ { DIC_US MessageID; /* M */ DIC_UI AffectedSOPClassUID; /* M */ DIC_UI AffectedSOPInstanceUID; /* U */ T_DIMSE_DataSetType DataSetType; /* M */ /* AttributeList provided as argument to DIMSE functions *//* M */ unsigned int opts; /* which optional items are set */#define O_NCREATE_AFFECTEDSOPINSTANCEUID 0x0002} ;struct T_DIMSE_N_CreateRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U(=) */ DIC_US DimseStatus; /* M */ DIC_UI AffectedSOPInstanceUID; /* C */ T_DIMSE_DataSetType DataSetType; /* M */ /* AttributeList provided as argument to DIMSE functions *//* U */ unsigned int opts; /* which optional items are set */#define O_NCREATE_AFFECTEDSOPCLASSUID 0x0001#define O_NCREATE_AFFECTEDSOPINSTANCEUID 0x0002} ;/* N-DELETE */struct T_DIMSE_N_DeleteRQ { DIC_US MessageID; /* M */ DIC_UI RequestedSOPClassUID; /* M */ DIC_UI RequestedSOPInstanceUID; /* M */ T_DIMSE_DataSetType DataSetType; /* M */} ;struct T_DIMSE_N_DeleteRSP { DIC_US MessageIDBeingRespondedTo; /* M */ DIC_UI AffectedSOPClassUID; /* U */ DIC_US DimseStatus; /* M */ DIC_UI AffectedSOPInstanceUID; /* U */ T_DIMSE_DataSetType DataSetType; /* M */ unsigned int opts; /* which optional items are set */#define O_NDELETE_AFFECTEDSOPCLASSUID 0x0001#define O_NDELETE_AFFECTEDSOPINSTANCEUID 0x0002} ;/* * Composite DIMSE Message */struct T_DIMSE_Message { T_DIMSE_Command CommandField; /* M */ union { /* requests */ T_DIMSE_C_StoreRQ CStoreRQ; T_DIMSE_C_EchoRQ CEchoRQ; T_DIMSE_C_FindRQ CFindRQ; T_DIMSE_C_GetRQ CGetRQ; T_DIMSE_C_MoveRQ CMoveRQ; T_DIMSE_C_CancelRQ CCancelRQ; T_DIMSE_N_EventReportRQ NEventReportRQ; T_DIMSE_N_GetRQ NGetRQ; T_DIMSE_N_SetRQ NSetRQ; T_DIMSE_N_ActionRQ NActionRQ; T_DIMSE_N_CreateRQ NCreateRQ; T_DIMSE_N_DeleteRQ NDeleteRQ; /* responses */ T_DIMSE_C_StoreRSP CStoreRSP; T_DIMSE_C_EchoRSP CEchoRSP; T_DIMSE_C_FindRSP CFindRSP; T_DIMSE_C_GetRSP CGetRSP; T_DIMSE_C_MoveRSP CMoveRSP; T_DIMSE_N_EventReportRSP NEventReportRSP; T_DIMSE_N_GetRSP NGetRSP; T_DIMSE_N_SetRSP NSetRSP; T_DIMSE_N_ActionRSP NActionRSP; T_DIMSE_N_CreateRSP NCreateRSP; T_DIMSE_N_DeleteRSP NDeleteRSP; } msg;};/* * Globale Variables *//* * Define global defaults for data encoding when sending out data-sets. * These can be adjusted to allow variants to be tested. */extern E_GrpLenEncoding g_dimse_send_groupLength_encoding; /* default: EGL_recalcGL */extern E_EncodingType g_dimse_send_sequenceType_encoding; /* default: EET_ExplicitLength *//* * If this global flag is set to OFTrue, all DIMSE messages sent or received * are stored in files with the name * "dimse-TTT-DDD-XXXX.dcm" or "dimse-TTT-DDD-XXXX-YY.dcm", where * TTT is "cmd" for a command set, or "dat" for a data set * DDD is "snd" for data sent, or "rcv" for data received * XXXX is a counter, starting at 1 (global for all associations) * YY is an additional counter used if multiple datasets follow a single command set * The files are in implicit VR little endian encoding, without meta-header. */extern OFBool g_dimse_save_dimse_data; /* default: OFFalse *//* * Public Function Prototypes *//* * High Level DIMSE Messaging. *//* * General Information. * * Many of the DIMSE routines take parameters for a blocking mode * and a timeout. In all cases, these parameters are only used * when receiving commands or data sets (reading). There are no blocking * and timeout options for send operations. * When receiving commands or data sets: * If the parameter blockMode is DIMSE_BLOCKING, the DIMSE routine * will wait until a response arrives before returning. * If the parameter blockMode is DIMSE_NONBLOCKING then the DIMSE routine * will wait at most timeout seconds for a response and if no response arrives * will return DIMSE_NODATAAVAILABLE. In both cases waiting will be * interupted by association release, and abort messages, or network * disruption. *//* * Verification Service Class */ OFConditionDIMSE_echoUser( /* in */ T_ASC_Association *assoc, DIC_US msgId, /* blocking info for response */ T_DIMSE_BlockingMode blockMode, int timeout, /* out */ DIC_US *status, DcmDataset **statusDetail); OFConditionDIMSE_sendEchoResponse(T_ASC_Association * assoc, T_ASC_PresentationContextID presID, T_DIMSE_C_EchoRQ *request, DIC_US status, DcmDataset *statusDetail);/* * Storage Service Class */typedef enum { DIMSE_StoreBegin, /* before data set */ DIMSE_StoreProgressing, /* during data set */ DIMSE_StoreEnd /* after data set */} T_DIMSE_StoreProgressState;struct T_DIMSE_StoreProgress { /* progress structure for store callback routines */ T_DIMSE_StoreProgressState state; /* current state */ long callbackCount; /* callback execution count */ long progressBytes; /* sent/received so far */ long totalBytes; /* total/estimated total to send/receive */} ;typedef void (*DIMSE_StoreUserCallback)( void *callbackData, T_DIMSE_StoreProgress *progress, T_DIMSE_C_StoreRQ *request /* original store request */ );struct T_DIMSE_DetectedCancelParameters { OFBool cancelEncountered; T_ASC_PresentationContextID presId; T_DIMSE_C_CancelRQ req;} ;OFConditionDIMSE_storeUser( /* in */ T_ASC_Association *assoc, T_ASC_PresentationContextID presId, T_DIMSE_C_StoreRQ *request, const char *imageFileName, DcmDataset *imageDataSet, DIMSE_StoreUserCallback callback, void *callbackData, /* blocking info for response */ T_DIMSE_BlockingMode blockMode, int timeout, /* out */ T_DIMSE_C_StoreRSP *response, DcmDataset **statusDetail, T_DIMSE_DetectedCancelParameters *checkForCancelParams = NULL, /* in */ long imageFileTotalBytes=0);typedef void (*DIMSE_StoreProviderCallback)( /* in */ void *callbackData, T_DIMSE_StoreProgress *progress, /* progress state */ T_DIMSE_C_StoreRQ *request, /* original store request */ char *imageFileName, DcmDataset **imageDataSet, /* being received into */ /* in/out */ T_DIMSE_C_StoreRSP *response, /* final store response */ /* out */ DcmDataset **statusDetail);OFConditionDIMSE_storeProvider(/* in */ T_ASC_Association *assoc, T_ASC_PresentationContextID presIdCmd, T_DIMSE_C_StoreRQ *request, const char* imageFileName, int writeMetaheader, DcmDataset **imageDataSet, DIMSE_StoreProviderCallback callback, void *callbackData, /* blocking info for data set */ T_DIMSE_BlockingMode blockMode, int timeout);OFConditionDIMSE_sendStoreResponse(T_ASC_Association * assoc, T_ASC_PresentationContextID presID, T_DIMSE_C_StoreRQ *request, /* send response to this request */ T_DIMSE_C_StoreRSP *response, /* response structure */ DcmDataset *statusDetail);/* * Query/Retrieve Service Class (FIND) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -