Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkSliceWidget.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QMITKSLICEWIDGET_H_
18 #define QMITKSLICEWIDGET_H_
19 
21 #include "ui_QmitkSliceWidget.h"
22 
23 #include "QmitkRenderWindow.h"
24 #include "mitkDataStorage.h"
26 #include "mitkSlicedGeometry3D.h"
28 #include <QWidget>
29 
30 class MITKQTWIDGETSEXT_EXPORT QmitkSliceWidget : public QWidget, public Ui::QmitkSliceWidgetUi
31 {
32  Q_OBJECT
33 
34 public:
35  QmitkSliceWidget(QWidget *parent = 0, const char *name = 0, Qt::WindowFlags f = 0);
36 
37  mitk::VtkPropRenderer *GetRenderer();
38 
39  QFrame *GetSelectionFrame();
40 
41  void UpdateGL();
42 
43  void mousePressEvent(QMouseEvent *e) override;
44 
45  void setPopUpEnabled(bool b);
46 
47  void SetDataStorage(mitk::StandaloneDataStorage::Pointer storage);
48 
50 
51  QmitkSliderNavigatorWidget *GetNavigatorWidget();
52 
53  bool IsLevelWindowEnabled();
54 
55  QmitkRenderWindow *GetRenderWindow();
56 
57  mitk::SliceNavigationController *GetSliceNavigationController() const;
58 
59  mitk::CameraRotationController *GetCameraRotationController() const;
60 
61  mitk::BaseController *GetController() const;
62 
63 public slots:
64 
65  void SetData(mitk::DataStorage::SetOfObjects::ConstIterator it);
66 
67  void SetData(mitk::DataStorage::SetOfObjects::ConstIterator it, mitk::SliceNavigationController::ViewDirection view);
68 
69  void SetData(mitk::DataNode::Pointer node);
70 
72 
73  void InitWidget(mitk::SliceNavigationController::ViewDirection viewDirection);
74 
75  void wheelEvent(QWheelEvent *e) override;
76 
77  void ChangeView(QAction *val);
78 
79  void SetLevelWindowEnabled(bool enable);
80 
81 protected:
84 
85 private:
86  bool popUpEnabled;
88  mitk::SlicedGeometry3D::Pointer m_SlicedGeometry;
90 
91  QMenu *popUp;
92 };
93 
94 #endif
Data management class that handles 'was created by' relations.
Baseclass for renderer slice-/camera-control.
#define MITKQTWIDGETSEXT_EXPORT
static mitk::DataStorage::Pointer GetDataStorage()
Controls the selection of the slice the associated BaseRenderer will display.
mitk::SliceNavigationController::ViewDirection m_View
mitk::DataStorage::Pointer m_DataStorage
MITK implementation of the QVTKWidget.
ViewDirection
Possible view directions, Original will uses the PlaneGeometry instances in a SlicedGeometry3D provid...
QmitkRenderWindow * m_RenderWindow