odil
MoveSCU.h
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _5ff4d940_4db7_4d85_9d3a_230b944b31fe
10 #define _5ff4d940_4db7_4d85_9d3a_230b944b31fe
11 
12 #include <functional>
13 #include <string>
14 #include <vector>
15 
16 #include "odil/Association.h"
17 #include "odil/DataSet.h"
18 #include "odil/SCU.h"
19 
20 namespace odil
21 {
22 
24 class MoveSCU: public SCU
25 {
26 public:
28  typedef std::function<void(DataSet const &)> Callback;
29 
31  MoveSCU(Association & association);
32 
34  virtual ~MoveSCU();
35 
37  std::string const & get_move_destination() const;
39  void set_move_destination(std::string const & move_destination);
40 
42  void move(DataSet const & query, Callback callback) const;
43 
47  std::vector<DataSet> move(DataSet const & query) const;
48 
49 private:
50  std::string _move_destination;
51 
52  void _dispatch(Association & store_association, Callback callback) const;
53 
54  bool _handle_main_association() const;
55  bool _handle_store_association(Association & association, Callback callback) const;
56 };
57 
58 }
59 
60 #endif // _5ff4d940_4db7_4d85_9d3a_230b944b31fe
61 
Base class for all Service Class Users.
Definition: SCU.h:20
Definition: Association.cpp:39
std::function< void(DataSet const &)> Callback
Callback called when a response is received.
Definition: MoveSCU.h:28
std::string const & get_move_destination() const
Return the AE title of the destination, defaults to "".
Definition: MoveSCU.cpp:42
DICOM Data set.
Definition: DataSet.h:66
void set_move_destination(std::string const &move_destination)
Set the AE title of the destination.
Definition: MoveSCU.cpp:49
Association.
Definition: Association.h:29
SCU for C-MOVE services.
Definition: MoveSCU.h:24
void move(DataSet const &query, Callback callback) const
Perform the C-MOVE using a callback.
Definition: MoveSCU.cpp:56
MoveSCU(Association &association)
Constructor.
Definition: MoveSCU.cpp:28
virtual ~MoveSCU()
Destructor.
Definition: MoveSCU.cpp:35