fw4spl
ioDicomWeb/include/ioDicomWeb/SSeriesPusher.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "ioDicomWeb/config.hpp"
10 
11 #include <fwCom/Slot.hpp>
12 
13 #include <fwMemory/BufferObject.hpp>
14 
15 #include <fwNetworkIO/http/ClientQt.hpp>
16 
17 #include <fwServices/IController.hpp>
18 
19 #include <vector>
20 
21 namespace fwMedData
22 {
23 class Series;
24 }
25 
26 namespace ioDicomWeb
27 {
28 
46 class IODICOMWEB_CLASS_API SSeriesPusher : public ::fwServices::IController
47 {
48 public:
49 
51 
52  typedef std::vector< CSPTR(::fwMedData::Series) > DicomSeriesContainerType;
53 
54  IODICOMWEB_API static const ::fwCom::Slots::SlotKeyType s_DISPLAY_SLOT;
55  typedef ::fwCom::Slot<void (const std::string&, bool)> DisplayMessageSlotType;
56 
60  IODICOMWEB_API SSeriesPusher() noexcept;
61 
65  IODICOMWEB_API virtual ~SSeriesPusher() noexcept;
66 
67 protected:
68 
70  IODICOMWEB_API virtual void configuring() override;
71 
73  IODICOMWEB_API virtual void starting() override;
74 
76  IODICOMWEB_API virtual void stopping() override;
77 
79  IODICOMWEB_API void updating() override;
80 
81 private:
82 
84  void pushSeries();
85 
91  void displayMessage(const std::string& message, bool error) const;
92 
94  ::fwNetworkIO::http::ClientQt m_clientQt;
95 
97  bool m_isPushing;
98 
100  std::string getPreferenceKey(const std::string& key) const;
101 
103  std::string m_serverHostnameKey;
104 
106  std::string m_serverPortKey;
107 
109  std::string m_serverHostname;
110 
112  int m_serverPort;
113 
114 };
115 
116 } // namespace ioDicomWeb
Namespace containing medical data.
STL namespace.
The namespace fwNetworkIO contains the primary methods to access network.
This service is used to push a DICOM series to a PACS.
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
ioDicomWeb contains services use to deal with PACS through HTTP.