Odil
A C++11 library for the DICOM standard
Loading...
Searching...
No Matches
MoveSCU.h
Go to the documentation of this file.
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"
20#include "odil/odil.h"
21#include "odil/SCU.h"
22
23namespace odil
24{
25
27class ODIL_API MoveSCU: public SCU
28{
29public:
31 typedef std::function<void(std::shared_ptr<DataSet>)> StoreCallback;
32
38
40 typedef std::function<
41 void(std::shared_ptr<message::CMoveResponse>)
43
45 MoveSCU(Association & association);
46
48 std::string const & get_move_destination() const;
50 void set_move_destination(std::string const & move_destination);
51
53 uint16_t get_incoming_port() const;
54
56 void set_incoming_port(uint16_t port);
57
59 void move(
60 std::shared_ptr<DataSet> query, StoreCallback store_callback) const;
61
63 void move(
64 std::shared_ptr<DataSet> query, MoveCallback move_callback) const;
65
67 void move(
68 std::shared_ptr<DataSet> query, StoreCallback store_callback,
69 MoveCallback move_callback) const;
70
74 std::vector<std::shared_ptr<DataSet>> move(
75 std::shared_ptr<DataSet> query) const;
76
77private:
78 std::string _move_destination;
79 uint16_t _incoming_port;
80
81 void _move(
82 std::shared_ptr<message::CMoveRequest const> request,
83 StoreCallback store_callback, MoveCallback move_callback) const;
84
85 void _dispatch(
86 Association & store_association, StoreCallback store_callback,
87 MoveCallback move_callback) const;
88
89 bool _handle_main_association(MoveCallback callback) const;
90 bool _handle_store_association(
91 Association & association, StoreCallback callback) const;
92};
93
94}
95
96#endif // _5ff4d940_4db7_4d85_9d3a_230b944b31fe
Association.
Definition Association.h:31
SCU for C-MOVE services.
Definition MoveSCU.h:28
std::function< void(std::shared_ptr< DataSet >)> StoreCallback
Callback called when a C-STORE request is received.
Definition MoveSCU.h:31
MoveSCU(Association &association)
Constructor.
std::vector< std::shared_ptr< DataSet > > move(std::shared_ptr< DataSet > query) const
Return a list of datasets matching the query.
uint16_t get_incoming_port() const
Return the port for incoming associations, defaults to 0.
void move(std::shared_ptr< DataSet > query, MoveCallback move_callback) const
Perform the C-MOVE using callbacks.
void move(std::shared_ptr< DataSet > query, StoreCallback store_callback) const
Perform the C-MOVE using callbacks.
void set_incoming_port(uint16_t port)
Set the port for incoming associations, use 0 to disable.
void set_move_destination(std::string const &move_destination)
Set the AE title of the destination.
std::function< void(std::shared_ptr< message::CMoveResponse >) > MoveCallback
Callback called when a C-MOVE response is received.
Definition MoveSCU.h:42
StoreCallback Callback
Typedef to keep compatibility with previous versions.
Definition MoveSCU.h:37
void move(std::shared_ptr< DataSet > query, StoreCallback store_callback, MoveCallback move_callback) const
Perform the C-MOVE using callbacks.
std::string const & get_move_destination() const
Return the AE title of the destination, defaults to "".
Base class for all Service Class Users.
Definition SCU.h:22
Definition Association.h:25
#define ODIL_API
Definition odil.h:28