fw4spl
vtkSimpleNegato/include/vtkSimpleNegato/SRenderer.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 __VTKSIMPLENEGATO_SRENDERER_HPP__
8 #define __VTKSIMPLENEGATO_SRENDERER_HPP__
9 
10 #include "vtkSimpleNegato/config.hpp"
11 
12 #include <fwRender/IRender.hpp>
13 
14 #include <fwRenderVTK/IVtkRenderWindowInteractorManager.hpp>
15 
16 #include <vtkImagePlaneWidget.h>
17 #include <vtkOutlineFilter.h>
18 #include <vtkRenderer.h>
19 
20 namespace vtkSimpleNegato
21 {
22 
38 class VTKSIMPLENEGATO_CLASS_API SRenderer : public fwRender::IRender
39 {
40 public:
42 
44  VTKSIMPLENEGATO_API SRenderer() noexcept;
45 
47  VTKSIMPLENEGATO_API virtual ~SRenderer() noexcept;
48 
56  VTKSIMPLENEGATO_API virtual KeyConnectionsMap getAutoConnections() const override;
57 
58 protected:
59 
66  VTKSIMPLENEGATO_API virtual void starting() override;
67 
73  VTKSIMPLENEGATO_API virtual void stopping() override;
74 
81  VTKSIMPLENEGATO_API virtual void updating() override;
82 
88  VTKSIMPLENEGATO_API virtual void configuring() override;
89 
90 private:
96  void initVTKPipeline();
97 
99  void refresh();
105  void updateVTKPipeline();
106 
108  vtkRenderer* m_render;
109 
111  ::fwRenderVTK::IVtkRenderWindowInteractorManager::sptr m_interactorManager;
112 
114  vtkOutlineFilter* m_outline;
115 
117  vtkImagePlaneWidget* m_negatoAxial;
118 
120  vtkImagePlaneWidget* m_negatoSagittal;
121 
123  vtkImagePlaneWidget* m_negatoFrontal;
124 
126  bool m_bPipelineIsInit;
127 };
128 
129 }
130 
131 #endif /* __VTKSIMPLENEGATO_SRENDERER_HPP__ */
This class is a helper to define the connections of a service and its data.
Definition: IService.hpp:454
The namespace vtkSimpleNegato has a visualization service of medical image (fwData::Image).
Defines the service interface managing the rendering service for object.
Definition: IRender.hpp:36
Service rendering a fwData::Image using VTK.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderVTK contains classes for rendering with VTK.