Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
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 TEXTAnnotation2D_H
14 #define TEXTAnnotation2D_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:
34  vtkSmartPointer<vtkTextActor> m_TextActor;
35 
36  vtkSmartPointer<vtkTextProperty> m_TextProp;
37 
38  vtkSmartPointer<vtkTextActor> m_STextActor;
39 
40  vtkSmartPointer<vtkTextProperty> m_STextProp;
41 
42  vtkSmartPointer<vtkPropAssembly> m_Assembly;
43 
45  itk::TimeStamp m_LastUpdateTime;
46 
48  LocalStorage();
50  ~LocalStorage();
51  };
52 
54  itkFactorylessNewMacro(Self);
55  itkCloneMacro(Self);
56 
57  Annotation::Bounds GetBoundsOnDisplay(BaseRenderer *renderer) const override;
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 // TEXTAnnotation2D_H
The VtkAnnotation2D class is the basis for all VTK based Annotation which create a vtkActor2D element...
Container for position and size on the display.
#define MITKANNOTATION_EXPORT
vtkSmartPointer< vtkTextActor > m_TextActor
Actor of a 2D render window.
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
Base class for mapper specific rendering ressources.
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Displays text on the renderwindow.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
Base class for all Annotation This class is to be implemented in order to create Annotation which are...
vtkSmartPointer< vtkTextProperty > m_STextProp
vtkSmartPointer< vtkTextActor > m_STextActor
vtkSmartPointer< vtkPropAssembly > m_Assembly
vtkSmartPointer< vtkTextProperty > m_TextProp