fw4spl
SMedical3DCamera.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_SMEDICAL3DCAMERA_HPP__
8 #define __VISUVTKADAPTOR_SMEDICAL3DCAMERA_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwCom/Slot.hpp>
13 #include <fwCom/Slots.hpp>
14 
15 #include <fwDataTools/helper/MedicalImageAdaptor.hpp>
16 
17 #include <fwRenderVTK/IAdaptor.hpp>
18 
19 class vtkCamera;
20 
21 namespace visuVTKAdaptor
22 {
23 
48 class VISUVTKADAPTOR_CLASS_API SMedical3DCamera : public ::fwDataTools::helper::MedicalImageAdaptor,
50 {
51 public:
52 
54 
55  VISUVTKADAPTOR_API SMedical3DCamera() noexcept;
56 
57  VISUVTKADAPTOR_API virtual ~SMedical3DCamera() noexcept;
58 
59 protected:
60 
61  VISUVTKADAPTOR_API void configuring() override;
62  VISUVTKADAPTOR_API void starting() override;
63  VISUVTKADAPTOR_API void updating() override;
64  VISUVTKADAPTOR_API void stopping() override;
65 
66 private:
67  void updateView();
68  void resetSagittalView();
69  void resetFrontalView();
70  void resetAxialView();
71 
72  void setSagittalView();
73  void setFrontalView();
74  void setAxialView();
75 
76  vtkCamera* m_camera;
77  static std::map< std::string, ::fwDataTools::helper::MedicalImageAdaptor::Orientation > m_orientationConversion;
78 
80  bool m_resetAtStart;
81 };
82 
83 } //namespace visuVTKAdaptor
84 
85 #endif // __VISUVTKADAPTOR_SMEDICAL3DCAMERA_HPP__
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
The namespace fwDataTools contains classes which provide helpers to manipulate fwData::Object. *.
STL namespace.
Update camera scene according to defined axes (axial, sagittal, frontal).
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.