00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef QMITKLEVELWINDOWWIDGETCONTEXTMENU_H 00019 #define QMITKLEVELWINDOWWIDGETCONTEXTMENU_H 00020 00021 #include <mitkLevelWindowPreset.h> 00022 #include <mitkLevelWindowManager.h> 00023 #include <QMenu> 00024 00033 class QMITK_EXPORT QmitkLevelWindowWidgetContextMenu : public QWidget { 00034 00035 Q_OBJECT 00036 00037 public: 00038 00040 QmitkLevelWindowWidgetContextMenu(QWidget * parent, Qt::WindowFlags f = 0 ); 00041 virtual ~QmitkLevelWindowWidgetContextMenu(); 00042 00046 mitk::LevelWindowPreset* m_LevelWindowPreset; 00047 00052 mitk::LevelWindow m_LevelWindow; 00053 00055 QMenu* m_PresetSubmenu; 00056 00058 QMenu* m_ImageSubmenu; 00059 00062 mitk::LevelWindowManager* m_Manager; 00063 00066 std::map<QAction*, mitk::LevelWindowProperty::Pointer> m_Images; 00067 00073 void getContextMenu(QMenu* contextmenu); 00074 00076 void getContextMenu(); 00077 00079 void setLevelWindowManager(mitk::LevelWindowManager* levelWindowManager); 00080 00081 protected: 00082 00084 QAction* m_PresetAction; 00085 00087 QAction* m_ImageAction; 00088 00089 protected slots: 00090 00092 void setPreset(QAction* presetAction); 00093 00095 void useAllGreyvaluesFromImage(); 00096 00098 void setFixed(); 00099 00101 void addPreset(); 00102 00104 void setDefaultLevelWindow(); 00105 00107 void setDefaultScaleRange(); 00108 00110 void changeScaleRange(); 00111 00113 void setImage(QAction* imageAction); 00114 00116 void setMaximumWindow(); 00117 00118 }; 00119 #endif