fw4spl
DicomSeriesDBWriter.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __FWGDCMIO_HELPER_DICOMSERIESDBWRITER_HPP__
8 #define __FWGDCMIO_HELPER_DICOMSERIESDBWRITER_HPP__
9 
10 #include "fwGdcmIO/config.hpp"
11 
12 #include <fwData/location/Folder.hpp>
13 #include <fwData/location/SingleFile.hpp>
14 
15 #include <fwDataIO/writer/GenericObjectWriter.hpp>
16 
17 #include <string>
18 
19 namespace fwMedData
20 {
21 class SeriesDB;
22 }
23 
24 namespace fwJobs
25 {
26 class Aggregator;
27 }
28 
29 namespace fwGdcmIO
30 {
31 
32 namespace helper
33 {
34 
35 class DicomAnonymizer;
36 
37 class FWGDCMIO_CLASS_API DicomSeriesDBWriter :
38  public ::fwDataIO::writer::GenericObjectWriter< ::fwMedData::SeriesDB >,
39  public ::fwData::location::enableFolder< ::fwDataIO::writer::IObjectWriter >,
40  public ::fwData::location::enableSingleFile< ::fwDataIO::writer::IObjectWriter >
41 
42 {
43 public:
44 
47  (()), ::fwDataIO::writer::factory::New< DicomSeriesDBWriter >);
49 
54  FWGDCMIO_API virtual ~DicomSeriesDBWriter();
57  FWGDCMIO_API std::string extension() override;
59 
61  FWGDCMIO_API SPTR(::fwJobs::Aggregator) getAggregator();
62 
64  FWGDCMIO_API void setAnonymizer(const SPTR(helper::DicomAnonymizer)& anonymizer);
65 
67  FWGDCMIO_API void write() override;
68 
70  FWGDCMIO_API void enableZippedArchive(bool enable);
71 
73  FWGDCMIO_API void setProducer(std::string producer);
74 
75 private:
76 
78  SPTR(::fwJobs::Aggregator) m_aggregator;
79 
81  SPTR(DicomAnonymizer) m_anonymizer;
82 
84  bool m_enableZippedArchive;
85 
87  std::string m_producer;
88 
89 };
90 
91 } // namespace helper
92 } // namespace fwGdcmIO
93 
94 #endif // __FWGDCMIO_HELPER_DICOMSERIESDBWRITER_HPP__
#define SPTR(_cls_)
Namespace containing medical data.
STL namespace.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
This class contains helpers to anonymize dicom files on filesystem. Anonymization is performed accord...
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
This class is derived by reader/writer.
Definition: SingleFile.hpp:70
This class manages an aggregation of IJob.
Definition: Aggregator.hpp:32
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
This class is derived by reader/writer.
Definition: Folder.hpp:80
This namespace fwJobs provides jobs management.
generic class for all object writers.