Medical Imaging Interaction Toolkit  2024.06.00
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={})
 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 = {} 
)

constructor

◆ ~QmitkLevelWindowWidgetContextMenu()

QmitkLevelWindowWidgetContextMenu::~QmitkLevelWindowWidgetContextMenu ( )
override

Member Function Documentation

◆ GetContextMenu() [1/2]

void QmitkLevelWindowWidgetContextMenu::GetContextMenu ( )

returns the contextmenu with standard functions for Level/Window

◆ GetContextMenu() [2/2]

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

◆ OnAddPreset

void QmitkLevelWindowWidgetContextMenu::OnAddPreset ( )
protectedslot

adds a new Preset for presets-contextmenu

◆ OnChangeScaleRange

void QmitkLevelWindowWidgetContextMenu::OnChangeScaleRange ( )
protectedslot

changes the current images scalerange

◆ OnSetDefaultLevelWindow

void QmitkLevelWindowWidgetContextMenu::OnSetDefaultLevelWindow ( )
protectedslot

resets the current images Level/Window to its default values

◆ OnSetDefaultScaleRange

void QmitkLevelWindowWidgetContextMenu::OnSetDefaultScaleRange ( )
protectedslot

resets the current images scalerange to its default values

◆ OnSetFixed

void QmitkLevelWindowWidgetContextMenu::OnSetFixed ( )
protectedslot

sets the level window slider to be fixed

◆ OnSetImage

void QmitkLevelWindowWidgetContextMenu::OnSetImage ( QAction *  imageAction)
protectedslot

sets the selected image or the topmost layer image to the new current image

◆ OnSetMaximumWindow

void QmitkLevelWindowWidgetContextMenu::OnSetMaximumWindow ( )
protectedslot

sets the window to its maximum Size to fit the scalerange

◆ OnSetPreset

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

sets level and window value of the current image to the values defined for the selected preset

◆ OnUseAllGreyvaluesFromImage

void QmitkLevelWindowWidgetContextMenu::OnUseAllGreyvaluesFromImage ( )
protectedslot

calls the mitkLevelWindow SetToImageRange method, so that the greyvalues from whole image will be used

◆ OnUseOptimizedLevelWindow

void QmitkLevelWindowWidgetContextMenu::OnUseOptimizedLevelWindow ( )
protectedslot

calls the mitkLevelWindow SetAuto method with guessByCentralSlice false, so that the greyvalues from whole image will be considered

◆ SetLevelWindowManager()

void QmitkLevelWindowWidgetContextMenu::SetLevelWindowManager ( mitk::LevelWindowManager levelWindowManager)

lets this object know about the LevelWindowManager to get all images and tell about changes

Member Data Documentation

◆ m_AutoTopmostAction

QAction* QmitkLevelWindowWidgetContextMenu::m_AutoTopmostAction
protected

Definition at line 80 of file QmitkLevelWindowWidgetContextMenu.h.

◆ 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.

◆ m_ImageSubmenu

QMenu* QmitkLevelWindowWidgetContextMenu::m_ImageSubmenu

submenu with all images for contextmenu

Definition at line 54 of file QmitkLevelWindowWidgetContextMenu.h.

◆ m_LevelWindow

mitk::LevelWindow QmitkLevelWindowWidgetContextMenu::m_LevelWindow

data structure which stores the values manipulated by a QmitkLevelWindowWidgetContextMenu

Definition at line 48 of file QmitkLevelWindowWidgetContextMenu.h.

◆ 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.

◆ 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.

◆ m_PresetAction

QAction* QmitkLevelWindowWidgetContextMenu::m_PresetAction
protected

Definition at line 79 of file QmitkLevelWindowWidgetContextMenu.h.

◆ m_PresetSubmenu

QMenu* QmitkLevelWindowWidgetContextMenu::m_PresetSubmenu

submenu with all presets for contextmenu

Definition at line 51 of file QmitkLevelWindowWidgetContextMenu.h.

◆ m_SelectedImagesAction

QAction* QmitkLevelWindowWidgetContextMenu::m_SelectedImagesAction
protected

Definition at line 81 of file QmitkLevelWindowWidgetContextMenu.h.


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