Medical Imaging Interaction Toolkit  2025.12.02
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 {
30  {
31  public:
34  void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override;
35 
36  void SetPosition2D(const Point2D &position2D);
37 
39 
40  void SetOffsetVector(const Point2D &OffsetVector);
41 
43 
44  protected:
45  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
46  void UpdateVtkAnnotation(BaseRenderer *renderer) override;
47  virtual void UpdateVtkAnnotation2D(BaseRenderer *renderer) = 0;
48  virtual vtkActor2D *GetVtkActor2D(BaseRenderer *renderer) const = 0;
49 
51  explicit VtkAnnotation2D();
52 
54  ~VtkAnnotation2D() override;
55 
56  private:
59 
61  VtkAnnotation2D &operator=(const VtkAnnotation2D &);
62  };
63 
64 } // namespace mitk
65 #endif
#define MITKANNOTATION_EXPORT
The VtkAnnotation2D class is the basis for all VTK based Annotation which create a vtkActor2D element...
void SetOffsetVector(const Point2D &OffsetVector)
Point2D GetPosition2D() const
virtual void UpdateVtkAnnotation2D(BaseRenderer *renderer)=0
Point2D GetOffsetVector() const
virtual vtkActor2D * GetVtkActor2D(BaseRenderer *renderer) const =0
~VtkAnnotation2D() override
virtual destructor in order to derive from this class
vtkProp * GetVtkProp(BaseRenderer *renderer) const override
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp.
Annotation::Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const override
Returns position and size of the Annotation on the display.
void UpdateVtkAnnotation(BaseRenderer *renderer) override
void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override
Sets position and size of the Annotation on the display.
void SetPosition2D(const Point2D &position2D)
mitkClassMacro(VtkAnnotation2D, VtkAnnotation)
VtkAnnotation2D()
explicit constructor which disallows implicit conversions
The VtkAnnotation class is the base for all Annotation which are using the VTK framework to render th...
Find image slices visible on a given plane.
Container for position and size on the display.