Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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...
 
 ~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::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 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
 

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 30 of file QmitkLevelWindowWidgetContextMenu.h.

Constructor & Destructor Documentation

◆ QmitkLevelWindowWidgetContextMenu()

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

◆ ~QmitkLevelWindowWidgetContextMenu()

QmitkLevelWindowWidgetContextMenu::~QmitkLevelWindowWidgetContextMenu ( )
override

Definition at line 32 of file QmitkLevelWindowWidgetContextMenu.cpp.

References m_LevelWindowPreset.

Member Function Documentation

◆ GetContextMenu() [1/2]

◆ GetContextMenu() [2/2]

void QmitkLevelWindowWidgetContextMenu::GetContextMenu ( )

returns the contextmenu with standard functions for Level/Window

Definition at line 296 of file QmitkLevelWindowWidgetContextMenu.cpp.

◆ OnAddPreset

◆ OnChangeScaleRange

◆ OnSetDefaultLevelWindow

void QmitkLevelWindowWidgetContextMenu::OnSetDefaultLevelWindow ( )
protectedslot

◆ OnSetDefaultScaleRange

◆ OnSetFixed

void QmitkLevelWindowWidgetContextMenu::OnSetFixed ( )
protectedslot

◆ OnSetImage

void QmitkLevelWindowWidgetContextMenu::OnSetImage ( QAction *  imageAction)
protectedslot

◆ OnSetMaximumWindow

void QmitkLevelWindowWidgetContextMenu::OnSetMaximumWindow ( )
protectedslot

◆ OnSetPreset

void QmitkLevelWindowWidgetContextMenu::OnSetPreset ( const QAction *  presetAction)
protectedslot

◆ OnUseAllGreyvaluesFromImage

void QmitkLevelWindowWidgetContextMenu::OnUseAllGreyvaluesFromImage ( )
protectedslot

◆ OnUseOptimizedLevelWindow

void QmitkLevelWindowWidgetContextMenu::OnUseOptimizedLevelWindow ( )
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().

◆ SetLevelWindowManager()

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().

Member Data Documentation

◆ m_AutoTopmostAction

QAction* QmitkLevelWindowWidgetContextMenu::m_AutoTopmostAction
protected

Definition at line 80 of file QmitkLevelWindowWidgetContextMenu.h.

Referenced by GetContextMenu(), and OnSetImage().

◆ m_Images

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().

◆ m_ImageSubmenu

QMenu* QmitkLevelWindowWidgetContextMenu::m_ImageSubmenu

submenu with all images for contextmenu

Definition at line 54 of file QmitkLevelWindowWidgetContextMenu.h.

Referenced by GetContextMenu().

◆ m_LevelWindow

◆ m_LevelWindowPreset

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().

◆ m_Manager

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().

◆ m_PresetAction

QAction* QmitkLevelWindowWidgetContextMenu::m_PresetAction
protected

Definition at line 79 of file QmitkLevelWindowWidgetContextMenu.h.

Referenced by GetContextMenu(), and OnSetPreset().

◆ m_PresetSubmenu

QMenu* QmitkLevelWindowWidgetContextMenu::m_PresetSubmenu

submenu with all presets for contextmenu

Definition at line 51 of file QmitkLevelWindowWidgetContextMenu.h.

Referenced by GetContextMenu().

◆ m_SelectedImagesAction

QAction* QmitkLevelWindowWidgetContextMenu::m_SelectedImagesAction
protected

Definition at line 81 of file QmitkLevelWindowWidgetContextMenu.h.

Referenced by GetContextMenu(), and OnSetImage().


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