Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitkColorBarAnnotation.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 mitkColorBarAnnotation_h
14 #define mitkColorBarAnnotation_h
15 
16 #include "MitkAnnotationExports.h"
18 #include <mitkVtkAnnotation.h>
19 #include <vtkLookupTable.h>
20 #include <vtkSmartPointer.h>
21 
22 class vtkScalarBarActor;
23 
24 namespace mitk
25 {
28  {
29  public:
31  {
32  public:
35 
37  itk::TimeStamp m_LastUpdateTime;
38 
40  LocalStorage();
42  ~LocalStorage();
43  };
44 
46  itkFactorylessNewMacro(Self);
47  itkCloneMacro(Self);
48 
49  void SetDrawAnnotations(bool annotations);
50  bool GetDrawAnnotations() const;
51 
52  void SetOrientationToHorizontal();
53  void SetOrientationToVertical();
54  void SetOrientation(int orientation);
55  int GetOrientation() const;
56 
57  void SetMaxNumberOfColors(int numberOfColors);
58  int GetMaxNumberOfColors() const;
59 
60  void SetNumberOfLabels(int numberOfLabels);
61  int GetNumberOfLabels() const;
62 
63  void SetLookupTable(vtkSmartPointer<vtkLookupTable> table);
64  vtkSmartPointer<vtkLookupTable> GetLookupTable() const;
65 
66  void SetDrawTickLabels(bool ticks);
67  bool GetDrawTickLabels() const;
68 
69  void SetAnnotationTextScaling(bool scale);
70  bool GetAnnotationTextScaling() const;
71 
72  protected:
75 
76  vtkProp *GetVtkProp(BaseRenderer *renderer) const override;
77  void UpdateVtkAnnotation(BaseRenderer *renderer) override;
78 
80  explicit ColorBarAnnotation();
81 
83  ~ColorBarAnnotation() override;
84 
85  private:
88 
90  ColorBarAnnotation &operator=(const ColorBarAnnotation &);
91  };
92 
93 } // namespace mitk
94 #endif
mitkLocalStorageHandler.h
mitk::ColorBarAnnotation
Displays configurable scales on the renderwindow. The scale is determined by the image spacing.
Definition: mitkColorBarAnnotation.h:27
mitk::ColorBarAnnotation::LocalStorage
Definition: mitkColorBarAnnotation.h:30
vtkSmartPointer< vtkScalarBarActor >
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
mitkVtkAnnotation.h
mitk::ColorBarAnnotation::m_LSH
mitk::LocalStorageHandler< LocalStorage > m_LSH
The LocalStorageHandler holds all LocalStorages for the render windows.
Definition: mitkColorBarAnnotation.h:74
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::ColorBarAnnotation::LocalStorage::m_ScalarBarActor
vtkSmartPointer< vtkScalarBarActor > m_ScalarBarActor
Actor of a 2D render window.
Definition: mitkColorBarAnnotation.h:34
mitk::ColorBarAnnotation::LocalStorage::m_LastUpdateTime
itk::TimeStamp m_LastUpdateTime
Timestamp of last update of stored data.
Definition: mitkColorBarAnnotation.h:37
mitk::Annotation::BaseLocalStorage
Base class for mapper specific rendering resources.
Definition: mitkAnnotation.h:39