fw4spl
SDicomSeriesDBReader.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 
19 namespace fwJobs
20 {
21 class IJob;
22 }
23 
24 namespace fwMedData
25 {
26 class SeriesDB;
27 class Patient;
28 }
29 
30 namespace ioGdcm
31 {
32 
56 class IOGDCM_CLASS_API SDicomSeriesDBReader : public ::fwIO::IReader
57 {
58 
59 public:
60 
61  typedef ::fwCom::Signal< void ( SPTR(::fwJobs::IJob) ) > JobCreatedSignal;
62 
64 
69  IOGDCM_API SDicomSeriesDBReader() noexcept;
70 
74  IOGDCM_API virtual ~SDicomSeriesDBReader() noexcept override;
75 
76 protected:
77 
80  {
81  ALWAYS = 0,
83  USER_SELECTION
84  };
85 
87  IOGDCM_API virtual void starting() override;
88 
90  IOGDCM_API virtual void stopping() override;
91 
93  IOGDCM_API void updating() override;
94 
96  IOGDCM_API void info(std::ostream& _sstream ) override;
97 
99  IOGDCM_API virtual std::string getSelectorDialogTitle() override;
100 
102  IOGDCM_API virtual void configuring() override;
103 
105  IOGDCM_API virtual void configureWithIHM() override;
106 
108  IOGDCM_API ::fwIO::IOPathType getIOPathType() const override;
109 
110 private:
111 
116  SPTR(::fwMedData::SeriesDB) createSeriesDB(const ::boost::filesystem::path& dicomDir);
117 
119  SPTR(JobCreatedSignal) m_sigJobCreated;
120 
122  bool m_cancelled;
123 
125  bool m_showLogDialog;
126 
128  DicomDirSupport m_dicomDirSupport;
129 };
130 
131 } // namespace ioGdcm
#define SPTR(_cls_)
This class contains helper to generate Medical Data (SeriesDB, ImageSeries, ...). ...
Namespace containing medical data.
Reader service API. It manages extension points definition and extension configuration.
Definition: IReader.hpp:34
Read DicomSeries from DICOM folder with GDCM reader.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
ioGdcm contains services use to deal with DICOM using the GDCM library.
DicomDirSupport
Enum for DicomDir support mode.
This namespace fwJobs provides jobs management.