Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
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 // berry
28 #include <berryIBerryPreferences.h>
29 
30 // vtk
31 #include <vtkImageData.h>
32 #include <vtkSmartPointer.h>
33 
34 // qt
35 #include <QString>
36 #include <QStringList>
37 
44 {
45 
46 public:
47 
49 
50  enum class Colormap
51  {
52  BlackAndWhite = 0 // black background, white decoration
53  };
54 
55  void DecorationPreferencesChanged(const berry::IBerryPreferences* preferences);
56 
64  void ShowDecorations(bool show, const QStringList& decorations);
70  bool IsDecorationVisible(const QString &decoration) const;
71  QStringList GetDecorations() const;
72 
73  void SetupLogo(const char* path);
74  void ShowLogo(bool show);
75  bool IsLogoVisible() const;
76 
77  void SetColormap(Colormap colormap);
78 
79  void SetDecorationColor(const QString& widgetID, const mitk::Color& color);
80  void SetAllDecorationColors(const mitk::Color& color);
81  mitk::Color GetDecorationColor(const QString& widgetID) const;
82 
83  void ShowColoredRectangle(const QString& widgetID, bool show);
84  void ShowAllColoredRectangles(bool show);
85  bool IsColoredRectangleVisible(const QString& widgetID) const;
86  bool AreAllColoredRectanglesVisible() const;
87 
97  void SetGradientBackgroundColors(const mitk::Color& upper, const mitk::Color& lower, const QString& widgetID);
106  void SetAllGradientBackgroundColors(const mitk::Color& upper, const mitk::Color& lower);
107  void FillAllGradientBackgroundColorsWithBlack();
108  void ShowGradientBackground(const QString& widgetID, bool show);
109  void ShowAllGradientBackgrounds(bool show);
119  std::pair<mitk::Color, mitk::Color> GetGradientBackgroundColors(const QString& widgetID) const;
120  bool IsGradientBackgroundOn(const QString& widgetID) const;
121  bool AreAllGradientBackgroundsOn() const;
122 
123  void SetCornerAnnotationText(const QString& widgetID, const std::string& cornerAnnotation);
124  std::string GetCornerAnnotationText(const QString& widgetID) const;
125  void ShowCornerAnnotation(const QString& widgetID, bool show);
126  void ShowAllCornerAnnotations(bool show);
127  bool IsCornerAnnotationVisible(const QString& widgetID) const;
128  bool AreAllCornerAnnotationsVisible() const;
129 
130 private:
131 
132  vtkSmartPointer<vtkImageData> GetVtkLogo(const char* path);
133  void SetLogo(vtkSmartPointer<vtkImageData> vtkLogo);
134 
135  QmitkAbstractMultiWidget* m_MultiWidget;
136  mitk::LogoAnnotation::Pointer m_LogoAnnotation;
137 
138 };
139 
140 #endif // QMITKMULTIWIDGETDECORATIONMANAGER_H
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
#define MITK_QT_COMMON
The &#39;QmitkAbstractMultiWidget&#39; is a &#39;QWidget&#39; that can be subclassed to display multiple render windo...