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 #ifndef DCMQRCBG_H
00030 #define DCMQRCBG_H
00031
00032 #include "dcmtk/config/osconfig.h"
00033 #include "dcmtk/dcmnet/dimse.h"
00034
00035 class DcmQueryRetrieveDatabaseHandle;
00036 class DcmQueryRetrieveOptions;
00037 class DcmQueryRetrieveDatabaseStatus;
00038
00042 class DcmQueryRetrieveGetContext
00043 {
00044 public:
00054 DcmQueryRetrieveGetContext(DcmQueryRetrieveDatabaseHandle& handle,
00055 const DcmQueryRetrieveOptions& options,
00056 DIC_US priorstatus,
00057 T_ASC_Association *origassoc,
00058 DIC_US origmsgid,
00059 T_DIMSE_Priority prior,
00060 T_ASC_PresentationContextID origpresid)
00061 : dbHandle(handle)
00062 , options_(options)
00063 , priorStatus(priorstatus)
00064 , origAssoc(origassoc)
00065 , assocStarted(OFFalse)
00066 , origPresId(origpresid)
00067 , origMsgId(origmsgid)
00068 , origAETitle()
00069
00070 , priority(prior)
00071 , ourAETitle()
00072 , failedUIDs(NULL)
00073 , nRemaining(0)
00074 , nCompleted(0)
00075 , nFailed(0)
00076 , nWarning(0)
00077 , getCancelled(OFFalse)
00078 {
00079 origHostName[0] = '\0';
00080 }
00081
00085 void setOurAETitle(const char *ae)
00086 {
00087 if (ae) ourAETitle = ae; else ourAETitle.clear();
00088 }
00089
00099 void callbackHandler(
00100
00101 OFBool cancelled, T_DIMSE_C_GetRQ *request,
00102 DcmDataset *requestIdentifiers, int responseCount,
00103
00104 T_DIMSE_C_GetRSP *response, DcmDataset **stDetail,
00105 DcmDataset **responseIdentifiers);
00106
00107 private:
00108
00109 void addFailedUIDInstance(const char *sopInstance);
00110 OFCondition performGetSubOp(DIC_UI sopClass, DIC_UI sopInstance, char *fname);
00111 void getNextImage(DcmQueryRetrieveDatabaseStatus * dbStatus);
00112 void buildFailedInstanceList(DcmDataset ** rspIds);
00113
00115 DcmQueryRetrieveDatabaseHandle& dbHandle;
00116
00118 const DcmQueryRetrieveOptions& options_;
00119
00121 DIC_US priorStatus;
00122
00124 T_ASC_Association *origAssoc;
00125
00127 OFBool assocStarted;
00128
00130 T_ASC_PresentationContextID origPresId;
00131
00133 DIC_US origMsgId;
00134
00136 OFString origAETitle;
00137
00139 DIC_NODENAME origHostName;
00140
00141
00143 T_DIMSE_Priority priority;
00144
00146 OFString ourAETitle;
00147
00149 char *failedUIDs;
00150
00152 DIC_US nRemaining;
00153
00155 DIC_US nCompleted;
00156
00158 DIC_US nFailed;
00159
00161 DIC_US nWarning;
00162
00164 OFBool getCancelled;
00165
00166 };
00167
00168 #endif
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199