Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
QmitkMultiWidgetDecorationManager.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 QmitkMultiWidgetDecorationManager_h
14 #define QmitkMultiWidgetDecorationManager_h
15 
17 
18 // mitk core
19 #include <mitkColorProperty.h>
20 
21 // mitk annotation
22 #include <mitkLogoAnnotation.h>
23 
24 // mitk qt widgets
26 
27 // vtk
28 #include <vtkImageData.h>
29 #include <vtkSmartPointer.h>
30 
31 // qt
32 #include <QString>
33 #include <QStringList>
34 
35 namespace mitk
36 {
37  class IPreferences;
38 }
39 
46 {
47 
48 public:
49 
51 
52  enum class Colormap
53  {
54  BlackAndWhite = 0 // black background, white decoration
55  };
56 
57  void DecorationPreferencesChanged(const mitk::IPreferences* preferences);
58 
66  void ShowDecorations(bool show, const QStringList& decorations);
72  bool IsDecorationVisible(const QString &decoration) const;
73  QStringList GetDecorations() const;
74 
75  void SetupLogo(const char* path);
76  void ShowLogo(bool show);
77  bool IsLogoVisible() const;
78 
79  void SetColormap(Colormap colormap);
80 
81  void SetDecorationColor(const QString& widgetID, const mitk::Color& color);
82  void SetAllDecorationColors(const mitk::Color& color);
83  mitk::Color GetDecorationColor(const QString& widgetID) const;
84 
85  void ShowColoredRectangle(const QString& widgetID, bool show);
86  void ShowAllColoredRectangles(bool show);
87  bool IsColoredRectangleVisible(const QString& widgetID) const;
88  bool AreAllColoredRectanglesVisible() const;
89 
99  void SetGradientBackgroundColors(const mitk::Color& upper, const mitk::Color& lower, const QString& widgetID);
108  void SetAllGradientBackgroundColors(const mitk::Color& upper, const mitk::Color& lower);
109  void FillAllGradientBackgroundColorsWithBlack();
110  void ShowGradientBackground(const QString& widgetID, bool show);
111  void ShowAllGradientBackgrounds(bool show);
121  std::pair<mitk::Color, mitk::Color> GetGradientBackgroundColors(const QString& widgetID) const;
122  bool IsGradientBackgroundOn(const QString& widgetID) const;
123  bool AreAllGradientBackgroundsOn() const;
124 
125  void SetCornerAnnotationText(const QString& widgetID, const std::string& cornerAnnotation);
126  std::string GetCornerAnnotationText(const QString& widgetID) const;
127  void ShowCornerAnnotation(const QString& widgetID, bool show);
128  void ShowAllCornerAnnotations(bool show);
129  bool IsCornerAnnotationVisible(const QString& widgetID) const;
130  bool AreAllCornerAnnotationsVisible() const;
131 
132 private:
133 
134  vtkSmartPointer<vtkImageData> GetVtkLogo(const char* path);
135  void SetLogo(vtkSmartPointer<vtkImageData> vtkLogo);
136 
137  QmitkAbstractMultiWidget* m_MultiWidget;
138  mitk::LogoAnnotation::Pointer m_LogoAnnotation;
139 
140 };
141 
142 #endif
mitkLogoAnnotation.h
MITK_QT_COMMON
#define MITK_QT_COMMON
Definition: org_mitk_gui_qt_common_Export.h:26
vtkSmartPointer< vtkImageData >
mitk::Color
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
Definition: mitkColorProperty.h:38
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
QmitkMultiWidgetDecorationManager
Definition: QmitkMultiWidgetDecorationManager.h:45
QmitkAbstractMultiWidget.h
QmitkMultiWidgetDecorationManager::Colormap
Colormap
Definition: QmitkMultiWidgetDecorationManager.h:52
QmitkAbstractMultiWidget
The 'QmitkAbstractMultiWidget' is a 'QWidget' that can be subclassed to display multiple render windo...
Definition: QmitkAbstractMultiWidget.h:53
mitkColorProperty.h
mitk::IPreferences
Interface to application preferences.
Definition: mitkIPreferences.h:50
org_mitk_gui_qt_common_Export.h