18 #include <vtkActor2D.h>
19 #include <vtkCoordinate.h>
20 #include <vtkProperty2D.h>
33 vtkSmartPointer<vtkActor2D> actor = GetVtkActor2D(renderer);
34 bounds.
Position = actor->GetPosition();
35 bounds.
Size = actor->GetPosition2();
41 vtkSmartPointer<vtkActor2D> actor = GetVtkActor2D(renderer);
43 actor->SetWidth(bounds.
Size[0]);
44 actor->SetHeight(bounds.
Size[1]);
49 vtkActor2D *prop = GetVtkActor2D(renderer);
50 float color[3] = {1, 1, 1};
52 GetColor(color, renderer);
53 GetOpacity(opacity, renderer);
54 prop->GetProperty()->SetColor(color[0], color[1], color[2]);
55 prop->GetProperty()->SetOpacity(opacity);
56 UpdateVtkOverlay2D(renderer);
62 SetProperty(
"VtkOverlay2D.Position2D", position2dProperty.GetPointer(), renderer);
69 GetPropertyValue<mitk::Point2D>(
"VtkOverlay2D.Position2D", position2D, renderer);
76 SetProperty(
"VtkOverlay2D.OffsetVector", OffsetVectorProperty.GetPointer(), renderer);
83 GetPropertyValue<mitk::Point2D>(
"VtkOverlay2D.OffsetVector", OffsetVector, renderer);
89 return GetVtkActor2D(renderer);
Point2D GetPosition2D(mitk::BaseRenderer *renderer=NULL) const
itk::Point< double, 2 > Size
Organizes the rendering process.
itk::Point< double, 2 > Position
void SetOffsetVector(const Point2D &OffsetVector, BaseRenderer *renderer=NULL)
virtual ~VtkOverlay2D()
virtual destructor in order to derive from this class
virtual void UpdateVtkOverlay(BaseRenderer *renderer) override
virtual vtkProp * GetVtkProp(BaseRenderer *renderer) const override
This method is implemented by the specific VTKOverlays in order to create the element as a vtkProp...
virtual void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override
Sets position and size of the overlay on the display.
virtual Overlay::Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const override
Returns position and size of the overlay on the display.
void SetPosition2D(const Point2D &position2D, mitk::BaseRenderer *renderer=NULL)
VtkOverlay2D()
explicit constructor which disallows implicit conversions
Point2D GetOffsetVector(mitk::BaseRenderer *renderer=NULL) const
Container for position and size on the display.