Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QMITKLEVELWINDOWWIDGETCONTEXTMENU_H
18 #define QMITKLEVELWINDOWWIDGETCONTEXTMENU_H
19 
20 #include <MitkQtWidgetsExports.h>
21 
22 #include <QMenu>
23 #include <mitkLevelWindowManager.h>
24 #include <mitkLevelWindowPreset.h>
25 
35 {
36  Q_OBJECT
37 
38 public:
40  QmitkLevelWindowWidgetContextMenu(QWidget *parent, Qt::WindowFlags f = nullptr);
42 
47 
53 
56 
59 
63 
66  std::map<QAction *, mitk::LevelWindowProperty::Pointer> m_Images;
67 
73  void getContextMenu(QMenu *contextmenu);
74 
76  void getContextMenu();
77 
79  void setLevelWindowManager(mitk::LevelWindowManager *levelWindowManager);
80 
81 protected:
83  QAction *m_PresetAction;
84 
86  QAction *m_ImageAction;
87 
88 protected slots:
89 
91  void setPreset(QAction *presetAction);
92 
95  void useOptimizedLevelWindow();
96 
98  void useAllGreyvaluesFromImage();
99 
101  void setFixed();
102 
104  void addPreset();
105 
107  void setDefaultLevelWindow();
108 
110  void setDefaultScaleRange();
111 
113  void changeScaleRange();
114 
116  void setImage(QAction *imageAction);
117 
119  void setMaximumWindow();
120 };
121 #endif
#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.
QAction * m_PresetAction
ID of preset selected in contextmenu.
QMenu * m_ImageSubmenu
submenu with all images for contextmenu
QAction * m_ImageAction
ID of image selected in contextmenu.
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image...
QMenu * m_PresetSubmenu
submenu with all presets for contextmenu