14 #include <vtkActor2D.h> 15 #include <vtkCoordinate.h> 16 #include <vtkProperty2D.h> 30 bounds.
Position = actor->GetPosition();
31 bounds.
Size = actor->GetPosition2();
39 actor->SetWidth(bounds.
Size[0]);
40 actor->SetHeight(bounds.
Size[1]);
46 float color[3] = {1, 1, 1};
50 prop->GetProperty()->SetColor(color[0], color[1], color[2]);
51 prop->GetProperty()->SetOpacity(opacity);
58 SetProperty(
"VtkAnnotation2D.Position2D", position2dProperty.GetPointer());
65 GetPropertyValue<mitk::Point2D>(
"VtkAnnotation2D.Position2D", position2D);
72 SetProperty(
"VtkAnnotation2D.OffsetVector", OffsetVectorProperty.GetPointer());
79 GetPropertyValue<mitk::Point2D>(
"VtkAnnotation2D.OffsetVector", OffsetVector);
VtkAnnotation2D()
explicit constructor which disallows implicit conversions
void SetProperty(const std::string &propertyKey, const BaseProperty::Pointer &property)
Set the property (instance of BaseProperty) with key propertyKey in the PropertyList of the renderer ...
virtual void UpdateVtkAnnotation2D(BaseRenderer *renderer)=0
void SetPosition2D(const Point2D &position2D)
vtkProp * GetVtkProp(BaseRenderer *renderer) const override
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp...
Point2D GetOffsetVector() const
virtual vtkActor2D * GetVtkActor2D(BaseRenderer *renderer) const =0
Container for position and size on the display.
Point2D GetPosition2D() const
itk::Point< double, 2 > Size
Organizes the rendering process.
itk::Point< double, 2 > Position
Annotation::Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const override
Returns position and size of the Annotation on the display.
bool GetColor(float rgb[], const std::string &propertyKey="color") const
Convenience access method for color properties (instances of ColorProperty)
~VtkAnnotation2D() override
virtual destructor in order to derive from this class
bool GetOpacity(float &opacity, const std::string &propertyKey="opacity") const
Convenience access method for opacity properties (instances of FloatProperty)
void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override
Sets position and size of the Annotation on the display.
void UpdateVtkAnnotation(BaseRenderer *renderer) override
void SetOffsetVector(const Point2D &OffsetVector)