NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
TrackedPointerView.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef TrackedPointerView_h
16 #define TrackedPointerView_h
17 
18 #include <niftkBaseView.h>
19 #include <service/event/ctkEvent.h>
20 #include "ui_TrackedPointerView.h"
21 #include <vtkSmartPointer.h>
22 #include <mitkDataStorage.h>
23 #include <mitkTrackedPointer.h>
24 
25 class vtkMatrix4x4;
26 
33 {
34  // this is needed for all Qt objects that should have a Qt meta-object
35  // (everything that derives from QObject and wants to have signal/slots)
36  Q_OBJECT
37 
38 public:
39 
41  virtual ~TrackedPointerView();
42 
46  static const std::string VIEW_ID;
47 
52  virtual std::string GetViewID() const;
53 
54 protected:
55 
59  virtual void CreateQtPartControl(QWidget *parent) override;
60 
64  virtual void SetFocus() override;
65 
66 protected slots:
67 
68 protected:
69 
70 private slots:
71 
75  void OnUpdate(const ctkEvent& event);
76 
80  void OnStartGrabPoints();
81 
85  void OnClearPoints();
86 
87 private:
88 
92  void RetrievePreferenceValues();
93 
97  virtual void OnPreferencesChanged(const berry::IBerryPreferences*) override;
98 
102  void UpdateDisplayedPoints();
103 
107  Ui::TrackedPointerView *m_Controls;
108 
112  vtkSmartPointer<vtkMatrix4x4> m_TipToProbeTransform;
113  std::string m_TipToProbeFileName;
114  bool m_UpdateViewCoordinate;
115  mitk::DataStorage* m_DataStorage;
116  mitk::TrackedPointer::Pointer m_TrackedPointer;
117  unsigned int m_NumberOfPointsToAverageOver;
118  unsigned int m_RemainingPointsCounter;
119  mitk::Point3D m_TipCoordinate;
120 };
121 
122 #endif // TrackedPointerView_h
virtual ~TrackedPointerView()
Definition: TrackedPointerView.cxx:57
TrackedPointerView()
Definition: TrackedPointerView.cxx:46
User interface to provide controls for a tracked pointer.
Definition: TrackedPointerView.h:32
Base view component for plugins listening to visibility change events, focus changed events and so on...
Definition: niftkBaseView.h:47
virtual std::string GetViewID() const
Returns the view ID.
Definition: TrackedPointerView.cxx:67
static const std::string VIEW_ID
Static view ID = uk.ac.ucl.cmic.igitrackedpointer.
Definition: TrackedPointerView.h:46
virtual void CreateQtPartControl(QWidget *parent) override
Called by framework, this method creates all the controls for this view.
Definition: TrackedPointerView.cxx:74
cl_event event
Definition: glew.h:3231
virtual void SetFocus() override
Called by framework, sets the focus on a specific widget.
Definition: TrackedPointerView.cxx:152
GLsizei const GLcharARB ** string
Definition: glew.h:5194