fw4spl
reader/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 #include "fwGdcmIO/exception/Failed.hpp"
12 
13 #include <fwLog/Logger.hpp>
14 
15 #include <fwMedData/DicomSeries.hpp>
16 
17 #include <gdcmReader.h>
18 
19 #include <cstdint>
20 
21 namespace fwGdcmIO
22 {
23 namespace reader
24 {
25 namespace iod
26 {
27 
31 class FWGDCMIO_CLASS_API InformationObjectDefinition
32 {
33 
34 public:
35 
36  typedef std::function< void (std::uint64_t) > ProgressCallback;
37  typedef std::function< bool () > CancelRequestedCallback;
38 
47  FWGDCMIO_API InformationObjectDefinition(const ::fwMedData::DicomSeries::csptr& dicomSeries,
48  const SPTR(::fwGdcmIO::container::DicomInstance)& instance,
49  const ::fwLog::Logger::sptr& logger = nullptr,
50  ProgressCallback progress = nullptr,
51  CancelRequestedCallback cancel = nullptr);
52 
54  FWGDCMIO_API virtual ~InformationObjectDefinition();
55 
60  FWGDCMIO_API virtual void read(::fwMedData::Series::sptr series) throw(::fwGdcmIO::exception::Failed) = 0;
61 
62 protected:
63 
66 
68  ::fwMedData::DicomSeries::csptr m_dicomSeries;
69 
71  ::fwLog::Logger::sptr m_logger;
72 
74  ProgressCallback m_progressCallback;
75 
77  CancelRequestedCallback m_cancelRequestedCallback;
78 
79 };
80 
81 } // namespace iod
82 } // namespace reader
83 } // namespace fwGdcmIO
#define SPTR(_cls_)
Namespace containing medical data.
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
Implements a failed exception class for fwGdcmIO.
InformationObjectDefinition base class used to read DICOM IODs.