9 #include "visuVTKAdaptor/SPointLabel.hpp" 11 #include <fwData/Point.hpp> 12 #include <fwData/String.hpp> 14 #include <fwDataTools/fieldHelper/Image.hpp> 15 #include <fwDataTools/fieldHelper/MedicalImageHelpers.hpp> 17 #include <fwServices/macros.hpp> 19 #include <boost/format.hpp> 21 #include <vtkRenderer.h> 22 #include <vtkTextActor.h> 31 const ::fwServices::IService::KeyType SPointLabel::s_POINT_INPUT =
"point";
35 SPointLabel::SPointLabel() :
38 m_actor->GetPositionCoordinate()->SetCoordinateSystemToWorld();
39 m_actor->GetPosition2Coordinate()->SetCoordinateSystemToWorld();
61 ::fwData::Point::csptr
point = this->getInput< ::fwData::Point >(s_POINT_INPUT);
68 std::string label = strField->
value();
70 this->setText( label );
72 const double px = point->getCoord()[0];
73 const double py = point->getCoord()[1];
74 const double pz = point->getCoord()[2];
76 m_actor->GetPositionCoordinate()->SetValue(px, py, pz);
virtual VISUVTKADAPTOR_API KeyConnectionsMap getAutoConnections() const override
Returns proposals to connect service slots to associated object signals, this method is used for obj/...
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...
virtual VISUVTKADAPTOR_API void stopping() override
Uninitialize the service activity. The stop() method is always invoked before destroying a service...
VISUVTKADAPTOR_API void updating() override
Perform some computations according to object (this service is attached to) attribute values and its ...
VISUVTKADAPTOR_API void starting() override
Initialize the service activity.
virtual VISUVTKADAPTOR_API void starting() override
Initialize the service activity.
FWRENDERVTK_API void requestRender()
notify a render request iff vtkPipeline is modified
FWRENDERVTK_API void setVtkPipelineModified()
End-user have to call this method when a vtk structure has been modified, thus a render request will ...
T & value() noexcept
Get the value (mutable version).
VISUVTKADAPTOR_API void updating() override
Perform some computations according to object (this service is attached to) attribute values and its ...
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
static FWDATA_APIconst::fwCom::Signals::SignalKeyType s_MODIFIED_SIG
Key in m_signals map of signal m_sigModified.
Displays a label on a point. The label is given in point field "m_labelId".
static FWSERVICES_APIconst::fwCom::Slots::SlotKeyType s_UPDATE_SLOT
Slot to call start method.
VISUVTKADAPTOR_API void stopping() override
Uninitialize the service activity. The stop() method is always invoked before destroying a service...
This class contains an std::string value.
Base class for VTK adaptors.