Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkTextAnnotation2D.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 mitkTextAnnotation2D_h
14 #define mitkTextAnnotation2D_h
15 
16 #include <MitkAnnotationExports.h>
18 #include <mitkVtkAnnotation2D.h>
19 #include <vtkSmartPointer.h>
20 
21 class vtkTextActor;
22 class vtkTextProperty;
23 class vtkPropAssembly;
24 
25 namespace mitk
26 {
29  {
30  public:
32  {
33  public:
36 
38 
40 
42 
44 
46  itk::TimeStamp m_LastUpdateTime;
47 
52  };
53 
55  itkFactorylessNewMacro(Self);
56  itkCloneMacro(Self);
57 
59  void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override;
60 
61  protected:
64 
65  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
66  vtkActor2D *GetVtkActor2D(BaseRenderer *renderer) const override;
67  void UpdateVtkAnnotation2D(mitk::BaseRenderer *renderer) override;
68 
70  explicit TextAnnotation2D();
71 
73  ~TextAnnotation2D() override;
74 
75  private:
78 
80  TextAnnotation2D &operator=(const TextAnnotation2D &);
81  };
82 
83 } // namespace mitk
84 #endif
#define MITKANNOTATION_EXPORT
Base class for mapper specific rendering resources.
Organizes the rendering process.
~LocalStorage()
Default deconstructor of the local storage.
vtkSmartPointer< vtkTextActor > m_STextActor
vtkSmartPointer< vtkTextProperty > m_TextProp
vtkSmartPointer< vtkTextActor > m_TextActor
Actor of a 2D render window.
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
vtkSmartPointer< vtkPropAssembly > m_Assembly
LocalStorage()
Default constructor of the local storage.
vtkSmartPointer< vtkTextProperty > m_STextProp
Displays text on the renderwindow.
TextAnnotation2D()
explicit constructor which disallows implicit conversions
vtkProp * GetVtkProp(BaseRenderer *renderer) const override
Create the VTK prop representing this annotation.
mitkClassMacro(TextAnnotation2D, mitk::VtkAnnotation2D)
~TextAnnotation2D() override
virtual destructor in order to derive from this class
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
Annotation::Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const override
Returns position and size of the Annotation on the display.
vtkActor2D * GetVtkActor2D(BaseRenderer *renderer) const override
void UpdateVtkAnnotation2D(mitk::BaseRenderer *renderer) override
void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override
Sets position and size of the Annotation on the display.
Base class for VTK-based 2D annotations rendered as vtkActor2D elements.
Find image slices visible on a given plane.
Container for position and size on the display.