Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkLevelWindowWidgetContextMenu.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 QMITKLEVELWINDOWWIDGETCONTEXTMENU_H
14 #define QMITKLEVELWINDOWWIDGETCONTEXTMENU_H
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 #include <QMenu>
19 #include <mitkLevelWindowManager.h>
20 #include <mitkLevelWindowPreset.h>
21 
31 {
32  Q_OBJECT
33 
34 public:
36  QmitkLevelWindowWidgetContextMenu(QWidget *parent, Qt::WindowFlags f = nullptr);
38 
43 
49 
52 
55 
59 
62  std::map<QAction *, mitk::LevelWindowProperty::Pointer> m_Images;
63 
69  void GetContextMenu(QMenu *contextMenu);
70 
72  void GetContextMenu();
73 
75  void SetLevelWindowManager(mitk::LevelWindowManager *levelWindowManager);
76 
77 protected:
78 
79  QAction *m_PresetAction;
82 
83 protected Q_SLOTS:
84 
86  void OnSetPreset(const QAction *presetAction);
87 
90  void OnUseOptimizedLevelWindow();
91 
93  void OnUseAllGreyvaluesFromImage();
94 
96  void OnSetFixed();
97 
99  void OnAddPreset();
100 
102  void OnSetDefaultLevelWindow();
103 
105  void OnSetDefaultScaleRange();
106 
108  void OnChangeScaleRange();
109 
111  void OnSetImage(QAction *imageAction);
112 
114  void OnSetMaximumWindow();
115 };
116 
117 #endif // QMITKLEVELWINDOWWIDGETCONTEXTMENU_H
#define MITKQTWIDGETS_EXPORT
std::map< QAction *, mitk::LevelWindowProperty::Pointer > m_Images
Provides a contextmenu for Level/Window functionality.
The LevelWindow class Class to store level/window values.
QMenu * m_ImageSubmenu
submenu with all images for contextmenu
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image...
QMenu * m_PresetSubmenu
submenu with all presets for contextmenu