fw4spl
SReconstruction.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __VISUVTKADAPTOR_SRECONSTRUCTION_HPP__
8 #define __VISUVTKADAPTOR_SRECONSTRUCTION_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwRenderVTK/IAdaptor.hpp>
13 
14 namespace fwData
15 {
16 class Mesh;
17 }
18 
19 namespace visuVTKAdaptor
20 {
21 
45 class VISUVTKADAPTOR_CLASS_API SReconstruction : public ::fwRenderVTK::IAdaptor
46 {
47 
48 public:
49 
51 
52  VISUVTKADAPTOR_API SReconstruction() noexcept;
53 
54  VISUVTKADAPTOR_API virtual ~SReconstruction() noexcept;
55 
56  static const ::fwServices::IService::KeyType s_RECONSTRUCTION_INPUT;
57 
58  //------------------------------------------------------------------------------
59 
60  void setClippingPlanes(::fwRenderVTK::SRender::VtkObjectIdType id)
61  {
62  m_clippingPlanesId = id;
63  }
64 
65  //------------------------------------------------------------------------------
66 
67  VISUVTKADAPTOR_API void setForceHide(bool hide);
68 
70  VISUVTKADAPTOR_API void setAutoResetCamera(bool autoResetCamera);
71 
73  ::fwRenderVTK::IAdaptor::wptr getMeshService() const
74  {
75  return m_meshService;
76  }
77 
82  VISUVTKADAPTOR_API static const ::fwCom::Slots::SlotKeyType s_UPDATE_VISIBILITY_SLOT;
84 
86  VISUVTKADAPTOR_API static const ::fwCom::Slots::SlotKeyType s_UPDATE_NORMAL_MODE_SLOT;
87 
89  void updateNormalMode(std::uint8_t mode);
102  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
103 
104 protected:
105 
106  VISUVTKADAPTOR_API void configuring() override;
107  VISUVTKADAPTOR_API void starting() override;
108  VISUVTKADAPTOR_API void updating() override;
109  VISUVTKADAPTOR_API void stopping() override;
110 
111  void createMeshService();
112 
113  ::fwRenderVTK::SRender::VtkObjectIdType m_clippingPlanesId;
114 
115  ::fwRenderVTK::IAdaptor::wptr m_meshService;
116 
117 private:
118 
124  void updateVisibility(bool visible);
130  bool m_autoResetCamera;
131 
132 };
133 
134 } //namespace visuVTKAdaptor
135 
136 #endif // __VISUVTKADAPTOR_SRECONSTRUCTION_HPP__
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
Displays a Reconstruction.
::fwRenderVTK::IAdaptor::wptr getMeshService() const
Retrieve a weak_ptr on underlying mesh adaptor service.
static VISUVTKADAPTOR_APIconst::fwCom::Slots::SlotKeyType s_UPDATE_NORMAL_MODE_SLOT
slot used to update normal mode (0: none, 1: point, 2: cell)
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderVTK contains classes for rendering with VTK.
Contains the representation of the data objects used in the framework.