fw4spl
SNegatoSlicingInteractor.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_SNEGATOSLICINGINTERACTOR_HPP__
8 #define __VISUVTKADAPTOR_SNEGATOSLICINGINTERACTOR_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwData/TransferFunction.hpp>
13 
14 #include <fwDataTools/helper/MedicalImageAdaptor.hpp>
15 
16 #include <fwRenderVTK/IAdaptor.hpp>
17 
18 class VISUVTKADAPTOR_CLASS_API vtkCommand;
19 
20 namespace visuVTKAdaptor
21 {
22 
54 {
55 
56 public:
57 
59 
60  VISUVTKADAPTOR_API SNegatoSlicingInteractor() noexcept;
61 
62  VISUVTKADAPTOR_API virtual ~SNegatoSlicingInteractor() noexcept;
63 
64  VISUVTKADAPTOR_API void startSlicing(double pickedPoint[3]);
65 
66  VISUVTKADAPTOR_API void stopSlicing();
67 
68  VISUVTKADAPTOR_API void updateSlicing( double pickedPoint[3]);
69 
70  VISUVTKADAPTOR_API void pushSlice( int factor, Orientation axis);
71 
76  typedef ::fwCom::Signal< void () > SlicingStartedSignalType;
78  VISUVTKADAPTOR_API static const ::fwCom::Signals::SignalKeyType s_SLICING_STARTED_SIG;
79 
81  typedef ::fwCom::Signal< void () > SlicingStoppedSignalType;
82  VISUVTKADAPTOR_API static const ::fwCom::Signals::SignalKeyType s_SLICING_STOPPED_SIG;
87 protected:
88 
93  void updateSliceIndex(int axial, int frontal, int sagittal);
95 
97  void updateSliceType(int from, int to);
102  VISUVTKADAPTOR_API void configuring() override;
103  VISUVTKADAPTOR_API void starting() override;
104  VISUVTKADAPTOR_API void updating() override;
105  VISUVTKADAPTOR_API void stopping() override;
106 
116  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
117 
118  vtkCommand* m_vtkObserver;
119  float m_priority;
120 
121 private:
122 
127  SlicingStartedSignalType::sptr m_sigSlicingStarted;
130  SlicingStoppedSignalType::sptr m_sigSlicingStopped;
134 };
135 
136 } //namespace visuVTKAdaptor
137 
138 #endif // __VISUVTKADAPTOR_SNEGATOSLICINGINTERACTOR_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...
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.