Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkLineEditLevelWindowWidget.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 QmitkLineEditLevelWindowWidget_h
14 #define QmitkLineEditLevelWindowWidget_h
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 // mitk core
19 #include <mitkLevelWindowManager.h>
20 
21 // qt
22 #include <QWidget>
23 
25 class QLineEdit;
26 
41 {
42  Q_OBJECT
43 
44 public:
50  QmitkLineEditLevelWindowWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
51 
53 
55  QLineEdit *m_LevelInput;
56 
58  QLineEdit *m_WindowInput;
59 
62 
64  mitk::LevelWindowManager::Pointer m_Manager;
65 
71 
77 
83 
84 private:
86  void contextMenuEvent(QContextMenuEvent *) override;
87 
89  void OnPropertyModified(const itk::EventObject &e);
90 
91 public Q_SLOTS:
92 
98  void SetLevelValue();
99 
106 
107 protected:
108  unsigned long m_ObserverTag;
110 
112 };
113 
114 #endif
#define MITKQTWIDGETS_EXPORT
Provides a context menu for level/window manipulation.
Widget with two text input fields for direct numeric entry of level and window values.
void SetWindowValue()
Reads the window input field and applies the value.
~QmitkLineEditLevelWindowWidget() override
QLineEdit * m_LevelInput
Input field for the level (center) value.
void SetLevelValue()
Reads the level input field and applies the value.
mitk::LevelWindow m_LevelWindow
Stores the current level/window values manipulated by this widget.
QLineEdit * m_WindowInput
Input field for the window (width) value.
void SetLevelWindowManager(mitk::LevelWindowManager *levelWindowManager)
Sets the LevelWindowManager for this widget.
void SetDataStorage(mitk::DataStorage *ds)
Sets the DataStorage that holds all image nodes.
mitk::LevelWindowManager::Pointer m_Manager
The LevelWindowManager responsible for collecting and delivering level/window changes.
QmitkLevelWindowWidgetContextMenu * m_Contextmenu
mitk::LevelWindowManager * GetManager()
Returns the LevelWindowManager used by this widget.
QmitkLineEditLevelWindowWidget(QWidget *parent=nullptr, Qt::WindowFlags f={})
Constructs the line edit level/window widget.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
The LevelWindow class Class to store level/window values.