Medical Imaging Interaction Toolkit  2018.4.99-bd7b41ba
Medical Imaging Interaction Toolkit
QmitkPointListWidget.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 (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 #ifndef QmitkPointListWidget_H
13 #define QmitkPointListWidget_H
14 
16 #include <QmitkPointListModel.h>
17 #include <QmitkPointListView.h>
18 
19 #include <QmitkStdMultiWidget.h>
20 #include <mitkDataInteractor.h>
21 #include <mitkDataNode.h>
22 #include <mitkPointSet.h>
23 
24 #include <QPushButton>
25 #include <QToolButton>
26 
50 {
51  Q_OBJECT
52 
53 public:
54  QmitkPointListWidget(QWidget *parent = nullptr, int orientation = 0);
55  ~QmitkPointListWidget() override;
56 
57  void SetupConnections();
58 
66  void AddSliceNavigationController(mitk::SliceNavigationController *snc);
67 
75  void RemoveSliceNavigationController(mitk::SliceNavigationController *snc);
76 
78  void SetPointSet(mitk::PointSet *newPs);
79  mitk::PointSet *GetPointSet();
80 
82  void SetPointSetNode(mitk::DataNode *newNode);
83  mitk::DataNode *GetPointSetNode();
84 
86  void SetMultiWidget(QmitkStdMultiWidget *multiWidget);
87 
89  void OnNodeDeleted(const itk::EventObject &e);
90 
92  void UnselectEditButton();
93 
94 public slots:
95  void DeactivateInteractor(bool deactivate);
96  void EnableEditButton(bool enabled);
97 
98 signals:
101  void EditPointSets(bool active);
103  void PointSelectionChanged();
105  void PointListChanged();
106 
107 protected slots:
108  void OnBtnSavePoints();
109  void OnBtnLoadPoints();
110  void RemoveSelectedPoint();
111  void MoveSelectedPointDown();
112  void MoveSelectedPointUp();
113  void OnBtnAddPoint(bool checked);
114  void OnBtnAddPointManually();
115  void OnTimeStepChanged(int timeStep);
116 
120  void OnPointSelectionChanged();
121 
122  void OnListDoubleClick();
123 
124 protected:
125  void SetupUi();
126  void ObserveNewNode(mitk::DataNode *node);
127 
129 
131 
133 
134  QPushButton *m_MovePointUpBtn;
135  QPushButton *m_MovePointDownBtn;
136  QPushButton *m_RemovePointBtn;
137  QPushButton *m_SavePointsBtn;
138  QPushButton *m_LoadPointsBtn;
139  QPushButton *m_ToggleAddPoint;
140  QPushButton *m_AddPoint;
143 
147  unsigned long m_NodeObserverTag;
148 
150 };
151 
152 #endif
#define MITKQTWIDGETSEXT_EXPORT
GUI widget for handling mitk::PointSet.
QPushButton * m_MovePointDownBtn
Controls the selection of the slice the associated BaseRenderer will display.
QmitkPointListView * m_PointListView
mitk::DataNode::Pointer m_PointSetNode
Widget for regular operations on point sets.
Data structure which stores a set of points. Superclass of mitk::Mesh.
Definition: mitkPointSet.h:75
The &#39;QmitkStdMultiWidget&#39; is a &#39;QmitkAbstractMultiWidget&#39; that is used to display multiple render win...
mitk::DataInteractor::Pointer m_DataInteractor
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
QmitkPointListModel * m_PointListModel