Medical Imaging Interaction Toolkit  2025.12.02
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 
34 {
35  Q_OBJECT
36 
37 public:
39  QmitkLineEditLevelWindowWidget(QWidget *parent = nullptr, Qt::WindowFlags f = {});
40 
43 
45  QLineEdit *m_LevelInput;
46 
48  QLineEdit *m_WindowInput;
49 
55 
57  mitk::LevelWindowManager::Pointer m_Manager;
58 
61 
64 
67 
68 private:
70  void contextMenuEvent(QContextMenuEvent *) override;
71 
73  void OnPropertyModified(const itk::EventObject &e);
74 
75 public Q_SLOTS:
76 
80  void SetLevelValue();
85 
86 protected:
87  unsigned long m_ObserverTag;
89 
91 };
92 
93 #endif
#define MITKQTWIDGETS_EXPORT
Provides a contextmenu for Level/Window functionality.
Provides a widget with two lineedit fields, one to change the window value of the current image and o...
void SetWindowValue()
Read the windowInput and change window and slider when the button "ENTER" was pressed in the windowIn...
~QmitkLineEditLevelWindowWidget() override
destructor
QLineEdit * m_LevelInput
inputfield for level value
void SetLevelValue()
Read the levelInput and change level and slider when the button "ENTER" was pressed in the windowInpu...
QLineEdit * m_WindowInput
inputfield for window value
void SetLevelWindowManager(mitk::LevelWindowManager *levelWindowManager)
sets the manager who is responsible to collect and deliver changes on Level/Window
void SetDataStorage(mitk::DataStorage *ds)
sets the DataStorage which holds all image-nodes
mitk::LevelWindowManager::Pointer m_Manager
manager who is responsible to collect and deliver changes on Level/Window
QmitkLevelWindowWidgetContextMenu * m_Contextmenu
mitk::LevelWindowManager * GetManager()
returns the manager who is responsible to collect and deliver changes on Level/Window
QmitkLineEditLevelWindowWidget(QWidget *parent=nullptr, Qt::WindowFlags f={})
constructor
Data management class that handles 'was created by' relations.
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
The LevelWindow class Class to store level/window values.