Medical Imaging Interaction Toolkit
2016.11.0
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... | |
virtual | ~QmitkLevelWindowWidgetContextMenu () |
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 | setPreset (QAction *presetAction) |
sets level and window value of the current image to the values defined for the selected preset More... | |
void | useOptimizedLevelWindow () |
void | useAllGreyvaluesFromImage () |
calls the mitkLevelWindow SetToImageRange method, so that the greyvalues from whole image will be used More... | |
void | setFixed () |
sets the level window slider to be fixed More... | |
void | addPreset () |
adds a new Preset for presets-contextmenu More... | |
void | setDefaultLevelWindow () |
resets the current images Level/Window to its default values More... | |
void | setDefaultScaleRange () |
resets the current images scalerange to its default values More... | |
void | changeScaleRange () |
changes the current images scalerange More... | |
void | setImage (QAction *imageAction) |
sets the selected image or the topmost layer image to the new current image More... | |
void | setMaximumWindow () |
sets the window to its maximum Size to fit the scalerange More... | |
Protected Attributes | |
QAction * | m_PresetAction |
ID of preset selected in contextmenu. More... | |
QAction * | m_ImageAction |
ID of image selected in contextmenu. More... | |
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 34 of file QmitkLevelWindowWidgetContextMenu.h.
QmitkLevelWindowWidgetContextMenu::QmitkLevelWindowWidgetContextMenu | ( | QWidget * | parent, |
Qt::WindowFlags | f = nullptr |
||
) |
constructor
Definition at line 23 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindowPreset::LoadPreset(), m_LevelWindowPreset, and mitk::LevelWindowPreset::New().
|
virtual |
Definition at line 30 of file QmitkLevelWindowWidgetContextMenu.cpp.
References m_LevelWindowPreset.
|
protectedslot |
adds a new Preset for presets-contextmenu
Definition at line 81 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 136 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::LevelWindowManager::SetLevelWindow(), mitk::LevelWindow::SetLevelWindow(), QmitkLevelWindowRangeChangeDialog::setLowerLimit(), mitk::LevelWindow::SetRangeMinMax(), and QmitkLevelWindowRangeChangeDialog::setUpperLimit().
Referenced by getContextMenu().
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 161 of file QmitkLevelWindowWidgetContextMenu.cpp.
References addPreset(), changeScaleRange(), 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::DataNode::IsVisible(), m_ImageAction, m_Images, m_ImageSubmenu, m_LevelWindow, m_LevelWindowPreset, m_Manager, m_PresetAction, m_PresetSubmenu, setDefaultLevelWindow(), setDefaultScaleRange(), setFixed(), setImage(), setMaximumWindow(), setPreset(), useAllGreyvaluesFromImage(), and useOptimizedLevelWindow().
void QmitkLevelWindowWidgetContextMenu::getContextMenu | ( | ) |
returns the contextmenu with standard functions for Level/Window
Definition at line 247 of file QmitkLevelWindowWidgetContextMenu.cpp.
References addPreset(), changeScaleRange(), 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(), m_ImageAction, m_Images, m_ImageSubmenu, m_LevelWindow, m_LevelWindowPreset, m_Manager, m_PresetAction, m_PresetSubmenu, setDefaultLevelWindow(), setDefaultScaleRange(), setFixed(), setImage(), setMaximumWindow(), setPreset(), useAllGreyvaluesFromImage(), and useOptimizedLevelWindow().
|
protectedslot |
resets the current images Level/Window to its default values
Definition at line 114 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 128 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::LevelWindowManager::SetLevelWindow(), and mitk::LevelWindow::SetLevelWindow().
Referenced by getContextMenu().
|
protectedslot |
sets the level window slider to be fixed
Definition at line 94 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 150 of file QmitkLevelWindowWidgetContextMenu.cpp.
References mitk::LevelWindowManager::isAutoTopMost(), m_ImageAction, m_Images, m_Manager, mitk::LevelWindowManager::SetAutoTopMostImage(), and mitk::LevelWindowManager::SetLevelWindowProperty().
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 76 of file QmitkLevelWindowWidgetContextMenu.cpp.
References m_Manager.
|
protectedslot |
sets the window to its maximum Size to fit the scalerange
Definition at line 121 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 35 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::LevelWindowManager::SetLevelWindow(), and mitk::LevelWindow::SetLevelWindow().
Referenced by getContextMenu().
|
protectedslot |
calls the mitkLevelWindow SetToImageRange method, so that the greyvalues from whole image will be used
Definition at line 100 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 107 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().
|
protected |
ID of image selected in contextmenu.
Definition at line 86 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by getContextMenu(), and setImage().
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 66 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by getContextMenu(), and setImage().
QMenu* QmitkLevelWindowWidgetContextMenu::m_ImageSubmenu |
submenu with all images for contextmenu
Definition at line 58 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 52 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by addPreset(), changeScaleRange(), getContextMenu(), setDefaultLevelWindow(), setDefaultScaleRange(), setFixed(), setMaximumWindow(), setPreset(), useAllGreyvaluesFromImage(), and useOptimizedLevelWindow().
mitk::LevelWindowPreset* QmitkLevelWindowWidgetContextMenu::m_LevelWindowPreset |
data structure which reads and writes presets defined in a XML-file
Definition at line 46 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by addPreset(), getContextMenu(), QmitkLevelWindowWidgetContextMenu(), setPreset(), 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 62 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by changeScaleRange(), getContextMenu(), setDefaultLevelWindow(), setDefaultScaleRange(), setFixed(), setImage(), setLevelWindowManager(), setMaximumWindow(), setPreset(), useAllGreyvaluesFromImage(), and useOptimizedLevelWindow().
|
protected |
ID of preset selected in contextmenu.
Definition at line 83 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by getContextMenu(), and setPreset().
QMenu* QmitkLevelWindowWidgetContextMenu::m_PresetSubmenu |
submenu with all presets for contextmenu
Definition at line 55 of file QmitkLevelWindowWidgetContextMenu.h.
Referenced by getContextMenu().