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 QMITKSLICEWIDGET_H_ 00019 #define QMITKSLICEWIDGET_H_ 00020 00021 #include "ui_QmitkSliceWidget.h" 00022 #include "QmitkExtExports.h" 00023 00024 #include "QmitkRenderWindow.h" 00025 #include "mitkSliceNavigationController.h" 00026 #include "mitkDataStorage.h" 00027 #include "mitkStandaloneDataStorage.h" 00028 00029 #include <QWidget> 00030 00031 class QmitkExt_EXPORT QmitkSliceWidget : public QWidget, public Ui::QmitkSliceWidgetUi 00032 { 00033 Q_OBJECT 00034 00035 public: 00036 00037 QmitkSliceWidget(QWidget* parent = 0, const char* name = 0, Qt::WindowFlags f = 0); 00038 00039 00040 mitk::VtkPropRenderer* GetRenderer(); 00041 00042 QFrame* GetSelectionFrame(); 00043 00044 void UpdateGL(); 00045 00046 void mousePressEvent( QMouseEvent * e ); 00047 00048 void setPopUpEnabled( bool b ); 00049 00050 void SetDataStorage( mitk::StandaloneDataStorage::Pointer storage ); 00051 00052 mitk::StandaloneDataStorage* GetDataStorage(); 00053 00054 QmitkSliderNavigatorWidget* GetNavigatorWidget(); 00055 00056 bool IsLevelWindowEnabled(); 00057 00058 QmitkRenderWindow* GetRenderWindow(); 00059 00060 mitk::SliceNavigationController* GetSliceNavigationController() const; 00061 00062 mitk::CameraRotationController* GetCameraRotationController() const; 00063 00064 mitk::BaseController* GetController() const; 00065 00066 00067 public slots: 00068 00069 void SetData(mitk::DataStorage::SetOfObjects::ConstIterator it); 00070 00071 void SetData(mitk::DataStorage::SetOfObjects::ConstIterator it, mitk::SliceNavigationController::ViewDirection view); 00072 00073 void SetData( mitk::DataNode::Pointer node ); 00074 00075 // void AddData( mitk::DataNode::Pointer node); 00076 00077 void SetData( mitk::DataNode::Pointer node, mitk::SliceNavigationController::ViewDirection view ); 00078 00079 void InitWidget( mitk::SliceNavigationController::ViewDirection viewDirection ); 00080 00081 void wheelEvent( QWheelEvent * e ); 00082 00083 void ChangeView(QAction* val); 00084 00085 void SetLevelWindowEnabled( bool enable ); 00086 00087 00088 protected: 00089 00090 QmitkRenderWindow* m_RenderWindow; 00091 mitk::SliceNavigationController::ViewDirection m_View; 00092 //int newVariable; 00093 00094 private: 00095 00096 bool popUpEnabled; 00097 mitk::VtkPropRenderer::Pointer m_Renderer; 00098 mitk::SlicedGeometry3D::Pointer m_SlicedGeometry; 00099 mitk::StandaloneDataStorage::Pointer m_DataStorage; 00100 00101 QMenu* popUp; 00102 00103 }; 00104 00105 #endif /*QMITKSLICEWIDGET_H_*/