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 "osconfig.h"
00078
00079
#include "dicom.h"
00080
#include "lst.h"
00081
#include "cond.h"
00082
#include "dul.h"
00083
#include "assoc.h"
00084
#include "dcdatset.h"
00085
#include "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
00821
typedef void (*DIMSE_MoveProviderCallback)(
00822
00823
void *callbackData,
00824 OFBool cancelled, T_DIMSE_C_MoveRQ *request,
00825
DcmDataset *requestIdentifiers,
int responseCount,
00826
00827 T_DIMSE_C_MoveRSP *response,
DcmDataset **statusDetail,
00828
DcmDataset **responseIdentifiers);
00829
00830
OFCondition
00831 DIMSE_moveProvider(
00832
00833 T_ASC_Association *assoc,
00834 T_ASC_PresentationContextID presIdCmd,
00835 T_DIMSE_C_MoveRQ *request,
00836 DIMSE_MoveProviderCallback callback,
void *callbackData,
00837
00838 T_DIMSE_BlockingMode blockMode,
int timeout);
00839
00840
OFCondition
00841 DIMSE_sendMoveResponse(T_ASC_Association * assoc,
00842 T_ASC_PresentationContextID presID, T_DIMSE_C_MoveRQ *request,
00843 T_DIMSE_C_MoveRSP *response,
DcmDataset *rspIds,
00844
DcmDataset *statusDetail);
00845
00846
00847
00848
00849
00850
typedef void (*DIMSE_GetUserCallback)(
00851
00852
void *callbackData,
00853 T_DIMSE_C_GetRQ *request,
00854
int responseCount, T_DIMSE_C_GetRSP *response);
00855
00856
typedef void (*DIMSE_SubOpProviderCallback)(
void *subOpCallbackData,
00857 T_ASC_Network *net, T_ASC_Association **subOpAssoc);
00858
00859
OFCondition
00860 DIMSE_getUser(
00861
00862 T_ASC_Association *assoc,
00863 T_ASC_PresentationContextID presID,
00864 T_DIMSE_C_GetRQ *request,
00865
DcmDataset *requestIdentifiers,
00866 DIMSE_GetUserCallback callback,
void *callbackData,
00867
00868 T_DIMSE_BlockingMode blockMode,
int timeout,
00869
00870 T_ASC_Network *net,
00871 DIMSE_SubOpProviderCallback subOpCallback,
void *subOpCallbackData,
00872
00873 T_DIMSE_C_GetRSP *response,
DcmDataset **statusDetail,
00874
DcmDataset **responseIdentifers);
00875
00876
typedef void (*DIMSE_GetProviderCallback)(
00877
00878
void *callbackData,
00879 OFBool cancelled, T_DIMSE_C_GetRQ *request,
00880
DcmDataset *requestIdentifiers,
int responseCount,
00881
00882 T_DIMSE_C_GetRSP *response,
DcmDataset **statusDetail,
00883
DcmDataset **responseIdentifiers);
00884
00885
OFCondition
00886 DIMSE_getProvider(
00887
00888 T_ASC_Association *assoc,
00889 T_ASC_PresentationContextID presIdCmd,
00890 T_DIMSE_C_GetRQ *request,
00891 DIMSE_GetProviderCallback callback,
void *callbackData,
00892
00893 T_DIMSE_BlockingMode blockMode,
int timeout);
00894
00895
OFCondition
00896 DIMSE_sendGetResponse(T_ASC_Association * assoc,
00897 T_ASC_PresentationContextID presID, T_DIMSE_C_GetRQ *request,
00898 T_DIMSE_C_GetRSP *response,
DcmDataset *rspIds,
00899
DcmDataset *statusDetail);
00900
00901
00902
00903
00904
00905
OFCondition
00906 DIMSE_sendCancelRequest(T_ASC_Association * assoc,
00907 T_ASC_PresentationContextID presId, DIC_US msgId);
00908
00909
OFCondition
00910 DIMSE_checkForCancelRQ(T_ASC_Association * assoc,
00911 T_ASC_PresentationContextID presId, DIC_US msgId);
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925
00926
00927
typedef void (*DIMSE_ProgressCallback)(
void *callbackContext,
00928
unsigned long byteCount);
00929
00930
00931
OFCondition
00932 DIMSE_sendMessageUsingFileData(T_ASC_Association *association,
00933 T_ASC_PresentationContextID presID,
00934 T_DIMSE_Message *msg,
DcmDataset *statusDetail,
00935
const char* dataFileName,
00936 DIMSE_ProgressCallback callback,
00937
void *callbackContext,
00938
DcmDataset **commandSet=NULL);
00939
00940
OFCondition
00941 DIMSE_sendMessageUsingMemoryData(T_ASC_Association *association,
00942 T_ASC_PresentationContextID presID,
00943 T_DIMSE_Message *msg,
DcmDataset *statusDetail,
00944
DcmDataset *dataObject,
00945 DIMSE_ProgressCallback callback,
00946
void *callbackContext,
00947
DcmDataset **commandSet=NULL);
00948
00949
OFCondition
00950 DIMSE_receiveCommand(T_ASC_Association *association,
00951 T_DIMSE_BlockingMode blocking,
00952
int timeout,
00953 T_ASC_PresentationContextID *presID,
00954 T_DIMSE_Message *msg,
00955
DcmDataset **statusDetail,
00956
DcmDataset **commandSet=NULL);
00957
00958
OFCondition
00959 DIMSE_receiveDataSetInMemory(T_ASC_Association *association,
00960 T_DIMSE_BlockingMode blocking,
00961
int timeout,
00962 T_ASC_PresentationContextID *presID,
00963
DcmDataset **dataObject,
00964 DIMSE_ProgressCallback callback,
00965
void *callbackContext);
00966
00967
OFCondition
00968 DIMSE_createFilestream(
00969
00970
const char *filename,
00971
const T_DIMSE_C_StoreRQ *request,
00972
const T_ASC_Association *assoc,
00973 T_ASC_PresentationContextID presIdCmd,
00974
int writeMetaheader,
00975
00976
DcmOutputFileStream **filestream);
00977
00978
OFCondition
00979 DIMSE_receiveDataSetInFile(T_ASC_Association *assoc,
00980 T_DIMSE_BlockingMode blocking,
int timeout,
00981 T_ASC_PresentationContextID *presID,
00982
DcmOutputStream *filestream,
00983 DIMSE_ProgressCallback callback,
void *callbackData);
00984
00985
00986
00987
00988
00989
void DIMSE_debug(
int level);
00990
00991
00992
void DIMSE_warning(T_ASC_Association *assoc,
const char *format, ...);
00993
00994
00995
void DIMSE_printCommand(FILE *f, T_DIMSE_Message *msg);
00996
void DIMSE_printCEchoRQ(FILE * f, T_DIMSE_C_EchoRQ * req);
00997
void DIMSE_printCEchoRSP(FILE * f, T_DIMSE_C_EchoRSP * rsp);
00998
void DIMSE_printCStoreRQ(FILE * f, T_DIMSE_C_StoreRQ * req);
00999
void DIMSE_printCStoreRSP(FILE * f, T_DIMSE_C_StoreRSP * rsp);
01000
void DIMSE_printCGetRQ(FILE * f, T_DIMSE_C_GetRQ * req);
01001
void DIMSE_printCGetRSP(FILE * f, T_DIMSE_C_GetRSP * rsp);
01002
void DIMSE_printCMoveRQ(FILE * f, T_DIMSE_C_MoveRQ * req);
01003
void DIMSE_printCMoveRSP(FILE * f, T_DIMSE_C_MoveRSP * rsp);
01004
void DIMSE_printCFindRQ(FILE * f, T_DIMSE_C_FindRQ * req);
01005
void DIMSE_printCFindRSP(FILE * f, T_DIMSE_C_FindRSP * rsp);
01006
void DIMSE_printCCancelRQ(FILE * f, T_DIMSE_C_CancelRQ * req);
01007
void DIMSE_printNEventReportRQ(FILE * f, T_DIMSE_N_EventReportRQ * req);
01008
void DIMSE_printNEventReportRSP(FILE * f, T_DIMSE_N_EventReportRSP * rsp);
01009
void DIMSE_printNGetRQ(FILE * f, T_DIMSE_N_GetRQ * req);
01010
void DIMSE_printNGetRSP(FILE * f, T_DIMSE_N_GetRSP * rsp);
01011
void DIMSE_printNSetRQ(FILE * f, T_DIMSE_N_SetRQ * req);
01012
void DIMSE_printNSetRSP(FILE * f, T_DIMSE_N_SetRSP * rsp);
01013
void DIMSE_printNActionRQ(FILE * f, T_DIMSE_N_ActionRQ * req);
01014
void DIMSE_printNActionRSP(FILE * f, T_DIMSE_N_ActionRSP * rsp);
01015
void DIMSE_printNCreateRQ(FILE * f, T_DIMSE_N_CreateRQ * req);
01016
void DIMSE_printNCreateRSP(FILE * f, T_DIMSE_N_CreateRSP * rsp);
01017
void DIMSE_printNDeleteRQ(FILE * f, T_DIMSE_N_DeleteRQ * req);
01018
void DIMSE_printNDeleteRSP(FILE * f, T_DIMSE_N_DeleteRSP * rsp);
01019
01020
void DIMSE_printMessage(ostream& outstream, T_DIMSE_Message &msg,
DcmItem *dataset=NULL);
01021
01022
01023
#endif
01024
01025
01026
01027
01028
01029
01030
01031
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