Medical Imaging Interaction Toolkit  2024.06.99-c26a804d
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 
58 
60  void SetLevelWindowManager(mitk::LevelWindowManager *levelWindowManager);
61 
63  void SetDataStorage(mitk::DataStorage *ds);
64 
66  mitk::LevelWindowManager *GetManager();
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();
84  void SetWindowValue();
85 
86 protected:
87  unsigned long m_ObserverTag;
89 
91 };
92 
93 #endif
QmitkLineEditLevelWindowWidget::m_LevelInput
QLineEdit * m_LevelInput
inputfield for level value
Definition: QmitkLineEditLevelWindowWidget.h:45
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkLineEditLevelWindowWidget
Provides a widget with two lineedit fields, one to change the window value of the current image and o...
Definition: QmitkLineEditLevelWindowWidget.h:33
itk::SmartPointer< Self >
QmitkLineEditLevelWindowWidget::m_LevelWindow
mitk::LevelWindow m_LevelWindow
Definition: QmitkLineEditLevelWindowWidget.h:54
mitk::LevelWindowManager
Provides access to the LevelWindowProperty object and LevelWindow of the "current" image.
Definition: mitkLevelWindowManager.h:51
mitk::LevelWindow
The LevelWindow class Class to store level/window values.
Definition: mitkLevelWindow.h:45
QmitkLevelWindowWidgetContextMenu
Provides a contextmenu for Level/Window functionality.
Definition: QmitkLevelWindowWidgetContextMenu.h:30
QmitkLineEditLevelWindowWidget::m_ObserverTag
unsigned long m_ObserverTag
Definition: QmitkLineEditLevelWindowWidget.h:87
QmitkLineEditLevelWindowWidget::m_WindowInput
QLineEdit * m_WindowInput
inputfield for window value
Definition: QmitkLineEditLevelWindowWidget.h:48
MitkQtWidgetsExports.h
mitk::DataStorage
Data management class that handles 'was created by' relations.
Definition: mitkDataStorage.h:43
QmitkLineEditLevelWindowWidget::m_Manager
mitk::LevelWindowManager::Pointer m_Manager
manager who is responsible to collect and deliver changes on Level/Window
Definition: QmitkLineEditLevelWindowWidget.h:57
QmitkLineEditLevelWindowWidget::m_IsObserverTagSet
bool m_IsObserverTagSet
Definition: QmitkLineEditLevelWindowWidget.h:88
mitkLevelWindowManager.h
QmitkLineEditLevelWindowWidget::m_Contextmenu
QmitkLevelWindowWidgetContextMenu * m_Contextmenu
Definition: QmitkLineEditLevelWindowWidget.h:90