fw4spl
include/fwData/Resection.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 "fwData/config.hpp"
10 #include "fwData/factory/new.hpp"
11 #include "fwData/PlaneList.hpp"
12 #include "fwData/Reconstruction.hpp"
13 
14 #include <fwCom/Signal.hpp>
15 #include <fwCom/Signals.hpp>
16 
17 #include <vector>
18 
19 fwCampAutoDeclareDataMacro((fwData)(Resection), FWDATA_API);
20 namespace fwData
21 {
25 class FWDATA_CLASS_API Resection : public ::fwData::Object
26 {
27 
28 public:
30  (()), ::fwData::factory::New< Resection >);
31 
32  fwCampMakeFriendDataMacro((fwData)(Resection));
33 
34  typedef std::vector< ::fwData::Reconstruction::sptr > ResectionInputs;
35  typedef std::vector< ::fwData::Reconstruction::sptr > ResectionOutputs;
36 
41  FWDATA_API Resection(::fwData::Object::Key key);
42 
44  FWDATA_API virtual ~Resection();
45 
47  FWDATA_API void shallowCopy( const Object::csptr& _source ) override;
48 
50  FWDATA_API void cachedDeepCopy(const Object::csptr& _source, DeepCopyCacheType& cache) override;
51 
56  ::fwData::PlaneList::sptr& getPlaneList();
57  const ::fwData::PlaneList::sptr& getPlaneList() const;
58  void setPlaneList (const ::fwData::PlaneList::sptr& _planeList);
60 
65  ResectionInputs& getInputs ();
66  const ResectionInputs& getInputs () const;
67  void setInputs (const ResectionInputs& _vInputs);
69 
74  ResectionOutputs& getOutputs ();
75  const ResectionOutputs& getOutputs () const;
76  void setOutputs (const ResectionOutputs& _vOutputs);
78 
83  bool getIsSafePart () const;
84  void setIsSafePart (const bool _isSafePart);
86 
91  std::string& getName ();
92  const std::string& getName () const;
93  void setName (const std::string& _name);
94 
96 
101  bool getIsVisible () const;
102  void setIsVisible (const bool _isVisible);
103 
105 
110  bool getIsValid () const;
111  void setIsValid (const bool _isValid);
112 
114 
115  /***
116  * @name Signals
117  * @{
118  */
119 
121  typedef ::fwCom::Signal< void () > ReconstructionAddedSignalType;
122 
124  FWDATA_API static const ::fwCom::Signals::SignalKeyType s_RECONSTRUCTION_ADDED_SIG;
125 
127  typedef ::fwCom::Signal< void () > VisibilityModifiedSignalType;
128 
130  FWDATA_API static const ::fwCom::Signals::SignalKeyType s_VISIBILITY_MODIFIED_SIG;
131 
136 protected:
137 
139  std::string m_name;
140 
142  ::fwData::PlaneList::sptr m_planeList;
143 
145  ResectionInputs m_vInputs;
146 
148  ResectionOutputs m_vOutputs;
149 
152 
154  bool m_isValid;
155 
158 
159 private:
160 
165  ReconstructionAddedSignalType::sptr m_sigReconstructionAdded;
167 
169  VisibilityModifiedSignalType::sptr m_sigVisibilityModified;
174 }; // end class Resection
175 
176 //-----------------------------------------------------------------------------
177 
178 inline ::fwData::PlaneList::sptr& Resection::getPlaneList()
179 {
180  return m_planeList;
181 }
182 
183 //-----------------------------------------------------------------------------
184 
185 inline const ::fwData::PlaneList::sptr& Resection::getPlaneList() const
186 {
187  return m_planeList;
188 }
189 
190 //-----------------------------------------------------------------------------
191 
192 inline void Resection::setPlaneList (const ::fwData::PlaneList::sptr& _planeList)
193 {
194  m_planeList = _planeList;
195 }
196 
197 //-----------------------------------------------------------------------------
198 
199 inline Resection::ResectionInputs& Resection::getInputs ()
200 {
201  return m_vInputs;
202 }
203 
204 //-----------------------------------------------------------------------------
205 
206 inline const Resection::ResectionInputs& Resection::getInputs () const
207 {
208  return m_vInputs;
209 }
210 
211 //-----------------------------------------------------------------------------
212 
213 inline void Resection::setInputs (const Resection::ResectionInputs& _vInputs)
214 {
215  m_vInputs = _vInputs;
216 }
217 
218 //-----------------------------------------------------------------------------
219 
220 inline Resection::ResectionOutputs& Resection::getOutputs ()
221 {
222  return m_vOutputs;
223 }
224 
225 //-----------------------------------------------------------------------------
226 
227 inline const Resection::ResectionOutputs& Resection::getOutputs () const
228 {
229  return m_vOutputs;
230 }
231 
232 //-----------------------------------------------------------------------------
233 
234 inline void Resection::setOutputs (const Resection::ResectionOutputs& _vOutputs)
235 {
236  m_vOutputs = _vOutputs;
237 }
238 
239 //-----------------------------------------------------------------------------
240 
241 inline bool Resection::getIsSafePart () const
242 {
243  return m_isSafePart;
244 }
245 
246 //-----------------------------------------------------------------------------
247 
248 inline void Resection::setIsSafePart (const bool _isSafePart)
249 {
250  m_isSafePart = _isSafePart;
251 }
252 
253 //-----------------------------------------------------------------------------
254 
255 inline std::string& Resection::getName ()
256 {
257  return m_name;
258 }
259 
260 //-----------------------------------------------------------------------------
261 
262 inline const std::string& Resection::getName () const
263 {
264  return m_name;
265 }
266 
267 //-----------------------------------------------------------------------------
268 
269 inline void Resection::setName (const std::string& _name)
270 {
271  m_name = _name;
272 }
273 
274 //-----------------------------------------------------------------------------
275 
276 inline bool Resection::getIsVisible () const
277 {
278  return m_isVisible;
279 }
280 
281 //-----------------------------------------------------------------------------
282 
283 inline void Resection::setIsVisible (const bool _isVisible)
284 {
285  m_isVisible = _isVisible;
286 }
287 
288 //-----------------------------------------------------------------------------
289 
290 inline bool Resection::getIsValid () const
291 {
292  return m_isValid;
293 }
294 
295 //-----------------------------------------------------------------------------
296 
297 inline void Resection::setIsValid (const bool _isValid)
298 {
299  m_isValid = _isValid;
300 }
301 
302 //-----------------------------------------------------------------------------
303 
304 } // end namespace fwData
bool m_isSafePart
flag if the part is safe
void setInputs(const ResectionInputs &_vInputs)
Get/Set value of the inputs.
ResectionOutputs & getOutputs()
Get/Set value of the outputs.
ResectionInputs & getInputs()
Get/Set value of the inputs.
void setIsVisible(const bool _isVisible)
Get/Set value of the IsVisible.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
This class defines a resection.
bool getIsVisible() const
Get/Set value of the IsVisible.
void setIsSafePart(const bool _isSafePart)
Get/Set value of the IsSafePart.
void setName(const std::string &_name)
Get/Set value of the name.
ResectionOutputs m_vOutputs
Outputs (reconstructions)
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
void setIsValid(const bool _isValid)
Get/Set value of the IsValid.
::fwCom::Signal< void() > VisibilityModifiedSignalType
Type of signal when the resection visibility is modified.
bool getIsSafePart() const
Get/Set value of the IsSafePart.
ResectionInputs m_vInputs
Inputs (reconstructions)
std::string m_name
Resection name.
bool m_isValid
flag if the resection is valid
Base class for each data object.
bool m_isVisible
flag if the resection is visible
::fwData::PlaneList::sptr m_planeList
Planes list.
void setPlaneList(const ::fwData::PlaneList::sptr &_planeList)
Get/Set value of the planeList.
Contains the representation of the data objects used in the framework.
::fwData::PlaneList::sptr & getPlaneList()
Get/Set value of the planeList.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_RECONSTRUCTION_ADDED_SIG
Key in m_signals map of signal m_sigReconstructionAdded.
std::string & getName()
Get/Set value of the name.
::fwCom::Signal< void() > ReconstructionAddedSignalType
Type of signal when a reconstruction is added.
bool getIsValid() const
Get/Set value of the IsValid.
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_VISIBILITY_MODIFIED_SIG
Key in m_signals map of signal m_sigVisibilityModified.
void setOutputs(const ResectionOutputs &_vOutputs)
Get/Set value of the outputs.