fw4spl
SDicomSeriesWriter.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 <fwIO/IWriter.hpp>
12 
13 #include <boost/filesystem/path.hpp>
14 
15 #include <string>
16 
17 namespace fwJobs
18 {
19 class IJob;
20 }
21 
22 namespace fwMedData
23 {
24 class DicomSeries;
25 }
26 
27 namespace ioGdcm
28 {
29 
47 class IOGDCM_CLASS_API SDicomSeriesWriter : public ::fwIO::IWriter
48 {
49 
50 public:
51  typedef ::fwCom::Signal< void ( SPTR(::fwJobs::IJob) ) > JobCreatedSignal;
52 
54 
58  IOGDCM_API SDicomSeriesWriter() noexcept;
59 
63  IOGDCM_API virtual ~SDicomSeriesWriter() noexcept override;
64 
66  IOGDCM_API virtual void configureWithIHM() override;
67 
68 protected:
69 
71  IOGDCM_API virtual void starting() override;
72 
74  IOGDCM_API virtual void stopping() override;
75 
77  IOGDCM_API virtual void configuring() override;
78 
80  IOGDCM_API void updating() override;
81 
83  IOGDCM_API ::fwIO::IOPathType getIOPathType() const override;
84 
85 private:
87  void saveDicomSeries( const ::boost::filesystem::path folder,
88  const CSPTR(::fwMedData::DicomSeries)& series ) const;
89 
91  SPTR(JobCreatedSignal) m_sigJobCreated;
92 
94  bool m_cancelled;
95 };
96 
97 } // namespace ioGdcm
#define SPTR(_cls_)
#define CSPTR(_cls_)
Namespace containing medical data.
Services to write an DicomSeries in DICOM format.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
ioGdcm contains services use to deal with DICOM using the GDCM library.
Writer service API. It manages extension points definition and extension configuration.
Definition: IWriter.hpp:33
The namespace fwIO contains the base interface for reader and writer services.
Definition: ioTypes.hpp:16
This namespace fwJobs provides jobs management.