7 #ifndef __VISUVTKADAPTOR_SLANDMARKS_HPP__ 8 #define __VISUVTKADAPTOR_SLANDMARKS_HPP__ 10 #include "visuVTKAdaptor/config.hpp" 12 #include <fwData/Landmarks.hpp> 14 #include <fwRenderVTK/IAdaptor.hpp> 15 #include <fwRenderVTK/vtk/fwHandleRepresentation3D.hpp> 17 #include <fwThread/Timer.hpp> 19 #include <vtkHandleWidget.h> 20 #include <vtkSmartPointer.h> 77 VISUVTKADAPTOR_API virtual ~
SLandmarks() noexcept;
79 VISUVTKADAPTOR_API virtual
void show(
bool b = true);
86 VISUVTKADAPTOR_API
void configuring() override;
87 VISUVTKADAPTOR_API
void starting() override;
88 VISUVTKADAPTOR_API
void updating() override;
89 VISUVTKADAPTOR_API
void stopping() override;
104 typedef
std::vector< LandmarkWidgetType > LandmarksWidgetContainerType;
107 typedef
std::map<
std::
string, LandmarksWidgetContainerType > GroupWidgetsMapType;
110 typedef
std::map< LandmarkWidgetType, vtkActor2D* > WidgetLabelMapType;
113 typedef
std::map< LandmarkWidgetType, vtkCommand* > WidgetCommandMapType;
115 typedef
std::pair<
std::
string,
size_t > PointPairType;
118 void addPoint(
std::
string groupName);
121 void insertPoint(
std::
string groupName,
size_t index);
124 void removePoint(
std::
string groupName,
size_t index);
127 void modifyGroup(
std::
string groupName);
130 void removeGroup(
std::
string groupName);
133 void addGroup(
std::
string groupName);
136 void modifyPoint(
std::
string groupName,
size_t index);
139 void renameGroup(
std::
string oldName,
std::
string newName);
142 void selectPoint(
std::
string groupName,
size_t index);
145 void deselectPoint(
std::
string groupName,
size_t index);
148 void changeColor(const vtkSmartPointer< ::
fwRenderVTK::vtk::fwHandleRepresentation3D >& rep,
149 const
std::array<
double, 3>& color1, const
std::array<
double, 3>& color2);
152 void clearLandmarks();
155 vtkSmartPointer<vtkHandleWidget> newHandle(const ::
fwData::Landmarks::sptr& landmarks,
156 const
std::
string& groupName,
160 vtkCommand* m_noSelectionCommand;
163 GroupWidgetsMapType m_handles;
166 WidgetLabelMapType m_labels;
169 WidgetCommandMapType m_commands;
175 PointPairType m_selectedPoint;
187 #endif // __VISUVTKADAPTOR_SLANDMARKS_HPP__ This class is a helper to define the connections of a service and its data.
The namespace visuVTKAdaptor contains the list of adaptors available for the generic scene...
#define fwCoreAllowSharedFromThis()
Generate getSptr and getConstSptr methods.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
vtkSmartPointer< vtkHandleWidget > LandmarkWidgetType
Widget used to display and interact with landmarks.
The namespace fwRenderVTK contains classes for rendering with VTK.
Contains the representation of the data objects used in the framework.
This namespace fwThread provides few tools to execute asynchronous tasks on different threads...
Adaptor for landmarks in the field of an image.
Base class for VTK adaptors.