Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkVtkAnnotation2D.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkVtkAnnotation2D_h
14 #define mitkVtkAnnotation2D_h
15 
16 #include <mitkVtkAnnotation.h>
17 #include <MitkAnnotationExports.h>
18 #include <vtkSmartPointer.h>
19 
20 class vtkActor2D;
21 class vtkProperty2D;
22 
23 namespace mitk
24 {
34  {
35  public:
37 
44 
50  void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override;
51 
56  void SetPosition2D(const Point2D &position2D);
57 
63 
68  void SetOffsetVector(const Point2D &OffsetVector);
69 
75 
76  protected:
77  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
78  void UpdateVtkAnnotation(BaseRenderer *renderer) override;
79  virtual void UpdateVtkAnnotation2D(BaseRenderer *renderer) = 0;
80  virtual vtkActor2D *GetVtkActor2D(BaseRenderer *renderer) const = 0;
81 
83  explicit VtkAnnotation2D();
84 
86  ~VtkAnnotation2D() override;
87 
88  private:
91 
93  VtkAnnotation2D &operator=(const VtkAnnotation2D &);
94  };
95 
96 } // namespace mitk
97 #endif
#define MITKANNOTATION_EXPORT
Organizes the rendering process.
Base class for VTK-based 2D annotations rendered as vtkActor2D elements.
void SetOffsetVector(const Point2D &OffsetVector)
Set an offset vector added to the position.
Point2D GetPosition2D() const
Get the 2D position in display coordinates.
virtual void UpdateVtkAnnotation2D(BaseRenderer *renderer)=0
Point2D GetOffsetVector() const
Get the offset vector.
virtual vtkActor2D * GetVtkActor2D(BaseRenderer *renderer) const =0
~VtkAnnotation2D() override
virtual destructor in order to derive from this class
vtkProp * GetVtkProp(BaseRenderer *renderer) const override
Create the VTK prop representing this annotation.
Annotation::Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const override
Get the bounding rectangle of this annotation on the display.
void UpdateVtkAnnotation(BaseRenderer *renderer) override
void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override
Set the bounding rectangle of this annotation on the display.
void SetPosition2D(const Point2D &position2D)
Set the 2D position in display coordinates.
mitkClassMacro(VtkAnnotation2D, VtkAnnotation)
VtkAnnotation2D()
explicit constructor which disallows implicit conversions
Base class for all annotations that use the VTK framework for rendering.
Find image slices visible on a given plane.
Container for position and size on the display.