Medical Imaging Interaction Toolkit
2025.12.02
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
30
class
MITKQTWIDGETS_EXPORT
QmitkLevelWindowWidgetContextMenu
:
public
QWidget
31
{
32
Q_OBJECT
33
34
public
:
36
QmitkLevelWindowWidgetContextMenu
(QWidget *parent, Qt::WindowFlags f = {});
37
~QmitkLevelWindowWidgetContextMenu
()
override
;
38
42
mitk::LevelWindowPreset
*
m_LevelWindowPreset
;
43
48
mitk::LevelWindow
m_LevelWindow
;
49
51
QMenu *
m_PresetSubmenu
;
52
54
QMenu *
m_ImageSubmenu
;
55
58
mitk::LevelWindowManager
*
m_Manager
;
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
;
80
QAction *
m_AutoTopmostAction
;
81
QAction *
m_SelectedImagesAction
;
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
MitkQtWidgetsExports.h
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition:
MitkQtWidgetsExports.h:15
QmitkLevelWindowWidgetContextMenu
Provides a contextmenu for Level/Window functionality.
Definition:
QmitkLevelWindowWidgetContextMenu.h:31
QmitkLevelWindowWidgetContextMenu::OnUseOptimizedLevelWindow
void OnUseOptimizedLevelWindow()
QmitkLevelWindowWidgetContextMenu::OnUseAllGreyvaluesFromImage
void OnUseAllGreyvaluesFromImage()
calls the mitkLevelWindow SetToImageRange method, so that the greyvalues from whole image will be use...
QmitkLevelWindowWidgetContextMenu::OnSetDefaultLevelWindow
void OnSetDefaultLevelWindow()
resets the current images Level/Window to its default values
QmitkLevelWindowWidgetContextMenu::m_ImageSubmenu
QMenu * m_ImageSubmenu
submenu with all images for contextmenu
Definition:
QmitkLevelWindowWidgetContextMenu.h:54
QmitkLevelWindowWidgetContextMenu::OnSetImage
void OnSetImage(QAction *imageAction)
sets the selected image or the topmost layer image to the new current image
QmitkLevelWindowWidgetContextMenu::OnSetFixed
void OnSetFixed()
sets the level window slider to be fixed
QmitkLevelWindowWidgetContextMenu::OnChangeScaleRange
void OnChangeScaleRange()
changes the current images scalerange
QmitkLevelWindowWidgetContextMenu::m_SelectedImagesAction
QAction * m_SelectedImagesAction
Definition:
QmitkLevelWindowWidgetContextMenu.h:81
QmitkLevelWindowWidgetContextMenu::m_PresetSubmenu
QMenu * m_PresetSubmenu
submenu with all presets for contextmenu
Definition:
QmitkLevelWindowWidgetContextMenu.h:51
QmitkLevelWindowWidgetContextMenu::OnAddPreset
void OnAddPreset()
adds a new Preset for presets-contextmenu
QmitkLevelWindowWidgetContextMenu::QmitkLevelWindowWidgetContextMenu
QmitkLevelWindowWidgetContextMenu(QWidget *parent, Qt::WindowFlags f={})
constructor
QmitkLevelWindowWidgetContextMenu::m_Manager
mitk::LevelWindowManager * m_Manager
Definition:
QmitkLevelWindowWidgetContextMenu.h:58
QmitkLevelWindowWidgetContextMenu::m_LevelWindow
mitk::LevelWindow m_LevelWindow
Definition:
QmitkLevelWindowWidgetContextMenu.h:48
QmitkLevelWindowWidgetContextMenu::m_PresetAction
QAction * m_PresetAction
Definition:
QmitkLevelWindowWidgetContextMenu.h:79
QmitkLevelWindowWidgetContextMenu::m_Images
std::map< QAction *, mitk::LevelWindowProperty::Pointer > m_Images
Definition:
QmitkLevelWindowWidgetContextMenu.h:62
QmitkLevelWindowWidgetContextMenu::GetContextMenu
void GetContextMenu()
returns the contextmenu with standard functions for Level/Window
QmitkLevelWindowWidgetContextMenu::m_LevelWindowPreset
mitk::LevelWindowPreset * m_LevelWindowPreset
Definition:
QmitkLevelWindowWidgetContextMenu.h:42
QmitkLevelWindowWidgetContextMenu::OnSetMaximumWindow
void OnSetMaximumWindow()
sets the window to its maximum Size to fit the scalerange
QmitkLevelWindowWidgetContextMenu::m_AutoTopmostAction
QAction * m_AutoTopmostAction
Definition:
QmitkLevelWindowWidgetContextMenu.h:80
QmitkLevelWindowWidgetContextMenu::OnSetPreset
void OnSetPreset(const QAction *presetAction)
sets level and window value of the current image to the values defined for the selected preset
QmitkLevelWindowWidgetContextMenu::OnSetDefaultScaleRange
void OnSetDefaultScaleRange()
resets the current images scalerange to its default values
QmitkLevelWindowWidgetContextMenu::~QmitkLevelWindowWidgetContextMenu
~QmitkLevelWindowWidgetContextMenu() override
QmitkLevelWindowWidgetContextMenu::SetLevelWindowManager
void SetLevelWindowManager(mitk::LevelWindowManager *levelWindowManager)
lets this object know about the LevelWindowManager to get all images and tell about changes
QmitkLevelWindowWidgetContextMenu::GetContextMenu
void GetContextMenu(QMenu *contextMenu)
mitk::LevelWindowManager
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
Definition:
mitkLevelWindowManager.h:52
mitk::LevelWindowPreset
Definition:
mitkLevelWindowPreset.h:24
mitk::LevelWindow
The LevelWindow class Class to store level/window values.
Definition:
mitkLevelWindow.h:46
mitkLevelWindowManager.h
mitkLevelWindowPreset.h
src
MITK
Modules
QtWidgets
include
QmitkLevelWindowWidgetContextMenu.h
Generated on Mon Feb 23 2026 23:28:13 for Medical Imaging Interaction Toolkit by
1.9.1