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 #ifndef DCMQRCBG_H
00035 #define DCMQRCBG_H
00036
00037 #include "dcmtk/config/osconfig.h"
00038 #include "dcmtk/dcmnet/dimse.h"
00039
00040 class DcmQueryRetrieveDatabaseHandle;
00041 class DcmQueryRetrieveOptions;
00042 class DcmQueryRetrieveDatabaseStatus;
00043
00047 class DcmQueryRetrieveGetContext
00048 {
00049 public:
00059 DcmQueryRetrieveGetContext(DcmQueryRetrieveDatabaseHandle& handle,
00060 const DcmQueryRetrieveOptions& options,
00061 DIC_US priorstatus,
00062 T_ASC_Association *origassoc,
00063 DIC_US origmsgid,
00064 T_DIMSE_Priority prior,
00065 T_ASC_PresentationContextID origpresid)
00066 : dbHandle(handle)
00067 , options_(options)
00068 , priorStatus(priorstatus)
00069 , origAssoc(origassoc)
00070 , assocStarted(OFFalse)
00071 , origPresId(origpresid)
00072 , origMsgId(origmsgid)
00073
00074
00075 , priority(prior)
00076
00077 , failedUIDs(NULL)
00078 , nRemaining(0)
00079 , nCompleted(0)
00080 , nFailed(0)
00081 , nWarning(0)
00082 , getCancelled(OFFalse)
00083 {
00084 origAETitle[0] = '\0';
00085 origHostName[0] = '\0';
00086 ourAETitle[0] = '\0';
00087 }
00088
00090 OFBool isVerbose() const;
00091
00095 void setOurAETitle(const char *ae)
00096 {
00097 if (ae) ourAETitle = ae; else ourAETitle.clear();
00098 }
00099
00109 void callbackHandler(
00110
00111 OFBool cancelled, T_DIMSE_C_GetRQ *request,
00112 DcmDataset *requestIdentifiers, int responseCount,
00113
00114 T_DIMSE_C_GetRSP *response, DcmDataset **stDetail,
00115 DcmDataset **responseIdentifiers);
00116
00117 private:
00118
00119 void addFailedUIDInstance(const char *sopInstance);
00120 OFCondition performGetSubOp(DIC_UI sopClass, DIC_UI sopInstance, char *fname);
00121 void getNextImage(DcmQueryRetrieveDatabaseStatus * dbStatus);
00122 void buildFailedInstanceList(DcmDataset ** rspIds);
00123
00125 DcmQueryRetrieveDatabaseHandle& dbHandle;
00126
00128 const DcmQueryRetrieveOptions& options_;
00129
00131 DIC_US priorStatus;
00132
00134 T_ASC_Association *origAssoc;
00135
00137 OFBool assocStarted;
00138
00140 T_ASC_PresentationContextID origPresId;
00141
00143 DIC_US origMsgId;
00144
00146 OFString origAETitle;
00147
00149 DIC_NODENAME origHostName;
00150
00151
00153 T_DIMSE_Priority priority;
00154
00156 OFString ourAETitle;
00157
00159 char *failedUIDs;
00160
00162 DIC_US nRemaining;
00163
00165 DIC_US nCompleted;
00166
00168 DIC_US nFailed;
00169
00171 DIC_US nWarning;
00172
00174 OFBool getCancelled;
00175
00176 };
00177
00178 #endif
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197