fw4spl
writer/iod/InformationObjectDefinition.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 "fwGdcmIO/config.hpp"
10 #include "fwGdcmIO/container/DicomInstance.hpp"
11 
12 #include <fwLog/Logger.hpp>
13 
14 #include <fwMedData/Series.hpp>
15 
16 #include <boost/filesystem/path.hpp>
17 
18 #include <cstdint>
19 
20 namespace fwGdcmIO
21 {
22 namespace writer
23 {
24 namespace iod
25 {
26 
30 class FWGDCMIO_CLASS_API InformationObjectDefinition
31 {
32 
33 public:
34 
35  typedef std::function< void (std::uint64_t) > ProgressCallback;
36  typedef std::function< bool () > CancelRequestedCallback;
37 
47  const ::boost::filesystem::path& destinationPath,
48  const ::fwLog::Logger::sptr& logger = nullptr,
49  ProgressCallback progress = nullptr,
50  CancelRequestedCallback cancel = nullptr);
51 
53  FWGDCMIO_API virtual ~InformationObjectDefinition();
54 
56  FWGDCMIO_API virtual void write(const ::fwMedData::Series::csptr& series) = 0;
57 
58 protected:
59 
62 
64  ::boost::filesystem::path m_destinationPath;
65 
67  ::fwLog::Logger::sptr m_logger;
68 
70  ProgressCallback m_progressCallback;
71 
73  CancelRequestedCallback m_cancelRequestedCallback;
74 
75 };
76 
77 } // namespace iod
78 } // namespace writer
79 } // namespace fwGdcmIO
#define SPTR(_cls_)
This class defines a DICOM SOP instance. It is useful during the whole writing process. This class allows to share data between module writers.
The namespace fwGdcmIO contains reader, writer and helper for dicom data.
fwLog contains classes used to manage logs.
Definition: Log.hpp:16
InformationObjectDefinition base class used to write DICOM modules.