Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Provides a contextmenu for Level/Window functionality. More...
#include <QmitkLevelWindowWidgetContextMenu.h>
Public Member Functions | |
QmitkLevelWindowWidgetContextMenu (QWidget *parent, Qt::WindowFlags f=nullptr) | |
constructor More... | |
~QmitkLevelWindowWidgetContextMenu () override | |
void | GetContextMenu (QMenu *contextMenu) |
void | GetContextMenu () |
returns the contextmenu with standard functions for Level/Window More... | |
void | SetLevelWindowManager (mitk::LevelWindowManager *levelWindowManager) |
lets this object know about the LevelWindowManager to get all images and tell about changes More... | |
Public Attributes | |
mitk::LevelWindowPreset * | m_LevelWindowPreset |
mitk::LevelWindow | m_LevelWindow |
QMenu * | m_PresetSubmenu |
submenu with all presets for contextmenu More... | |
QMenu * | m_ImageSubmenu |
submenu with all images for contextmenu More... | |
mitk::LevelWindowManager * | m_Manager |
std::map< QAction *, mitk::LevelWindowProperty::Pointer > | m_Images |
Protected Slots | |
void | OnSetPreset (const QAction *presetAction) |
sets level and window value of the current image to the values defined for the selected preset More... | |
void | OnUseOptimizedLevelWindow () |
void | OnUseAllGreyvaluesFromImage () |
calls the mitkLevelWindow SetToImageRange method, so that the greyvalues from whole image will be used More... | |
void | OnSetFixed () |
sets the level window slider to be fixed More... | |
void | OnAddPreset () |
adds a new Preset for presets-contextmenu More... | |
void | OnSetDefaultLevelWindow () |
resets the current images Level/Window to its default values More... | |
void | OnSetDefaultScaleRange () |
resets the current images scalerange to its default values More... | |
void | OnChangeScaleRange () |
changes the current images scalerange More... | |
void | OnSetImage (QAction *imageAction) |
sets the selected image or the topmost layer image to the new current image More... | |
void | OnSetMaximumWindow () |
sets the window to its maximum Size to fit the scalerange More... | |
Protected Attributes | |
QAction * | m_PresetAction |
QAction * | m_AutoTopmostAction |
QAction * | m_SelectedImagesAction |
Provides a contextmenu for Level/Window functionality.
Either creates a new contextmenu with standard functions or adds Level/Window standard functions to an predefined contextmenu.
Definition at line 30 of file QmitkLevelWindowWidgetContextMenu.h.
QmitkLevelWindowWidgetContextMenu::QmitkLevelWindowWidgetContextMenu | ( | QWidget * | parent, |
Qt::WindowFlags | f = nullptr |
||
) |
constructor
Definition at line 25 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindowPreset::LoadPreset(), m_LevelWindowPreset, and mitk::LevelWindowPreset::New().
|
override |
Definition at line 32 of file QmitkLevelWindowWidgetContextMenu.cpp.
References m_LevelWindowPreset.
void QmitkLevelWindowWidgetContextMenu::GetContextMenu | ( | QMenu * | contextMenu | ) |
returns the contextmenu with standard functions for Level/Window
input is a prefilled contextmenu to which standard functions will be added
Definition at line 182 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::DataNode::GetBoolProperty(), mitk::LevelWindowPreset::getLevelPresets(), mitk::LevelWindowManager::GetLevelWindow(), mitk::LevelWindowManager::GetLevelWindowProperty(), mitk::DataNode::GetName(), mitk::DataNode::GetProperty(), mitk::LevelWindowManager::GetRelevantNodes(), mitk::LevelWindowManager::IsAutoTopMost(), mitk::LevelWindow::IsFixed(), mitk::LevelWindowManager::IsSelectedImages(), mitk::DataNode::IsVisible(), m_AutoTopmostAction, m_Images, m_ImageSubmenu, m_LevelWindow, m_LevelWindowPreset, m_Manager, m_PresetAction, m_PresetSubmenu, m_SelectedImagesAction, OnAddPreset(), OnChangeScaleRange(), OnSetDefaultLevelWindow(), OnSetDefaultScaleRange(), OnSetFixed(), OnSetImage(), OnSetMaximumWindow(), OnSetPreset(), OnUseAllGreyvaluesFromImage(), and OnUseOptimizedLevelWindow().
Referenced by QmitkLineEditLevelWindowWidget::SetWindowValue(), and QmitkSliderLevelWindowWidget::Update().
void QmitkLevelWindowWidgetContextMenu::GetContextMenu | ( | ) |
returns the contextmenu with standard functions for Level/Window
Definition at line 296 of file QmitkLevelWindowWidgetContextMenu.cpp.
|
protectedslot |
adds a new Preset for presets-contextmenu
Definition at line 83 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindow::GetLevel(), mitk::LevelWindowPreset::getLevelPresets(), QmitkLevelWindowPresetDefinitionDialog::getLevelPresets(), mitk::LevelWindow::GetWindow(), mitk::LevelWindowPreset::getWindowPresets(), QmitkLevelWindowPresetDefinitionDialog::getWindowPresets(), m_LevelWindow, m_LevelWindowPreset, mitk::LevelWindowPreset::newPresets(), and QmitkLevelWindowPresetDefinitionDialog::setPresets().
Referenced by GetContextMenu().
|
protectedslot |
changes the current images scalerange
Definition at line 138 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::RenderingManager::GetInstance(), mitk::LevelWindow::GetLevel(), QmitkLevelWindowRangeChangeDialog::getLowerLimit(), mitk::LevelWindow::GetRangeMax(), mitk::LevelWindow::GetRangeMin(), QmitkLevelWindowRangeChangeDialog::getUpperLimit(), mitk::LevelWindow::GetWindow(), m_LevelWindow, m_Manager, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindow::SetLevelWindow(), mitk::LevelWindowManager::SetLevelWindow(), QmitkLevelWindowRangeChangeDialog::setLowerLimit(), mitk::LevelWindow::SetRangeMinMax(), and QmitkLevelWindowRangeChangeDialog::setUpperLimit().
Referenced by GetContextMenu().
|
protectedslot |
resets the current images Level/Window to its default values
Definition at line 116 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::RenderingManager::GetInstance(), m_LevelWindow, m_Manager, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindow::ResetDefaultLevelWindow(), and mitk::LevelWindowManager::SetLevelWindow().
Referenced by GetContextMenu().
|
protectedslot |
resets the current images scalerange to its default values
Definition at line 130 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::RenderingManager::GetInstance(), mitk::LevelWindow::GetLevel(), mitk::LevelWindow::GetWindow(), m_LevelWindow, m_Manager, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindow::ResetDefaultRangeMinMax(), mitk::LevelWindow::SetLevelWindow(), and mitk::LevelWindowManager::SetLevelWindow().
Referenced by GetContextMenu().
|
protectedslot |
sets the level window slider to be fixed
Definition at line 96 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindow::GetFixed(), m_LevelWindow, m_Manager, mitk::LevelWindow::SetFixed(), and mitk::LevelWindowManager::SetLevelWindow().
Referenced by GetContextMenu().
|
protectedslot |
sets the selected image or the topmost layer image to the new current image
Definition at line 152 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindowManager::IsAutoTopMost(), mitk::LevelWindowManager::IsSelectedImages(), m_AutoTopmostAction, m_Images, m_Manager, m_SelectedImagesAction, mitk::LevelWindowManager::SetAutoTopMostImage(), mitk::LevelWindowManager::SetLevelWindowProperty(), and mitk::LevelWindowManager::SetSelectedImages().
Referenced by GetContextMenu().
|
protectedslot |
sets the window to its maximum Size to fit the scalerange
Definition at line 123 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::RenderingManager::GetInstance(), m_LevelWindow, m_Manager, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindowManager::SetLevelWindow(), and mitk::LevelWindow::SetToMaxWindowSize().
Referenced by GetContextMenu().
|
protectedslot |
sets level and window value of the current image to the values defined for the selected preset
Definition at line 37 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::RenderingManager::GetInstance(), mitk::LevelWindowPreset::getLevel(), mitk::LevelWindow::GetRangeMax(), mitk::LevelWindow::GetRangeMin(), mitk::LevelWindowPreset::getWindow(), m_LevelWindow, m_LevelWindowPreset, m_Manager, m_PresetAction, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindow::SetLevelWindow(), and mitk::LevelWindowManager::SetLevelWindow().
Referenced by GetContextMenu().
|
protectedslot |
calls the mitkLevelWindow SetToImageRange method, so that the greyvalues from whole image will be used
Definition at line 102 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindowManager::GetCurrentImage(), mitk::RenderingManager::GetInstance(), m_LevelWindow, m_Manager, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindowManager::SetLevelWindow(), and mitk::LevelWindow::SetToImageRange().
Referenced by GetContextMenu().
|
protectedslot |
calls the mitkLevelWindow SetAuto method with guessByCentralSlice false, so that the greyvalues from whole image will be considered
Definition at line 109 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindowManager::GetCurrentImage(), mitk::RenderingManager::GetInstance(), m_LevelWindow, m_Manager, mitk::RenderingManager::RequestUpdateAll(), mitk::LevelWindow::SetAuto(), and mitk::LevelWindowManager::SetLevelWindow().
Referenced by GetContextMenu().
void QmitkLevelWindowWidgetContextMenu::SetLevelWindowManager | ( | mitk::LevelWindowManager * | levelWindowManager | ) |
lets this object know about the LevelWindowManager to get all images and tell about changes
Definition at line 78 of file QmitkLevelWindowWidgetContextMenu.cpp.
References m_Manager.
Referenced by QmitkLineEditLevelWindowWidget::SetWindowValue(), and QmitkSliderLevelWindowWidget::Update().
|
protected |
Definition at line 80 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), and OnSetImage().
std::map<QAction *, mitk::LevelWindowProperty::Pointer> QmitkLevelWindowWidgetContextMenu::m_Images |
map to hold all image-properties, one can get the image which is selected in the contextmenu with the QAction representing the image for the contextmenu
Definition at line 62 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), and OnSetImage().
QMenu* QmitkLevelWindowWidgetContextMenu::m_ImageSubmenu |
submenu with all images for contextmenu
Definition at line 54 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu().
mitk::LevelWindow QmitkLevelWindowWidgetContextMenu::m_LevelWindow |
data structure which stores the values manipulated by a QmitkLevelWindowWidgetContextMenu
Definition at line 48 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), OnAddPreset(), OnChangeScaleRange(), OnSetDefaultLevelWindow(), OnSetDefaultScaleRange(), OnSetFixed(), OnSetMaximumWindow(), OnSetPreset(), OnUseAllGreyvaluesFromImage(), and OnUseOptimizedLevelWindow().
mitk::LevelWindowPreset* QmitkLevelWindowWidgetContextMenu::m_LevelWindowPreset |
data structure which reads and writes presets defined in a XML-file
Definition at line 42 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), OnAddPreset(), OnSetPreset(), QmitkLevelWindowWidgetContextMenu(), and ~QmitkLevelWindowWidgetContextMenu().
mitk::LevelWindowManager* QmitkLevelWindowWidgetContextMenu::m_Manager |
pointer to the object which manages all Level/Window changes on images and holds the LevelWindowProperty of the current image
Definition at line 58 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), OnChangeScaleRange(), OnSetDefaultLevelWindow(), OnSetDefaultScaleRange(), OnSetFixed(), OnSetImage(), OnSetMaximumWindow(), OnSetPreset(), OnUseAllGreyvaluesFromImage(), OnUseOptimizedLevelWindow(), and SetLevelWindowManager().
|
protected |
Definition at line 79 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), and OnSetPreset().
QMenu* QmitkLevelWindowWidgetContextMenu::m_PresetSubmenu |
submenu with all presets for contextmenu
Definition at line 51 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu().
|
protected |
Definition at line 81 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by GetContextMenu(), and OnSetImage().