fw4spl
ioGdcm/include/ioGdcm/SSeriesDBReader.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-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 "ioGdcm/config.hpp"
10 
11 #include <fwCom/Signal.hpp>
12 
13 #include <fwIO/IReader.hpp>
14 
15 #include <boost/filesystem/path.hpp>
16 
17 #include <string>
18 #include <vector>
19 
20 namespace fwJobs
21 {
22 class IJob;
23 }
24 
25 namespace fwMedData
26 {
27 class SeriesDB;
28 }
29 
30 namespace ioGdcm
31 {
102 class IOGDCM_CLASS_API SSeriesDBReader : public ::fwIO::IReader
103 {
104 
105 public:
107 
108  typedef ::fwCom::Signal< void ( SPTR(::fwJobs::IJob) ) > JobCreatedSignal;
109 
114  IOGDCM_API SSeriesDBReader() noexcept;
115 
119  IOGDCM_API virtual ~SSeriesDBReader() noexcept override;
120 
121 protected:
122 
123  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
124  typedef std::vector< std::string > SupportedSOPClassContainerType;
125 
126  enum DicomDirSupport
127  {
128  ALWAYS = 0,
129  NEVER,
130  USER_SELECTION
131  };
132 
134  IOGDCM_API virtual void configuring() override;
135 
137  IOGDCM_API virtual void starting() override;
138 
140  IOGDCM_API virtual void stopping() override;
141 
143  IOGDCM_API void updating() override;
144 
146  IOGDCM_API void info(std::ostream& _sstream ) override;
147 
149  IOGDCM_API virtual std::string getSelectorDialogTitle() override;
150 
152  IOGDCM_API virtual void configureWithIHM() override;
153 
155  IOGDCM_API ::fwIO::IOPathType getIOPathType() const override;
156 
157 private:
158 
163  SPTR(::fwMedData::SeriesDB) createSeriesDB(const ::boost::filesystem::path& dicomDir);
164 
166  std::string m_filterConfig;
167 
169  std::string m_filterType;
170 
172  SupportedSOPClassContainerType m_supportedSOPClassSelection;
173 
175  SPTR(JobCreatedSignal) m_sigJobCreated;
176 
178  bool m_showLogDialog;
179 
181  bool m_enableBufferRotation;
182 
184  DicomDirSupport m_dicomDirSupport;
185 };
186 
187 } // namespace ioGdcm
#define SPTR(_cls_)
Namespace containing medical data.
STL namespace.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
Reader service API. It manages extension points definition and extension configuration.
Definition: IReader.hpp:34
Read DICOM (ImageSeries/ModelSeries) with gdcm reader.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
ioGdcm contains services use to deal with DICOM using the GDCM library.
This namespace fwJobs provides jobs management.