fw4spl
io/fwGdcmIO/include/fwGdcmIO/reader/Series.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/reader/iod/InformationObjectDefinition.hpp"
10 
11 #include <fwLog/Logger.hpp>
12 
13 namespace fwGdcmIO
14 {
15 namespace reader
16 {
17 
21 class FWGDCMIO_CLASS_API Series
22 {
23 public:
24 
25  typedef std::map< SPTR(::fwGdcmIO::container::DicomInstance), ::fwMedData::Series::sptr > SeriesContainerMapType;
26 
27  typedef std::function< void (std::uint64_t) > ProgressCallback;
28  typedef std::function< bool () > CancelRequestedCallback;
29 
31  FWGDCMIO_API Series();
32 
34  FWGDCMIO_API ~Series();
35 
40  FWGDCMIO_API ::fwMedData::Series::sptr read(const ::fwMedData::DicomSeries::csptr& dicomSeries)
42 
44  const ::fwLog::Logger::sptr& getLogger() const
45  {
46  return m_logger;
47  }
48 
50  void setLogger(const ::fwLog::Logger::sptr& logger)
51  {
52  m_logger = logger;
53  }
54 
59  void setProgressCallback(ProgressCallback callback)
60  {
61  m_progressCallback = callback;
62  }
67  void setCancelRequestedCallback(CancelRequestedCallback callback)
68  {
69  m_cancelRequestedCallback = callback;
70  }
71 
73  void setBufferRotationEnabled(bool enabled)
74  {
75  m_enableBufferRotation = enabled;
76  }
77 
78 protected:
79 
81  SPTR(::fwGdcmIO::container::DicomInstance) getSpatialFiducialsReferencedSeriesInstance(
82  const ::fwMedData::DicomSeries::csptr& dicomSeries);
83 
85  SPTR(::fwGdcmIO::container::DicomInstance) getStructuredReportReferencedSeriesInstance(
86  const ::fwMedData::DicomSeries::csptr& dicomSeries);
87 
89  SeriesContainerMapType m_seriesContainerMap;
90 
92  ::fwLog::Logger::sptr m_logger;
93 
95  ProgressCallback m_progressCallback;
96 
98  CancelRequestedCallback m_cancelRequestedCallback;
99 
102 
103 };
104 
105 } // namespace reader
106 } // namespace fwGdcmIO
void setBufferRotationEnabled(bool enabled)
Enable buffer rotation.
#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.
ProgressCallback m_progressCallback
Progress callback for jobs.
Implements a failed exception class for fwGdcmIO.
const ::fwLog::Logger::sptr & getLogger() const
Get Logger.
void setCancelRequestedCallback(CancelRequestedCallback callback)
Set cancel callback.
void setProgressCallback(ProgressCallback callback)
Set progress callback.
void setLogger(const ::fwLog::Logger::sptr &logger)
Set Logger.
CancelRequestedCallback m_cancelRequestedCallback
Cancel information for jobs.
SeriesContainerMapType m_seriesContainerMap
Series Container Map.