OFFIS DCMTK  Version 3.6.0
dcmqrcbg.h
1 /*
2  *
3  * Copyright (C) 1993-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmqrdb
15  *
16  * Author: Marco Eichelberg
17  *
18  * Purpose: class DcmQueryRetrieveGetContext
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:16:41 $
22  * CVS/RCS Revision: $Revision: 1.7 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCMQRCBG_H
30 #define DCMQRCBG_H
31 
32 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
33 #include "dcmtk/dcmnet/dimse.h"
34 
38 
43 {
44 public:
55  const DcmQueryRetrieveOptions& options,
56  DIC_US priorstatus,
57  T_ASC_Association *origassoc,
58  DIC_US origmsgid,
59  T_DIMSE_Priority prior,
60  T_ASC_PresentationContextID origpresid)
61  : dbHandle(handle)
62  , options_(options)
63  , priorStatus(priorstatus)
64  , origAssoc(origassoc)
65  , assocStarted(OFFalse)
66  , origPresId(origpresid)
67  , origMsgId(origmsgid)
68  , origAETitle()
69 // , origHostName()
70  , priority(prior)
71  , ourAETitle()
72  , failedUIDs(NULL)
73  , nRemaining(0)
74  , nCompleted(0)
75  , nFailed(0)
76  , nWarning(0)
77  , getCancelled(OFFalse)
78  {
79  origHostName[0] = '\0';
80  }
81 
85  void setOurAETitle(const char *ae)
86  {
87  if (ae) ourAETitle = ae; else ourAETitle.clear();
88  }
89 
99  void callbackHandler(
100  /* in */
101  OFBool cancelled, T_DIMSE_C_GetRQ *request,
102  DcmDataset *requestIdentifiers, int responseCount,
103  /* out */
104  T_DIMSE_C_GetRSP *response, DcmDataset **stDetail,
105  DcmDataset **responseIdentifiers);
106 
107 private:
108 
109  void addFailedUIDInstance(const char *sopInstance);
110  OFCondition performGetSubOp(DIC_UI sopClass, DIC_UI sopInstance, char *fname);
111  void getNextImage(DcmQueryRetrieveDatabaseStatus * dbStatus);
112  void buildFailedInstanceList(DcmDataset ** rspIds);
113 
116 
119 
121  DIC_US priorStatus;
122 
125 
127  OFBool assocStarted;
128 
130  T_ASC_PresentationContextID origPresId;
131 
133  DIC_US origMsgId;
134 
137 
139  DIC_NODENAME origHostName;
140 
141 
143  T_DIMSE_Priority priority;
144 
147 
149  char *failedUIDs;
150 
152  DIC_US nRemaining;
153 
155  DIC_US nCompleted;
156 
158  DIC_US nFailed;
159 
161  DIC_US nWarning;
162 
164  OFBool getCancelled;
165 
166 };
167 
168 #endif
169 
170 /*
171  * CVS Log
172  * $Log: dcmqrcbg.h,v $
173  * Revision 1.7 2010-10-14 13:16:41 joergr
174  * Updated copyright header. Added reference to COPYRIGHT file.
175  *
176  * Revision 1.6 2009-11-24 10:10:42 uli
177  * Switched to logging mechanism provided by the "new" oflog module.
178  *
179  * Revision 1.5 2009-08-21 09:50:07 joergr
180  * Replaced tabs by spaces and updated copyright date.
181  *
182  * Revision 1.4 2006/04/05 08:22:24 joergr
183  * Fixed issue with initialization of OFString member variables.
184  *
185  * Revision 1.3 2005/12/15 08:32:49 joergr
186  * Fixed issue with initialization of array member variables, reported by egcs
187  * on Solaris. Fixed missing/wrong initialization of member variables.
188  *
189  * Revision 1.2 2005/12/08 16:04:17 meichel
190  * Changed include path schema for all DCMTK header files
191  *
192  * Revision 1.1 2005/03/30 13:34:50 meichel
193  * Initial release of module dcmqrdb that will replace module imagectn.
194  * It provides a clear interface between the Q/R DICOM front-end and the
195  * database back-end. The imagectn code has been re-factored into a minimal
196  * class structure.
197  *
198  *
199  */


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2