Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkScaleLegendAnnotation.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 mitkScaleLegendAnnotation_h
14 #define mitkScaleLegendAnnotation_h
15 
16 #include "MitkAnnotationExports.h"
18 #include <mitkVtkAnnotation.h>
19 #include <vtkSmartPointer.h>
20 
21 class vtkLegendScaleActor;
22 
23 namespace mitk
24 {
27  {
28  public:
30  {
31  public:
34 
36  itk::TimeStamp m_LastUpdateTime;
37 
39  LocalStorage();
41  ~LocalStorage();
42  };
43 
45  itkFactorylessNewMacro(Self);
46  itkCloneMacro(Self);
47 
48  void SetRightAxisVisibility(bool visibility);
49  bool GetRightAxisVisibility() const;
50 
51  void SetLeftAxisVisibility(bool visibility);
52  bool GetLeftAxisVisibility() const;
53 
54  void SetTopAxisVisibility(bool visibility);
55  bool GetTopAxisVisibility() const;
56 
57  void SetBottomAxisVisibility(bool visibility);
58  bool GetBottomAxisVisibility() const;
59 
60  void SetLegendVisibility(bool visibility);
61  bool GetLegendVisibility() const;
62 
63  void SetRightBorderOffset(int offset);
64  int GetRightBorderOffset() const;
65 
66  void SetLeftBorderOffset(int offset);
67  int GetLeftBorderOffset() const;
68 
69  void SetTopBorderOffset(int offset);
70  int GetTopBorderOffset() const;
71 
72  void SetBottomBorderOffset(int offset);
73  int GetBottomBorderOffset() const;
74 
75  void SetFontFactor(double fontFactor);
76  double GetFontFactor() const;
77 
78  void SetCornerOffsetFactor(double offsetFactor);
79  double GetCornerOffsetFactor() const;
80 
81  protected:
84 
85  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
86  void UpdateVtkAnnotation(BaseRenderer *renderer) override;
87 
89  explicit ScaleLegendAnnotation();
90 
92  ~ScaleLegendAnnotation() override;
93 
94  private:
97 
99  ScaleLegendAnnotation &operator=(const ScaleLegendAnnotation &);
100  };
101 
102 } // namespace mitk
103 #endif
mitk::ScaleLegendAnnotation::LocalStorage::m_legendScaleActor
vtkSmartPointer< vtkLegendScaleActor > m_legendScaleActor
Actor of a 2D render window.
Definition: mitkScaleLegendAnnotation.h:33
mitkLocalStorageHandler.h
vtkSmartPointer< vtkLegendScaleActor >
MitkAnnotationExports.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::LocalStorageHandler< LocalStorage >
MITKANNOTATION_EXPORT
#define MITKANNOTATION_EXPORT
Definition: MitkAnnotationExports.h:15
mitk::ScaleLegendAnnotation::LocalStorage::m_LastUpdateTime
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Definition: mitkScaleLegendAnnotation.h:36
mitk::ScaleLegendAnnotation::m_LSH
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
Definition: mitkScaleLegendAnnotation.h:83
mitkVtkAnnotation.h
mitk::ScaleLegendAnnotation
Displays configurable scales on the renderwindow. The scale is determined by the image spacing.
Definition: mitkScaleLegendAnnotation.h:26
mitk::VtkAnnotation
The VtkAnnotation class is the base for all Annotation which are using the VTK framework to render th...
Definition: mitkVtkAnnotation.h:28
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
mitk::ScaleLegendAnnotation::LocalStorage
Definition: mitkScaleLegendAnnotation.h:29
mitk::Annotation::BaseLocalStorage
Base class for mapper specific rendering resources.
Definition: mitkAnnotation.h:39