fw4spl
SImageSeries.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
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 #pragma once
8 
9 #include "visuVTKAdaptor/config.hpp"
10 #include "visuVTKAdaptor/SNegatoMPR.hpp"
11 
12 #include <fwDataTools/helper/MedicalImageAdaptor.hpp>
13 
14 #include <fwRenderVTK/IAdaptor.hpp>
15 
16 #include <vector>
17 
18 namespace visuVTKAdaptor
19 {
20 
54 class VISUVTKADAPTOR_CLASS_API SImageSeries : public ::fwDataTools::helper::MedicalImageAdaptor,
56 {
57 
58 public:
59 
61 
62  VISUVTKADAPTOR_API SImageSeries() noexcept;
63 
64  VISUVTKADAPTOR_API virtual ~SImageSeries() noexcept;
65 
66  //------------------------------------------------------------------------------
67 
68  void setAllowAlphaInTF(bool allow)
69  {
70  m_allowAlphaInTF = allow;
71  }
72  //------------------------------------------------------------------------------
73 
74  void setInterpolation(bool interpolation)
75  {
76  m_interpolation = interpolation;
77  }
78  //------------------------------------------------------------------------------
79 
80  void setVtkImageSourceId(std::string id)
81  {
82  m_imageSourceId = id;
83  }
84 
85 protected:
86 
88  VISUVTKADAPTOR_API void configuring() override;
89 
91  VISUVTKADAPTOR_API void starting() override;
92 
94  VISUVTKADAPTOR_API void updating() override;
95 
97  VISUVTKADAPTOR_API void stopping() override;
98 
105  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
106 
108  void setSliceMode(SNegatoMPR::SliceMode sliceMode);
109 
111  SNegatoMPR::SliceMode getSliceMode();
112 
114  ::boost::logic::tribool is3dModeEnabled();
115 
117  void set3dMode( bool enabled );
118 
119 private:
120  bool m_allowAlphaInTF;
121  bool m_interpolation;
122 
123  std::string m_imageSourceId;
124 
125  ::boost::logic::tribool m_3dModeEnabled;
126  SNegatoMPR::SliceMode m_sliceMode;
127 
128 };
129 
130 } //namespace visuVTKAdaptor
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...
This adaptor shows ImageSeries. Creates an adaptor for the image in the series.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.