Medical Imaging Interaction Toolkit  2025.12.02
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 vtkPropAssembly;
23 
24 namespace mitk
25 {
28  {
29  public:
31  {
32  public:
35 
37 
39 
41 
43 
45  itk::TimeStamp m_LastUpdateTime;
46 
51  };
52 
54  itkFactorylessNewMacro(Self);
55  itkCloneMacro(Self);
56 
58  void SetBoundsOnDisplay(BaseRenderer *renderer, const Bounds &bounds) override;
59 
60  protected:
63 
64  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
65  vtkActor2D *GetVtkActor2D(BaseRenderer *renderer) const override;
66  void UpdateVtkAnnotation2D(mitk::BaseRenderer *renderer) override;
67 
69  explicit TextAnnotation2D();
70 
72  ~TextAnnotation2D() override;
73 
74  private:
77 
79  TextAnnotation2D &operator=(const TextAnnotation2D &);
80  };
81 
82 } // namespace mitk
83 #endif
#define MITKANNOTATION_EXPORT
Base class for mapper specific rendering resources.
~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
This method is implemented by the specific VTKAnnotation in order to create the element as a vtkProp.
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.
The VtkAnnotation2D class is the basis for all VTK based Annotation which create a vtkActor2D element...
Find image slices visible on a given plane.
Container for position and size on the display.