OFFIS DCMTK  Version 3.6.0
dfindscu.h
1 /*
2  *
3  * Copyright (C) 1994-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: dcmnet
15  *
16  * Author: Marco Eichelberg / Andrew Hewett
17  *
18  * Purpose: Classes for Query/Retrieve Service Class User (C-FIND operation)
19  *
20  * Last Update: $Author: joergr $
21  * Update Date: $Date: 2010-10-14 13:17:22 $
22  * CVS/RCS Revision: $Revision: 1.5 $
23  * Status: $State: Exp $
24  *
25  * CVS/RCS Log at end of file
26  *
27  */
28 
29 #ifndef DFINDSCU_H
30 #define DFINDSCU_H
31 
32 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
33 #include "dcmtk/ofstd/ofcond.h" /* for class OFCondition */
34 #include "dcmtk/dcmdata/dcxfer.h" /* for E_TransferSyntax */
35 #include "dcmtk/dcmnet/dimse.h" /* for T_DIMSE_BlockingMode */
36 
37 // forward declarations of classes and structs
38 class DcmDataset;
39 class DcmTransportLayer;
41 struct T_ASC_Association;
42 struct T_ASC_Parameters;
43 struct T_DIMSE_C_FindRQ;
44 struct T_DIMSE_C_FindRSP;
45 
59 {
60 public:
61 
64 
66  virtual ~DcmFindSCUCallback() {}
67 
74  virtual void callback(
75  T_DIMSE_C_FindRQ *request,
76  int responseCount,
77  T_DIMSE_C_FindRSP *rsp,
78  DcmDataset *responseIdentifiers) = 0;
79 
85  void setAssociation(T_ASC_Association *assoc);
86 
92  void setPresentationContextID(T_ASC_PresentationContextID presId);
93 
94 protected: /* the two member variables are protected and can be accessed from derived classes */
95 
98 
100  T_ASC_PresentationContextID presId_;
101 };
102 
103 
108 {
109 public:
116  OFBool extractResponsesToFile,
117  int cancelAfterNResponses);
118 
121 
128  virtual void callback(
129  T_DIMSE_C_FindRQ *request,
130  int responseCount,
131  T_DIMSE_C_FindRSP *rsp,
132  DcmDataset *responseIdentifiers);
133 
134 private:
135 
138 
141 };
142 
143 
150 {
151 public:
152 
154  DcmFindSCU();
155 
157  virtual ~DcmFindSCU();
158 
163  OFCondition initializeNetwork(int acse_timeout);
164 
177 
182 
223  const char *peer,
224  unsigned int port,
225  const char *ourTitle,
226  const char *peerTitle,
227  const char *abstractSyntax,
228  E_TransferSyntax preferredTransferSyntax,
229  T_DIMSE_BlockingMode blockMode,
230  int dimse_timeout,
231  Uint32 maxReceivePDULength,
232  OFBool secureConnection,
233  OFBool abortAssociation,
234  unsigned int repeatCount,
235  OFBool extractResponsesToFile,
236  int cancelAfterNResponses,
237  OFList<OFString> *overrideKeys,
238  DcmFindSCUCallback *callback = NULL,
239  OFList<OFString> *fileNameList = NULL);
240 
249  static OFBool writeToFile(const char* ofname, DcmDataset *dataset);
250 
251 private:
252 
265  T_ASC_Parameters *params,
266  const char *abstractSyntax,
267  E_TransferSyntax preferredTransferSyntax);
268 
289  T_ASC_Association * assoc,
290  const char *fname,
291  int repeatCount,
292  const char *abstractSyntax,
293  T_DIMSE_BlockingMode blockMode,
294  int dimse_timeout,
295  OFBool extractResponsesToFile,
296  int cancelAfterNResponses,
297  OFList<OFString> *overrideKeys,
298  DcmFindSCUCallback *callback = NULL) const;
299 
300 private:
301 
304 
305 };
306 
307 #endif
308 
309 /*
310  * CVS Log
311  * $Log: dfindscu.h,v $
312  * Revision 1.5 2010-10-14 13:17:22 joergr
313  * Updated copyright header. Added reference to COPYRIGHT file.
314  *
315  * Revision 1.4 2009-11-18 11:53:58 uli
316  * Switched to logging mechanism provided by the "new" oflog module.
317  *
318  * Revision 1.3 2009-07-10 13:21:04 onken
319  * Moved override key functionality to DcmPathProcessor.
320  *
321  * Revision 1.2 2009-07-08 16:14:25 onken
322  * Added support for specifying tag paths as override keys.
323  *
324  * Revision 1.1 2007-02-19 13:13:28 meichel
325  * Refactored findscu code into class DcmFindSCU, which is now part of the dcmnet
326  * library, and a short command line tool that only evaluates command line
327  * parameters and then makes use of this class. This facilitates re-use of the
328  * findscu code in other applications.
329  *
330  *
331  */


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