fw4spl
SResection.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_SRESECTION_HPP__
8 #define __VISUVTKADAPTOR_SRESECTION_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwRenderVTK/IAdaptor.hpp>
13 
14 namespace visuVTKAdaptor
15 {
16 
38 class VISUVTKADAPTOR_CLASS_API SResection : public ::fwRenderVTK::IAdaptor
39 {
40 
41 public:
42 
44 
45  VISUVTKADAPTOR_API SResection() noexcept;
46 
47  VISUVTKADAPTOR_API virtual ~SResection() noexcept;
48 
49  static const ::fwServices::IService::KeyType s_RESECTION_INPUT;
50 
51  void setClippingPlanes(::fwRenderVTK::SRender::VtkObjectIdType id);
52 
54  void setAutoResetCamera(bool autoResetCamera);
55 
56 protected:
57 
58  VISUVTKADAPTOR_API void configuring() override;
59  VISUVTKADAPTOR_API void starting() override;
60  VISUVTKADAPTOR_API void updating() override;
61  VISUVTKADAPTOR_API void stopping() override;
62 
71  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
72 
73 private:
74  ::fwRenderVTK::SRender::VtkObjectIdType m_clippingPlanes;
75  bool m_autoResetCamera;
76 };
77 
78 //------------------------------------------------------------------------------
79 
80 inline void SResection::setClippingPlanes(::fwRenderVTK::SRender::VtkObjectIdType id)
81 {
82  m_clippingPlanes = id;
83 }
84 
85 //------------------------------------------------------------------------------
86 
87 inline void SResection::setAutoResetCamera(bool autoResetCamera)
88 {
89  m_autoResetCamera = autoResetCamera;
90 }
91 
92 } //namespace visuVTKAdaptor
93 
94 #endif // __VISUVTKADAPTOR_SRESECTION_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...
void setAutoResetCamera(bool autoResetCamera)
Active/Inactive automatic reset on camera for triangular mesh adaptor. By default =true...
Definition: SResection.hpp:87
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
This service displays a ResectionDB (it launchs Reconstruction adators)
Definition: SResection.hpp:38
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderVTK contains classes for rendering with VTK.