00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070 #ifndef DIMSE_H
00071 #define DIMSE_H
00072
00073
00074
00075
00076
00077 #include "dcmtk/config/osconfig.h"
00078
00079 #include "dcmtk/dcmnet/dicom.h"
00080 #include "dcmtk/dcmnet/lst.h"
00081 #include "dcmtk/dcmnet/cond.h"
00082 #include "dcmtk/dcmnet/dul.h"
00083 #include "dcmtk/dcmnet/assoc.h"
00084 #include "dcmtk/dcmdata/dcdatset.h"
00085 #include "dcmtk/ofstd/ofglobal.h"
00086
00087 class DcmOutputFileStream;
00088
00097 extern OFGlobal<OFBool> dcmPeerRequiresExactUIDCopy;
00098
00105 extern OFGlobal<Uint32> dcmMaxOutgoingPDUSize;
00106
00107
00108
00109
00110
00111 #define STATUS_Success 0x0000
00112 #define STATUS_Pending 0xff00
00113
00114 #define DICOM_PENDING_STATUS(status) (((status)&0xff00) == 0xff00)
00115 #define DICOM_WARNING_STATUS(status) (((status)&0xf000) == 0xb000)
00116
00117
00118
00119
00120
00121
00122
00123 #define STATUS_STORE_Refused_OutOfResources 0xa700
00124 #define STATUS_STORE_Refused_SOPClassNotSupported 0xa800
00125 #define STATUS_STORE_Error_DataSetDoesNotMatchSOPClass 0xa900
00126 #define STATUS_STORE_Error_CannotUnderstand 0xc000
00127 #define STATUS_STORE_Warning_CoersionOfDataElements 0xb000
00128 #define STATUS_STORE_Warning_DataSetDoesNotMatchSOPClass 0xb007
00129 #define STATUS_STORE_Warning_ElementsDiscarded 0xb006
00130
00131
00132 #define STATUS_FIND_Refused_OutOfResources 0xa700
00133 #define STATUS_FIND_Refused_SOPClassNotSupported 0xa800
00134 #define STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass 0xa900
00135 #define STATUS_FIND_Failed_UnableToProcess 0xc000
00136 #define STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest 0xfe00
00137 #define STATUS_FIND_Pending_WarningUnsupportedOptionalKeys 0xff01
00138
00139
00140 #define STATUS_MOVE_Refused_OutOfResourcesNumberOfMatches 0xa701
00141 #define STATUS_MOVE_Refused_OutOfResourcesSubOperations 0xa702
00142 #define STATUS_MOVE_Failed_SOPClassNotSupported 0xa800
00143 #define STATUS_MOVE_Failed_MoveDestinationUnknown 0xa801
00144 #define STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass 0xa900
00145 #define STATUS_MOVE_Failed_UnableToProcess 0xc000
00146 #define STATUS_MOVE_Cancel_SubOperationsTerminatedDueToCancelIndication 0xfe00
00147 #define STATUS_MOVE_Warning_SubOperationsCompleteOneOrMoreFailures 0xb000
00148
00149
00150 #define STATUS_GET_Refused_OutOfResourcesNumberOfMatches 0xa701
00151 #define STATUS_GET_Refused_OutOfResourcesSubOperations 0xa702
00152 #define STATUS_GET_Failed_SOPClassNotSupported 0xa800
00153 #define STATUS_GET_Failed_IdentifierDoesNotMatchSOPClass 0xa900
00154 #define STATUS_GET_Failed_UnableToProcess 0xc000
00155 #define STATUS_GET_Cancel_SubOperationsTerminatedDueToCancelIndication 0xfe00
00156 #define STATUS_GET_Warning_SubOperationsCompleteOneOrMoreFailures 0xb000
00157
00158
00159 #define STATUS_N_Cancel 0xFE00
00160 #define STATUS_N_AttributeListError 0x0107
00161 #define STATUS_N_SOPClassNotSupported 0x0122
00162 #define STATUS_N_ClassInstanceConflict 0x0119
00163 #define STATUS_N_DuplicateSOPInstance 0x0111
00164 #define STATUS_N_DuplicateInvocation 0x0210
00165 #define STATUS_N_InvalidArgumentValue 0x0115
00166 #define STATUS_N_InvalidAttributeValue 0x0106
00167 #define STATUS_N_InvalidObjectInstance 0x0117
00168 #define STATUS_N_MissingAttribute 0x0120
00169 #define STATUS_N_MissingAttributeValue 0x0121
00170 #define STATUS_N_MistypedArgument 0x0212
00171 #define STATUS_N_NoSuchArgument 0x0114
00172 #define STATUS_N_NoSuchAttribute 0x0105
00173 #define STATUS_N_NoSuchEventType 0x0113
00174 #define STATUS_N_NoSuchObjectInstance 0x0112
00175 #define STATUS_N_NoSuchSOPClass 0x0118
00176 #define STATUS_N_ProcessingFailure 0x0110
00177 #define STATUS_N_ResourceLimitation 0x0213
00178 #define STATUS_N_UnrecognizedOperation 0x0211
00179
00180
00181 #define STATUS_N_PRINT_BFS_Warn_MemoryAllocation 0xB600
00182 #define STATUS_N_PRINT_BFS_Warn_NoSessionPrinting 0xB601
00183 #define STATUS_N_PRINT_BFS_Warn_EmptyPage 0xB602
00184 #define STATUS_N_PRINT_BFB_Warn_EmptyPage 0xB603
00185 #define STATUS_N_PRINT_BFS_Fail_NoFilmBox 0xC600
00186 #define STATUS_N_PRINT_BFS_Fail_PrintQueueFull 0xC601
00187 #define STATUS_N_PRINT_BSB_Fail_PrintQueueFull 0xC602
00188 #define STATUS_N_PRINT_BFS_BFB_Fail_ImageSize 0xC603
00189 #define STATUS_N_PRINT_BFS_BFB_Fail_PositionCollision 0xC604
00190 #define STATUS_N_PRINT_IB_Fail_InsufficientMemory 0xC605
00191 #define STATUS_N_PRINT_IB_Fail_MoreThanOneVOILUT 0xC606
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 typedef enum {
00203 DIMSE_NOTHING = 0x0000,
00204 DIMSE_C_STORE_RQ = 0x0001,
00205 DIMSE_C_STORE_RSP = 0x8001,
00206 DIMSE_C_GET_RQ = 0x0010,
00207 DIMSE_C_GET_RSP = 0x8010,
00208 DIMSE_C_FIND_RQ = 0x0020,
00209 DIMSE_C_FIND_RSP = 0x8020,
00210 DIMSE_C_MOVE_RQ = 0x0021,
00211 DIMSE_C_MOVE_RSP = 0x8021,
00212 DIMSE_C_ECHO_RQ = 0x0030,
00213 DIMSE_C_ECHO_RSP = 0x8030,
00214 DIMSE_C_CANCEL_RQ = 0x0fff,
00215
00216
00217 DIMSE_N_EVENT_REPORT_RQ = 0x0100,
00218 DIMSE_N_EVENT_REPORT_RSP = 0x8100,
00219 DIMSE_N_GET_RQ = 0x0110,
00220 DIMSE_N_GET_RSP = 0x8110,
00221 DIMSE_N_SET_RQ = 0x0120,
00222 DIMSE_N_SET_RSP = 0x8120,
00223 DIMSE_N_ACTION_RQ = 0x0130,
00224 DIMSE_N_ACTION_RSP = 0x8130,
00225 DIMSE_N_CREATE_RQ = 0x0140,
00226 DIMSE_N_CREATE_RSP = 0x8140,
00227 DIMSE_N_DELETE_RQ = 0x0150,
00228 DIMSE_N_DELETE_RSP = 0x8150
00229 } T_DIMSE_Command;
00230
00231
00232
00233
00234
00235 typedef enum {
00236 DIMSE_DATASET_PRESENT = 0x0001,
00237 DIMSE_DATASET_NULL = 0x0101
00238 } T_DIMSE_DataSetType;
00239
00240
00241
00242
00243
00244 typedef enum {
00245 DIMSE_PRIORITY_LOW = 0x0002,
00246 DIMSE_PRIORITY_MEDIUM = 0x0000,
00247 DIMSE_PRIORITY_HIGH = 0x0001
00248 } T_DIMSE_Priority;
00249
00250
00251
00252
00253
00254 typedef enum {
00255 DIMSE_BLOCKING,
00256 DIMSE_NONBLOCKING
00257 } T_DIMSE_BlockingMode;
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267 struct T_DIMSE_C_StoreRQ {
00268 DIC_US MessageID;
00269 DIC_UI AffectedSOPClassUID;
00270 T_DIMSE_Priority Priority;
00271 T_DIMSE_DataSetType DataSetType;
00272 DIC_UI AffectedSOPInstanceUID;
00273 DIC_AE MoveOriginatorApplicationEntityTitle;
00274 DIC_US MoveOriginatorID;
00275
00276 unsigned int opts;
00277 #define O_STORE_MOVEORIGINATORAETITLE 0x0001
00278 #define O_STORE_MOVEORIGINATORID 0x0002
00279
00280
00281
00282
00283
00284 #define O_STORE_RQ_BLANK_PADDING 0x0008
00285 };
00286
00287 struct T_DIMSE_C_StoreRSP {
00288 DIC_US MessageIDBeingRespondedTo;
00289 DIC_UI AffectedSOPClassUID;
00290 T_DIMSE_DataSetType DataSetType;
00291 DIC_US DimseStatus;
00292 DIC_UI AffectedSOPInstanceUID;
00293 unsigned int opts;
00294 #define O_STORE_AFFECTEDSOPCLASSUID 0x0001
00295 #define O_STORE_AFFECTEDSOPINSTANCEUID 0x0002
00296
00297
00298
00299
00300 #define O_STORE_PEER_REQUIRES_EXACT_UID_COPY 0x0004
00301
00302 #define O_STORE_RSP_BLANK_PADDING 0x0008
00303 } ;
00304
00305
00306
00307 struct T_DIMSE_C_EchoRQ {
00308 DIC_US MessageID;
00309 DIC_UI AffectedSOPClassUID;
00310 T_DIMSE_DataSetType DataSetType;
00311 } ;
00312
00313 struct T_DIMSE_C_EchoRSP {
00314 DIC_US MessageIDBeingRespondedTo;
00315 DIC_UI AffectedSOPClassUID;
00316 T_DIMSE_DataSetType DataSetType;
00317 DIC_US DimseStatus;
00318 unsigned int opts;
00319 #define O_ECHO_AFFECTEDSOPCLASSUID 0x0001
00320 } ;
00321
00322
00323
00324 struct T_DIMSE_C_FindRQ {
00325 DIC_US MessageID;
00326 DIC_UI AffectedSOPClassUID;
00327 T_DIMSE_Priority Priority;
00328 T_DIMSE_DataSetType DataSetType;
00329
00330 } ;
00331
00332 struct T_DIMSE_C_FindRSP {
00333 DIC_US MessageIDBeingRespondedTo;
00334 DIC_UI AffectedSOPClassUID;
00335 T_DIMSE_DataSetType DataSetType;
00336 DIC_US DimseStatus;
00337
00338 unsigned int opts;
00339 #define O_FIND_AFFECTEDSOPCLASSUID 0x0001
00340 } ;
00341
00342
00343
00344 struct T_DIMSE_C_GetRQ {
00345 DIC_US MessageID;
00346 DIC_UI AffectedSOPClassUID;
00347 T_DIMSE_Priority Priority;
00348 T_DIMSE_DataSetType DataSetType;
00349
00350 } ;
00351
00352 struct T_DIMSE_C_GetRSP {
00353 DIC_US MessageIDBeingRespondedTo;
00354 DIC_UI AffectedSOPClassUID;
00355 T_DIMSE_DataSetType DataSetType;
00356 DIC_US DimseStatus;
00357 DIC_US NumberOfRemainingSubOperations;
00358 DIC_US NumberOfCompletedSubOperations;
00359 DIC_US NumberOfFailedSubOperations;
00360 DIC_US NumberOfWarningSubOperations;
00361 unsigned int opts;
00362 #define O_GET_AFFECTEDSOPCLASSUID 0x0001
00363 #define O_GET_NUMBEROFREMAININGSUBOPERATIONS 0x0002
00364 #define O_GET_NUMBEROFCOMPLETEDSUBOPERATIONS 0x0004
00365 #define O_GET_NUMBEROFFAILEDSUBOPERATIONS 0x0008
00366 #define O_GET_NUMBEROFWARNINGSUBOPERATIONS 0x0010
00367 } ;
00368
00369
00370
00371 struct T_DIMSE_C_MoveRQ {
00372 DIC_US MessageID;
00373 DIC_UI AffectedSOPClassUID;
00374 T_DIMSE_Priority Priority;
00375 T_DIMSE_DataSetType DataSetType;
00376 DIC_AE MoveDestination;
00377
00378 } ;
00379
00380 struct T_DIMSE_C_MoveRSP {
00381 DIC_US MessageIDBeingRespondedTo;
00382 DIC_UI AffectedSOPClassUID;
00383 T_DIMSE_DataSetType DataSetType;
00384 DIC_US DimseStatus;
00385 DIC_US NumberOfRemainingSubOperations;
00386 DIC_US NumberOfCompletedSubOperations;
00387 DIC_US NumberOfFailedSubOperations;
00388 DIC_US NumberOfWarningSubOperations;
00389 unsigned int opts;
00390 #define O_MOVE_AFFECTEDSOPCLASSUID 0x0001
00391 #define O_MOVE_NUMBEROFREMAININGSUBOPERATIONS 0x0002
00392 #define O_MOVE_NUMBEROFCOMPLETEDSUBOPERATIONS 0x0004
00393 #define O_MOVE_NUMBEROFFAILEDSUBOPERATIONS 0x0008
00394 #define O_MOVE_NUMBEROFWARNINGSUBOPERATIONS 0x0010
00395 } ;
00396
00397
00398
00399
00400 struct T_DIMSE_C_CancelRQ {
00401 DIC_US MessageIDBeingRespondedTo;
00402 T_DIMSE_DataSetType DataSetType;
00403 } ;
00404
00405
00406
00407
00408 struct T_DIMSE_N_EventReportRQ {
00409 DIC_US MessageID;
00410 DIC_UI AffectedSOPClassUID;
00411 DIC_UI AffectedSOPInstanceUID;
00412 T_DIMSE_DataSetType DataSetType;
00413 DIC_US EventTypeID;
00414
00415 } ;
00416
00417 struct T_DIMSE_N_EventReportRSP {
00418 DIC_US MessageIDBeingRespondedTo;
00419 DIC_UI AffectedSOPClassUID;
00420 DIC_US DimseStatus;
00421 DIC_UI AffectedSOPInstanceUID;
00422 T_DIMSE_DataSetType DataSetType;
00423 DIC_US EventTypeID;
00424
00425 unsigned int opts;
00426 #define O_NEVENTREPORT_AFFECTEDSOPCLASSUID 0x0001
00427 #define O_NEVENTREPORT_AFFECTEDSOPINSTANCEUID 0x0002
00428 #define O_NEVENTREPORT_EVENTTYPEID 0x0004
00429 } ;
00430
00431
00432
00433 struct T_DIMSE_N_GetRQ {
00434 DIC_US MessageID;
00435 DIC_UI RequestedSOPClassUID;
00436 DIC_UI RequestedSOPInstanceUID;
00437 T_DIMSE_DataSetType DataSetType;
00438
00439
00440
00441
00442
00443
00444 int ListCount;
00445 DIC_US *AttributeIdentifierList;
00446 } ;
00447
00448 struct T_DIMSE_N_GetRSP {
00449 DIC_US MessageIDBeingRespondedTo;
00450 DIC_UI AffectedSOPClassUID;
00451 DIC_US DimseStatus;
00452 DIC_UI AffectedSOPInstanceUID;
00453 T_DIMSE_DataSetType DataSetType;
00454
00455 unsigned int opts;
00456 #define O_NGET_AFFECTEDSOPCLASSUID 0x0001
00457 #define O_NGET_AFFECTEDSOPINSTANCEUID 0x0002
00458 } ;
00459
00460
00461
00462 struct T_DIMSE_N_SetRQ {
00463 DIC_US MessageID;
00464 DIC_UI RequestedSOPClassUID;
00465 DIC_UI RequestedSOPInstanceUID;
00466 T_DIMSE_DataSetType DataSetType;
00467
00468 } ;
00469
00470 struct T_DIMSE_N_SetRSP {
00471 DIC_US MessageIDBeingRespondedTo;
00472 DIC_UI AffectedSOPClassUID;
00473 DIC_US DimseStatus;
00474 DIC_UI AffectedSOPInstanceUID;
00475 T_DIMSE_DataSetType DataSetType;
00476
00477 unsigned int opts;
00478 #define O_NSET_AFFECTEDSOPCLASSUID 0x0001
00479 #define O_NSET_AFFECTEDSOPINSTANCEUID 0x0002
00480 } ;
00481
00482
00483
00484 struct T_DIMSE_N_ActionRQ {
00485 DIC_US MessageID;
00486 DIC_UI RequestedSOPClassUID;
00487 DIC_UI RequestedSOPInstanceUID;
00488 DIC_US ActionTypeID;
00489 T_DIMSE_DataSetType DataSetType;
00490
00491 } ;
00492
00493 struct T_DIMSE_N_ActionRSP {
00494 DIC_US MessageIDBeingRespondedTo;
00495 DIC_UI AffectedSOPClassUID;
00496 DIC_US DimseStatus;
00497 DIC_UI AffectedSOPInstanceUID;
00498 DIC_US ActionTypeID;
00499 T_DIMSE_DataSetType DataSetType;
00500
00501 unsigned int opts;
00502 #define O_NACTION_AFFECTEDSOPCLASSUID 0x0001
00503 #define O_NACTION_AFFECTEDSOPINSTANCEUID 0x0002
00504 #define O_NACTION_ACTIONTYPEID 0x0004
00505 } ;
00506
00507
00508
00509 struct T_DIMSE_N_CreateRQ {
00510 DIC_US MessageID;
00511 DIC_UI AffectedSOPClassUID;
00512 DIC_UI AffectedSOPInstanceUID;
00513 T_DIMSE_DataSetType DataSetType;
00514
00515 unsigned int opts;
00516 #define O_NCREATE_AFFECTEDSOPINSTANCEUID 0x0002
00517 } ;
00518
00519 struct T_DIMSE_N_CreateRSP {
00520 DIC_US MessageIDBeingRespondedTo;
00521 DIC_UI AffectedSOPClassUID;
00522 DIC_US DimseStatus;
00523 DIC_UI AffectedSOPInstanceUID;
00524 T_DIMSE_DataSetType DataSetType;
00525
00526 unsigned int opts;
00527 #define O_NCREATE_AFFECTEDSOPCLASSUID 0x0001
00528 #define O_NCREATE_AFFECTEDSOPINSTANCEUID 0x0002
00529 } ;
00530
00531
00532
00533 struct T_DIMSE_N_DeleteRQ {
00534 DIC_US MessageID;
00535 DIC_UI RequestedSOPClassUID;
00536 DIC_UI RequestedSOPInstanceUID;
00537 T_DIMSE_DataSetType DataSetType;
00538 } ;
00539
00540 struct T_DIMSE_N_DeleteRSP {
00541 DIC_US MessageIDBeingRespondedTo;
00542 DIC_UI AffectedSOPClassUID;
00543 DIC_US DimseStatus;
00544 DIC_UI AffectedSOPInstanceUID;
00545 T_DIMSE_DataSetType DataSetType;
00546 unsigned int opts;
00547 #define O_NDELETE_AFFECTEDSOPCLASSUID 0x0001
00548 #define O_NDELETE_AFFECTEDSOPINSTANCEUID 0x0002
00549 } ;
00550
00551
00552
00553
00554
00555
00556
00557 struct T_DIMSE_Message {
00558 T_DIMSE_Command CommandField;
00559
00560 union {
00561
00562 T_DIMSE_C_StoreRQ CStoreRQ;
00563 T_DIMSE_C_EchoRQ CEchoRQ;
00564 T_DIMSE_C_FindRQ CFindRQ;
00565 T_DIMSE_C_GetRQ CGetRQ;
00566 T_DIMSE_C_MoveRQ CMoveRQ;
00567 T_DIMSE_C_CancelRQ CCancelRQ;
00568 T_DIMSE_N_EventReportRQ NEventReportRQ;
00569 T_DIMSE_N_GetRQ NGetRQ;
00570 T_DIMSE_N_SetRQ NSetRQ;
00571 T_DIMSE_N_ActionRQ NActionRQ;
00572 T_DIMSE_N_CreateRQ NCreateRQ;
00573 T_DIMSE_N_DeleteRQ NDeleteRQ;
00574
00575
00576 T_DIMSE_C_StoreRSP CStoreRSP;
00577 T_DIMSE_C_EchoRSP CEchoRSP;
00578 T_DIMSE_C_FindRSP CFindRSP;
00579 T_DIMSE_C_GetRSP CGetRSP;
00580 T_DIMSE_C_MoveRSP CMoveRSP;
00581 T_DIMSE_N_EventReportRSP NEventReportRSP;
00582 T_DIMSE_N_GetRSP NGetRSP;
00583 T_DIMSE_N_SetRSP NSetRSP;
00584 T_DIMSE_N_ActionRSP NActionRSP;
00585 T_DIMSE_N_CreateRSP NCreateRSP;
00586 T_DIMSE_N_DeleteRSP NDeleteRSP;
00587 } msg;
00588
00589 };
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601 extern E_GrpLenEncoding g_dimse_send_groupLength_encoding;
00602 extern E_EncodingType g_dimse_send_sequenceType_encoding;
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615 extern OFBool g_dimse_save_dimse_data;
00616
00617
00618
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637
00638
00639
00640
00641
00642
00643
00644
00645
00646
00647
00648 OFCondition
00649 DIMSE_echoUser(
00650
00651 T_ASC_Association *assoc, DIC_US msgId,
00652
00653 T_DIMSE_BlockingMode blockMode, int timeout,
00654
00655 DIC_US *status, DcmDataset **statusDetail);
00656
00657 OFCondition
00658 DIMSE_sendEchoResponse(T_ASC_Association * assoc,
00659 T_ASC_PresentationContextID presID,
00660 T_DIMSE_C_EchoRQ *request, DIC_US status, DcmDataset *statusDetail);
00661
00662
00663
00664
00665
00666
00667 typedef enum {
00668 DIMSE_StoreBegin,
00669 DIMSE_StoreProgressing,
00670 DIMSE_StoreEnd
00671 } T_DIMSE_StoreProgressState;
00672
00673 struct T_DIMSE_StoreProgress {
00674 T_DIMSE_StoreProgressState state;
00675 long callbackCount;
00676 long progressBytes;
00677 long totalBytes;
00678 } ;
00679
00680
00681 typedef void (*DIMSE_StoreUserCallback)(
00682 void *callbackData,
00683 T_DIMSE_StoreProgress *progress,
00684 T_DIMSE_C_StoreRQ *request
00685 );
00686
00687 struct T_DIMSE_DetectedCancelParameters {
00688 OFBool cancelEncountered;
00689 T_ASC_PresentationContextID presId;
00690 T_DIMSE_C_CancelRQ req;
00691 } ;
00692
00693 OFCondition
00694 DIMSE_storeUser(
00695
00696 T_ASC_Association *assoc, T_ASC_PresentationContextID presId,
00697 T_DIMSE_C_StoreRQ *request,
00698 const char *imageFileName, DcmDataset *imageDataSet,
00699 DIMSE_StoreUserCallback callback, void *callbackData,
00700
00701 T_DIMSE_BlockingMode blockMode, int timeout,
00702
00703 T_DIMSE_C_StoreRSP *response,
00704 DcmDataset **statusDetail,
00705 T_DIMSE_DetectedCancelParameters *checkForCancelParams = NULL,
00706
00707 long imageFileTotalBytes=0);
00708
00709 typedef void (*DIMSE_StoreProviderCallback)(
00710
00711 void *callbackData,
00712 T_DIMSE_StoreProgress *progress,
00713 T_DIMSE_C_StoreRQ *request,
00714 char *imageFileName, DcmDataset **imageDataSet,
00715
00716 T_DIMSE_C_StoreRSP *response,
00717
00718 DcmDataset **statusDetail);
00719
00720 OFCondition
00721 DIMSE_storeProvider(
00722 T_ASC_Association *assoc,
00723 T_ASC_PresentationContextID presIdCmd,
00724 T_DIMSE_C_StoreRQ *request,
00725 const char* imageFileName, int writeMetaheader,
00726 DcmDataset **imageDataSet,
00727 DIMSE_StoreProviderCallback callback, void *callbackData,
00728
00729 T_DIMSE_BlockingMode blockMode, int timeout);
00730
00731 OFCondition
00732 DIMSE_sendStoreResponse(T_ASC_Association * assoc,
00733 T_ASC_PresentationContextID presID,
00734 T_DIMSE_C_StoreRQ *request,
00735 T_DIMSE_C_StoreRSP *response,
00736 DcmDataset *statusDetail);
00737
00738
00739
00740
00741
00742
00743 typedef void (*DIMSE_FindUserCallback)(
00744
00745 void *callbackData,
00746 T_DIMSE_C_FindRQ *request,
00747 int responseCount,
00748 T_DIMSE_C_FindRSP *response,
00749 DcmDataset *responseIdentifiers
00750 );
00751
00752 OFCondition
00753 DIMSE_findUser(
00754
00755 T_ASC_Association *assoc,
00756 T_ASC_PresentationContextID presID,
00757 T_DIMSE_C_FindRQ *request, DcmDataset *requestIdentifiers,
00758 DIMSE_FindUserCallback callback, void *callbackData,
00759
00760 T_DIMSE_BlockingMode blockMode, int timeout,
00761
00762 T_DIMSE_C_FindRSP *response, DcmDataset **statusDetail);
00763
00764 typedef void (*DIMSE_FindProviderCallback)(
00765
00766 void *callbackData,
00767 OFBool cancelled, T_DIMSE_C_FindRQ *request,
00768 DcmDataset *requestIdentifiers, int responseCount,
00769
00770 T_DIMSE_C_FindRSP *response,
00771 DcmDataset **responseIdentifiers,
00772 DcmDataset **statusDetail);
00773
00774 OFCondition
00775 DIMSE_findProvider(
00776
00777 T_ASC_Association *assoc,
00778 T_ASC_PresentationContextID presIdCmd,
00779 T_DIMSE_C_FindRQ *request,
00780 DIMSE_FindProviderCallback callback, void *callbackData,
00781
00782 T_DIMSE_BlockingMode blockMode, int timeout);
00783
00784 OFCondition
00785 DIMSE_sendFindResponse(T_ASC_Association * assoc,
00786 T_ASC_PresentationContextID presID,
00787 T_DIMSE_C_FindRQ *request,
00788 T_DIMSE_C_FindRSP *response, DcmDataset *responseIdentifiers,
00789 DcmDataset *statusDetail);
00790
00791
00792
00793
00794
00795 typedef void (*DIMSE_MoveUserCallback)(
00796
00797 void *callbackData,
00798 T_DIMSE_C_MoveRQ *request,
00799 int responseCount, T_DIMSE_C_MoveRSP *response);
00800
00801 typedef void (*DIMSE_SubOpProviderCallback)(void *subOpCallbackData,
00802 T_ASC_Network *net, T_ASC_Association **subOpAssoc);
00803
00804 OFCondition
00805 DIMSE_moveUser(
00806
00807 T_ASC_Association *assoc,
00808 T_ASC_PresentationContextID presID,
00809 T_DIMSE_C_MoveRQ *request,
00810 DcmDataset *requestIdentifiers,
00811 DIMSE_MoveUserCallback callback, void *callbackData,
00812
00813 T_DIMSE_BlockingMode blockMode, int timeout,
00814
00815 T_ASC_Network *net,
00816 DIMSE_SubOpProviderCallback subOpCallback, void *subOpCallbackData,
00817
00818 T_DIMSE_C_MoveRSP *response, DcmDataset **statusDetail,
00819 DcmDataset **responseIdentifers,
00820 OFBool ignorePendingDatasets = OFFalse);
00821
00822 typedef void (*DIMSE_MoveProviderCallback)(
00823
00824 void *callbackData,
00825 OFBool cancelled, T_DIMSE_C_MoveRQ *request,
00826 DcmDataset *requestIdentifiers, int responseCount,
00827
00828 T_DIMSE_C_MoveRSP *response, DcmDataset **statusDetail,
00829 DcmDataset **responseIdentifiers);
00830
00831 OFCondition
00832 DIMSE_moveProvider(
00833
00834 T_ASC_Association *assoc,
00835 T_ASC_PresentationContextID presIdCmd,
00836 T_DIMSE_C_MoveRQ *request,
00837 DIMSE_MoveProviderCallback callback, void *callbackData,
00838
00839 T_DIMSE_BlockingMode blockMode, int timeout);
00840
00841 OFCondition
00842 DIMSE_sendMoveResponse(T_ASC_Association * assoc,
00843 T_ASC_PresentationContextID presID, T_DIMSE_C_MoveRQ *request,
00844 T_DIMSE_C_MoveRSP *response, DcmDataset *rspIds,
00845 DcmDataset *statusDetail);
00846
00847
00848
00849
00850
00851 typedef void (*DIMSE_GetUserCallback)(
00852
00853 void *callbackData,
00854 T_DIMSE_C_GetRQ *request,
00855 int responseCount, T_DIMSE_C_GetRSP *response);
00856
00857 typedef void (*DIMSE_SubOpProviderCallback)(void *subOpCallbackData,
00858 T_ASC_Network *net, T_ASC_Association **subOpAssoc);
00859
00860 OFCondition
00861 DIMSE_getUser(
00862
00863 T_ASC_Association *assoc,
00864 T_ASC_PresentationContextID presID,
00865 T_DIMSE_C_GetRQ *request,
00866 DcmDataset *requestIdentifiers,
00867 DIMSE_GetUserCallback callback, void *callbackData,
00868
00869 T_DIMSE_BlockingMode blockMode, int timeout,
00870
00871 T_ASC_Network *net,
00872 DIMSE_SubOpProviderCallback subOpCallback, void *subOpCallbackData,
00873
00874 T_DIMSE_C_GetRSP *response, DcmDataset **statusDetail,
00875 DcmDataset **responseIdentifers);
00876
00877 typedef void (*DIMSE_GetProviderCallback)(
00878
00879 void *callbackData,
00880 OFBool cancelled, T_DIMSE_C_GetRQ *request,
00881 DcmDataset *requestIdentifiers, int responseCount,
00882
00883 T_DIMSE_C_GetRSP *response, DcmDataset **statusDetail,
00884 DcmDataset **responseIdentifiers);
00885
00886 OFCondition
00887 DIMSE_getProvider(
00888
00889 T_ASC_Association *assoc,
00890 T_ASC_PresentationContextID presIdCmd,
00891 T_DIMSE_C_GetRQ *request,
00892 DIMSE_GetProviderCallback callback, void *callbackData,
00893
00894 T_DIMSE_BlockingMode blockMode, int timeout);
00895
00896 OFCondition
00897 DIMSE_sendGetResponse(T_ASC_Association * assoc,
00898 T_ASC_PresentationContextID presID, T_DIMSE_C_GetRQ *request,
00899 T_DIMSE_C_GetRSP *response, DcmDataset *rspIds,
00900 DcmDataset *statusDetail);
00901
00902
00903
00904
00905
00906 OFCondition
00907 DIMSE_sendCancelRequest(T_ASC_Association * assoc,
00908 T_ASC_PresentationContextID presId, DIC_US msgId);
00909
00910 OFCondition
00911 DIMSE_checkForCancelRQ(T_ASC_Association * assoc,
00912 T_ASC_PresentationContextID presId, DIC_US msgId);
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927
00928 typedef void (*DIMSE_ProgressCallback)(void *callbackContext,
00929 unsigned long byteCount);
00930
00931
00932 OFCondition
00933 DIMSE_sendMessageUsingFileData(T_ASC_Association *association,
00934 T_ASC_PresentationContextID presID,
00935 T_DIMSE_Message *msg, DcmDataset *statusDetail,
00936 const char* dataFileName,
00937 DIMSE_ProgressCallback callback,
00938 void *callbackContext,
00939 DcmDataset **commandSet=NULL);
00940
00941 OFCondition
00942 DIMSE_sendMessageUsingMemoryData(T_ASC_Association *association,
00943 T_ASC_PresentationContextID presID,
00944 T_DIMSE_Message *msg, DcmDataset *statusDetail,
00945 DcmDataset *dataObject,
00946 DIMSE_ProgressCallback callback,
00947 void *callbackContext,
00948 DcmDataset **commandSet=NULL);
00949
00950 OFCondition
00951 DIMSE_receiveCommand(T_ASC_Association *association,
00952 T_DIMSE_BlockingMode blocking,
00953 int timeout,
00954 T_ASC_PresentationContextID *presID,
00955 T_DIMSE_Message *msg,
00956 DcmDataset **statusDetail,
00957 DcmDataset **commandSet=NULL);
00958
00959 OFCondition
00960 DIMSE_receiveDataSetInMemory(T_ASC_Association *association,
00961 T_DIMSE_BlockingMode blocking,
00962 int timeout,
00963 T_ASC_PresentationContextID *presID,
00964 DcmDataset **dataObject,
00965 DIMSE_ProgressCallback callback,
00966 void *callbackContext);
00967
00968 OFCondition
00969 DIMSE_createFilestream(
00970
00971 const char *filename,
00972 const T_DIMSE_C_StoreRQ *request,
00973 const T_ASC_Association *assoc,
00974 T_ASC_PresentationContextID presIdCmd,
00975 int writeMetaheader,
00976
00977 DcmOutputFileStream **filestream);
00978
00979 OFCondition
00980 DIMSE_receiveDataSetInFile(T_ASC_Association *assoc,
00981 T_DIMSE_BlockingMode blocking, int timeout,
00982 T_ASC_PresentationContextID *presID,
00983 DcmOutputStream *filestream,
00984 DIMSE_ProgressCallback callback, void *callbackData);
00985
00986 OFCondition
00987 DIMSE_ignoreDataSet( T_ASC_Association * assoc,
00988 T_DIMSE_BlockingMode blocking,
00989 int timeout,
00990 DIC_UL * bytesRead,
00991 DIC_UL * pdvCount);
00992
00993
00994
00995
00996
00997 void DIMSE_debug(int level);
00998
00999
01000 void DIMSE_warning(T_ASC_Association *assoc, const char *format, ...);
01001
01002
01003 void DIMSE_printCommand(FILE *f, T_DIMSE_Message *msg);
01004 void DIMSE_printCEchoRQ(FILE * f, T_DIMSE_C_EchoRQ * req);
01005 void DIMSE_printCEchoRSP(FILE * f, T_DIMSE_C_EchoRSP * rsp);
01006 void DIMSE_printCStoreRQ(FILE * f, T_DIMSE_C_StoreRQ * req);
01007 void DIMSE_printCStoreRSP(FILE * f, T_DIMSE_C_StoreRSP * rsp);
01008 void DIMSE_printCGetRQ(FILE * f, T_DIMSE_C_GetRQ * req);
01009 void DIMSE_printCGetRSP(FILE * f, T_DIMSE_C_GetRSP * rsp);
01010 void DIMSE_printCMoveRQ(FILE * f, T_DIMSE_C_MoveRQ * req);
01011 void DIMSE_printCMoveRSP(FILE * f, T_DIMSE_C_MoveRSP * rsp);
01012 void DIMSE_printCFindRQ(FILE * f, T_DIMSE_C_FindRQ * req);
01013 void DIMSE_printCFindRSP(FILE * f, T_DIMSE_C_FindRSP * rsp);
01014 void DIMSE_printCCancelRQ(FILE * f, T_DIMSE_C_CancelRQ * req);
01015 void DIMSE_printNEventReportRQ(FILE * f, T_DIMSE_N_EventReportRQ * req);
01016 void DIMSE_printNEventReportRSP(FILE * f, T_DIMSE_N_EventReportRSP * rsp);
01017 void DIMSE_printNGetRQ(FILE * f, T_DIMSE_N_GetRQ * req);
01018 void DIMSE_printNGetRSP(FILE * f, T_DIMSE_N_GetRSP * rsp);
01019 void DIMSE_printNSetRQ(FILE * f, T_DIMSE_N_SetRQ * req);
01020 void DIMSE_printNSetRSP(FILE * f, T_DIMSE_N_SetRSP * rsp);
01021 void DIMSE_printNActionRQ(FILE * f, T_DIMSE_N_ActionRQ * req);
01022 void DIMSE_printNActionRSP(FILE * f, T_DIMSE_N_ActionRSP * rsp);
01023 void DIMSE_printNCreateRQ(FILE * f, T_DIMSE_N_CreateRQ * req);
01024 void DIMSE_printNCreateRSP(FILE * f, T_DIMSE_N_CreateRSP * rsp);
01025 void DIMSE_printNDeleteRQ(FILE * f, T_DIMSE_N_DeleteRQ * req);
01026 void DIMSE_printNDeleteRSP(FILE * f, T_DIMSE_N_DeleteRSP * rsp);
01027
01028 void DIMSE_printMessage(ostream& outstream, T_DIMSE_Message &msg, DcmItem *dataset=NULL);
01029
01030
01031 #endif
01032
01033
01034
01035
01036
01037
01038
01039
01040
01041
01042
01043
01044
01045
01046
01047
01048
01049
01050
01051
01052
01053
01054
01055
01056
01057
01058
01059
01060
01061
01062
01063
01064
01065
01066
01067
01068
01069
01070
01071
01072
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087
01088
01089
01090
01091
01092
01093
01094
01095
01096
01097
01098
01099
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110