OFFIS DCMTK  Version 3.6.0
dcmqrcbm.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 DcmQueryRetrieveMoveContext
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:16:41 $
22  * CVS/RCS Revision: $Revision: 1.8 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DCMQRCBM_H
30 #define DCMQRCBM_H
31 
32 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
33 #include "dcmtk/dcmnet/dimse.h"
34 
39 
44 {
45 public:
57  const DcmQueryRetrieveOptions& options,
58  const DcmQueryRetrieveConfig *cfg,
59  DIC_US priorstatus,
60  T_ASC_Association *assoc,
61  DIC_US msgid,
62  T_DIMSE_Priority pr)
63  : dbHandle(handle)
64  , options_(options)
65  , priorStatus(priorstatus)
66  , origAssoc(assoc)
67  , subAssoc(NULL)
68  , config(cfg)
69  , assocStarted(OFFalse)
70  , origMsgId(msgid)
71 // , origAETitle()
72 // , origHostName()
73  , priority(pr)
74  , ourAETitle()
75 // , dstAETitle()
76  , failedUIDs(NULL)
77  , nRemaining(0)
78  , nCompleted(0)
79  , nFailed(0)
80  , nWarning(0)
81  {
82  origAETitle[0] = '\0';
83  origHostName[0] = '\0';
84  dstAETitle[0] = '\0';
85  }
86 
96  void callbackHandler(
97  /* in */
98  OFBool cancelled, T_DIMSE_C_MoveRQ *request,
99  DcmDataset *requestIdentifiers, int responseCount,
100  /* out */
101  T_DIMSE_C_MoveRSP *response, DcmDataset **stDetail,
102  DcmDataset **responseIdentifiers);
103 
107  void setOurAETitle(const char *ae)
108  {
109  if (ae) ourAETitle = ae; else ourAETitle.clear();
110  }
111 
112 private:
113 
114  void addFailedUIDInstance(const char *sopInstance);
115  OFCondition performMoveSubOp(DIC_UI sopClass, DIC_UI sopInstance, char *fname);
116  OFCondition buildSubAssociation(T_DIMSE_C_MoveRQ *request);
117  OFCondition closeSubAssociation();
118  void moveNextImage(DcmQueryRetrieveDatabaseStatus * dbStatus);
119  void failAllSubOperations(DcmQueryRetrieveDatabaseStatus * dbStatus);
120  void buildFailedInstanceList(DcmDataset ** rspIds);
121  OFBool mapMoveDestination(
122  const char *origPeer, const char *origAE,
123  const char *dstAE, char *dstPeer, int *dstPort);
124  OFCondition addAllStoragePresentationContexts(T_ASC_Parameters *params);
125 
128 
131 
133  DIC_US priorStatus;
134 
136  T_ASC_Association *origAssoc; /* association of requestor */
137 
139  T_ASC_Association *subAssoc; /* sub-association */
140 
143 
145  OFBool assocStarted;
146 
148  DIC_US origMsgId;
149 
151  DIC_AE origAETitle;
152 
154  DIC_NODENAME origHostName;
155 
157  T_DIMSE_Priority priority;
158 
161 
163  DIC_AE dstAETitle;
164 
166  char *failedUIDs;
167 
169  DIC_US nRemaining;
170 
172  DIC_US nCompleted;
173 
175  DIC_US nFailed;
176 
178  DIC_US nWarning;
179 
180 };
181 
182 #endif
183 
184 /*
185  * CVS Log
186  * $Log: dcmqrcbm.h,v $
187  * Revision 1.8 2010-10-14 13:16:41 joergr
188  * Updated copyright header. Added reference to COPYRIGHT file.
189  *
190  * Revision 1.7 2009-11-24 10:10:42 uli
191  * Switched to logging mechanism provided by the "new" oflog module.
192  *
193  * Revision 1.6 2009-08-21 09:50:07 joergr
194  * Replaced tabs by spaces and updated copyright date.
195  *
196  * Revision 1.5 2006/04/05 08:22:24 joergr
197  * Fixed issue with initialization of OFString member variables.
198  *
199  * Revision 1.4 2005/12/20 11:21:30 meichel
200  * Removed duplicate parameter
201  *
202  * Revision 1.3 2005/12/15 08:32:49 joergr
203  * Fixed issue with initialization of array member variables, reported by egcs
204  * on Solaris. Fixed missing/wrong initialization of member variables.
205  *
206  * Revision 1.2 2005/12/08 16:04:18 meichel
207  * Changed include path schema for all DCMTK header files
208  *
209  * Revision 1.1 2005/03/30 13:34:50 meichel
210  * Initial release of module dcmqrdb that will replace module imagectn.
211  * It provides a clear interface between the Q/R DICOM front-end and the
212  * database back-end. The imagectn code has been re-factored into a minimal
213  * class structure.
214  *
215  *
216  */


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