7 #ifndef __SCENE2D_ADAPTOR_STRANSFERFUNCTION_HPP__ 8 #define __SCENE2D_ADAPTOR_STRANSFERFUNCTION_HPP__ 10 #include "scene2D/config.hpp" 12 #include <fwData/TransferFunction.hpp> 14 #include <fwDataTools/helper/MedicalImageAdaptor.hpp> 16 #include <fwRenderQt/IAdaptor.hpp> 72 SCENE2D_API
void configuring() override;
76 SCENE2D_API
void starting() override;
80 SCENE2D_API
void updating() override;
84 SCENE2D_API
void stopping() override;
88 SCENE2D_API
void processInteraction( ::
fwRenderQt::data::Event& _event ) override;
105 QGraphicsEllipseItem* buildCircle(::
fwData::TransferFunction::TFValueType value,
106 ::
fwData::TransferFunction::TFColor color);
110 void buildLinesAndPolygons();
113 void buildLinearLinesAndPolygons();
116 void buildNearestLinesAndPolygons();
127 void updateImageTF();
130 void doubleClickEvent(QGraphicsEllipseItem* circle, ::
fwData::TransferFunction::TFColor& tfColor);
133 void leftButtonEvent(QGraphicsEllipseItem* circle, ::
fwRenderQt::data::Event& _event);
138 void mouseMoveEvent(QGraphicsEllipseItem* circle,
139 ::
fwData::TransferFunction::TFValueType tfPoint,
143 void mouseButtonReleaseEvent(QGraphicsEllipseItem* circle, ::
fwRenderQt::data::Event& _event);
146 void rightButtonEvent(::
fwData::TransferFunction::TFValueType tfPoint,
151 void doubleClickEvent( ::
fwRenderQt::data::Event& _event);
154 double pointValue(QGraphicsEllipseItem* circle);
157 QPen m_linePen, m_circlePen;
161 std::vector< QGraphicsItem* > m_linesAndPolygons;
164 std::vector< QGraphicsEllipseItem* > m_circles;
167 QGraphicsItemGroup* m_layer;
170 double m_circleWidth, m_circleHeight;
173 ::
fwData::TransferFunction::TFDataType m_TFPoints;
179 bool m_pointIsCaptured;
182 QGraphicsEllipseItem* m_capturedCircle;
190 #endif // __SCENE2D_ADAPTOR_STRANSFERFUNCTION_HPP__ Root class for all scene2d adaptors.
This class is a helper to define the connections of a service and its data.
This bundles contains data and services used to display a 2D Qt scene.
IAdaptor implementation to display a transfer function.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Contains the representation of the data objects used in the framework.
The namespace fwRenderQt contains classes for rendering with Qt.