fw4spl
SImageMultiDistances.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_SIMAGEMULTIDISTANCES_HPP__
8 #define __VISUVTKADAPTOR_SIMAGEMULTIDISTANCES_HPP__
9 
10 #include "visuVTKAdaptor/config.hpp"
11 
12 #include <fwData/PointList.hpp>
13 
14 #include <fwRenderVTK/IAdaptor.hpp>
15 
16 class vtkCommand;
17 
18 namespace visuVTKAdaptor
19 {
20 
45 class VISUVTKADAPTOR_CLASS_API SImageMultiDistances : public ::fwRenderVTK::IAdaptor
46 {
47 
48 public:
49 
51 
52  VISUVTKADAPTOR_API SImageMultiDistances() noexcept;
53 
54  VISUVTKADAPTOR_API ~SImageMultiDistances() noexcept;
55 
56  VISUVTKADAPTOR_API void setNeedSubservicesDeletion( bool _needSubservicesDeletion );
57 
58  VISUVTKADAPTOR_API virtual void show(bool showDistances = true);
59 
60 protected:
61 
62  VISUVTKADAPTOR_API void configuring() override;
63  VISUVTKADAPTOR_API void starting() override;
64  VISUVTKADAPTOR_API void updating() override;
65  VISUVTKADAPTOR_API void stopping() override;
66 
75  VISUVTKADAPTOR_API virtual KeyConnectionsMap getAutoConnections() const override;
76 
77  void installSubServices( ::fwData::PointList::sptr pl );
78  ::fwData::Point::sptr screenToWorld(int X, int Y);
79 
80  void createNewDistance( std::string sceneId );
81 
82  std::list< ::fwRenderVTK::IAdaptor::sptr > m_subServices;
83 
84  vtkCommand* m_rightButtonCommand;
85 
86  bool m_needSubservicesDeletion;
87 
88  bool m_filter;
89 
90 private:
91 
96  void removeDistance(fwData::PointList::csptr pointList);
98 
100  void createDistance();
104 };
105 
106 } //namespace visuVTKAdaptor
107 
108 #endif // __VISUVTKADAPTOR_SIMAGEMULTIDISTANCES_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...
STL namespace.
Adaptor to display distance on an image.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
The namespace fwRenderVTK contains classes for rendering with VTK.
Contains the representation of the data objects used in the framework.