fw4spl
include/fwMedData/ModelSeries.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 "fwMedData/config.hpp"
10 #include "fwMedData/DicomSeries.hpp"
11 #include "fwMedData/Series.hpp"
12 #include "fwMedData/types.hpp"
13 
14 #include <fwCom/Signal.hpp>
15 #include <fwCom/Signals.hpp>
16 
17 #include <fwData/factory/new.hpp>
18 
19 #include <vector>
20 
21 fwCampAutoDeclareDataMacro((fwMedData)(ModelSeries), FWMEDDATA_API);
22 
23 namespace fwData
24 {
25 class Reconstruction;
26 }
27 
28 namespace fwMedData
29 {
30 
34 class FWMEDDATA_CLASS_API ModelSeries : public ::fwMedData::Series
35 {
36 
37 public:
38  typedef std::vector< SPTR(::fwData::Reconstruction) > ReconstructionVectorType;
39 
41  ::fwData::factory::New< ModelSeries >);
42 
43  fwCampMakeFriendDataMacro((fwMedData)(ModelSeries));
44 
49  FWMEDDATA_API ModelSeries(::fwData::Object::Key key);
50 
52  FWMEDDATA_API virtual ~ModelSeries() override;
53 
55  FWMEDDATA_API void shallowCopy( const ::fwData::Object::csptr& _source ) override;
56 
58  FWMEDDATA_API void cachedDeepCopy( const ::fwData::Object::csptr& _source, DeepCopyCacheType& cache ) override;
59 
67  const ReconstructionVectorType& getReconstructionDB() const;
68  void setReconstructionDB(const ReconstructionVectorType& val);
74  ::fwMedData::DicomSeries::csptr getDicomReference() const;
75  void setDicomReference(const ::fwMedData::DicomSeries::csptr& reference);
80  /***
81  * @name Signals
82  * @{
83  */
85  typedef ::fwCom::Signal< void (ReconstructionVectorType) > ReconstructionsAddedSignalType;
86 
88  FWMEDDATA_API static const ::fwCom::Signals::SignalKeyType s_RECONSTRUCTIONS_ADDED_SIG;
89 
91  typedef ::fwCom::Signal< void (ReconstructionVectorType) > ReconstructionsRemovedSignalType;
92 
94  FWMEDDATA_API static const ::fwCom::Signals::SignalKeyType s_RECONSTRUCTIONS_REMOVED_SIG;
95 
100 protected:
101 
103  ReconstructionVectorType m_reconstructionDB;
104 
106  ::fwMedData::DicomSeries::sptr m_dicomReference;
107 
108 private:
109 
110  /***
111  * @name Signals attributes
112  * @{
113  */
115  ReconstructionsAddedSignalType::sptr m_sigReconstructionsAdded;
116 
118  ReconstructionsRemovedSignalType ::sptr m_sigReconstructionsRemoved;
123 };
124 
125 //-----------------------------------------------------------------------------
126 
127 inline const ModelSeries::ReconstructionVectorType& ModelSeries::getReconstructionDB() const
128 {
129  return m_reconstructionDB;
130 }
131 
132 //-----------------------------------------------------------------------------
133 
134 inline void ModelSeries::setReconstructionDB(const ModelSeries::ReconstructionVectorType& val)
135 {
136  m_reconstructionDB = val;
137 }
138 
139 //-----------------------------------------------------------------------------
140 
141 inline ::fwMedData::DicomSeries::csptr ModelSeries::getDicomReference() const
142 {
143  return m_dicomReference;
144 }
145 
146 //-----------------------------------------------------------------------------
147 
148 inline void ModelSeries::setDicomReference(const ::fwMedData::DicomSeries::csptr& reference)
149 {
150  m_dicomReference = std::const_pointer_cast< ::fwMedData::DicomSeries >( reference );
151 }
152 
153 //-----------------------------------------------------------------------------
154 
155 } //end namespace fwMedData
ReconstructionVectorType m_reconstructionDB
Model container.
Namespace containing medical data.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
static FWMEDDATA_APIconst::fwCom::Signals::SignalKeyType s_RECONSTRUCTIONS_ADDED_SIG
Key in m_signals map of signal m_sigReconstructionsAdded.
Base class for each data object.
::fwMedData::DicomSeries::sptr m_dicomReference
Dicom reference used to generate a valid Dicom Segmentation Surface.
Contains the representation of the data objects used in the framework.
::fwCom::Signal< void(ReconstructionVectorType) > ReconstructionsAddedSignalType
Type of signal when reconstructions are added.
::fwCom::Signal< void(ReconstructionVectorType) > ReconstructionsRemovedSignalType
Type of signal when reconstructions are removed.
static FWMEDDATA_APIconst::fwCom::Signals::SignalKeyType s_RECONSTRUCTIONS_REMOVED_SIG
Key in m_signals map of signal m_sigReconstructionsRemoved.