Medical Imaging Interaction Toolkit  2025.12.02
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 
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);
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 
90 
93 
94  private:
97 
99  ScaleLegendAnnotation &operator=(const ScaleLegendAnnotation &);
100  };
101 
102 } // namespace mitk
103 #endif
#define MITKANNOTATION_EXPORT
Base class for mapper specific rendering resources.
~LocalStorage()
Default deconstructor of the local storage.
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
LocalStorage()
Default constructor of the local storage.
vtkSmartPointer< vtkLegendScaleActor > m_legendScaleActor
Actor of a 2D render window.
Displays configurable scales on the renderwindow. The scale is determined by the image spacing.
bool GetRightAxisVisibility() const
void SetRightAxisVisibility(bool visibility)
double GetCornerOffsetFactor() const
mitkClassMacro(ScaleLegendAnnotation, mitk::VtkAnnotation)
void SetBottomBorderOffset(int offset)
void SetTopAxisVisibility(bool visibility)
void SetLeftBorderOffset(int offset)
double GetFontFactor() const
void SetFontFactor(double fontFactor)
~ScaleLegendAnnotation() 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.
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
bool GetLegendVisibility() const
void SetCornerOffsetFactor(double offsetFactor)
ScaleLegendAnnotation()
explicit constructor which disallows implicit conversions
bool GetBottomAxisVisibility() const
bool GetLeftAxisVisibility() const
bool GetTopAxisVisibility() const
void SetBottomAxisVisibility(bool visibility)
void SetLeftAxisVisibility(bool visibility)
void SetLegendVisibility(bool visibility)
void SetRightBorderOffset(int offset)
void UpdateVtkAnnotation(BaseRenderer *renderer) override
void SetTopBorderOffset(int offset)
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.