Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkLevelWindowWidgetContextMenu Class Reference

Provides a contextmenu for Level/Window functionality. More...

#include <QmitkLevelWindowWidgetContextMenu.h>

Inheritance diagram for QmitkLevelWindowWidgetContextMenu:
Collaboration diagram for QmitkLevelWindowWidgetContextMenu:

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::LevelWindowPresetm_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::LevelWindowManagerm_Manager
 
std::map< QAction *, mitk::LevelWindowProperty::Pointerm_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...
 

Detailed Description

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.

Constructor & Destructor Documentation

QmitkLevelWindowWidgetContextMenu::QmitkLevelWindowWidgetContextMenu ( QWidget *  parent,
Qt::WindowFlags  f = nullptr 
)
QmitkLevelWindowWidgetContextMenu::~QmitkLevelWindowWidgetContextMenu ( )
virtual

Definition at line 30 of file QmitkLevelWindowWidgetContextMenu.cpp.

References m_LevelWindowPreset.

Member Function Documentation

void QmitkLevelWindowWidgetContextMenu::setDefaultLevelWindow ( )
protectedslot
void QmitkLevelWindowWidgetContextMenu::setFixed ( )
protectedslot
void QmitkLevelWindowWidgetContextMenu::setImage ( QAction *  imageAction)
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.

void QmitkLevelWindowWidgetContextMenu::setMaximumWindow ( )
protectedslot
void QmitkLevelWindowWidgetContextMenu::setPreset ( QAction *  presetAction)
protectedslot
void QmitkLevelWindowWidgetContextMenu::useAllGreyvaluesFromImage ( )
protectedslot
void QmitkLevelWindowWidgetContextMenu::useOptimizedLevelWindow ( )
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().

Member Data Documentation

QAction* QmitkLevelWindowWidgetContextMenu::m_ImageAction
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::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().

QAction* QmitkLevelWindowWidgetContextMenu::m_PresetAction
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().


The documentation for this class was generated from the following files: