fw4spl
SModelSeries.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_SMODELSERIES_HPP__
8 #define __VISUVTKADAPTOR_SMODELSERIES_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwRenderVTK/IAdaptor.hpp>
13 
14 #include <vector>
15 
16 namespace fwData
17 {
18 class Material;
19 }
20 
21 namespace visuVTKAdaptor
22 {
23 
52 class VISUVTKADAPTOR_CLASS_API SModelSeries : public ::fwRenderVTK::IAdaptor
53 {
54 
55 public:
56 
58 
63  typedef ::fwCom::Signal< void ( SPTR(::fwData::Material) ) > TextureAppliedSignalType;
64  VISUVTKADAPTOR_API static const ::fwCom::Signals::SignalKeyType s_TEXTURE_APPLIED_SIG;
71  VISUVTKADAPTOR_API static const ::fwCom::Slots::SlotKeyType s_UPDATE_NORMAL_MODE_SLOT;
72  VISUVTKADAPTOR_API static const ::fwCom::Slots::SlotKeyType s_SHOW_RECONSTRUCTIONS_SLOT;
77  VISUVTKADAPTOR_API SModelSeries() noexcept;
78 
79  VISUVTKADAPTOR_API virtual ~SModelSeries() noexcept;
80 
81  //------------------------------------------------------------------------------
82 
83  void setClippingPlanes(::fwRenderVTK::SRender::VtkObjectIdType id)
84  {
85  m_clippingPlanes = id;
86  }
87 
96  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
97 
98 protected:
99 
100  VISUVTKADAPTOR_API void configuring() override;
101  VISUVTKADAPTOR_API void starting() override;
102  VISUVTKADAPTOR_API void updating() override;
103  VISUVTKADAPTOR_API void stopping() override;
104 
113  void updateNormalMode(std::uint8_t mode, std::string recID);
114 
116  void showReconstructions(bool show);
117 
119  void showReconstructionsOnFieldChanged();
124 private:
125 
126  ::fwRenderVTK::SRender::VtkObjectIdType m_clippingPlanes;
127  bool m_autoResetCamera;
128 
130  TextureAppliedSignalType::sptr m_sigTextureApplied;
131 };
132 
133 } //namespace visuVTKAdaptor
134 
135 #endif // __VISUVTKADAPTOR_SMODELSERIES_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...
#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.
This adaptor shows ModelSeries. Creates adaptors for each reconstruction in model.