NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
PointerCalibView.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 PointerCalibView_h
16 #define PointerCalibView_h
17 
18 #include "ui_PointerCalibView.h"
19 #include <niftkBaseView.h>
20 #include <service/event/ctkEvent.h>
21 #include <mitkDataStorage.h>
22 #include <mitkDataNode.h>
23 #include <mitkPointSet.h>
24 #include <mitkPointSetDataInteractor.h>
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 ~PointerCalibView();
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 
77  void OnSaveToFileButtonPressed();
78 
79 private:
80 
84  void RetrievePreferenceValues();
85 
89  virtual void OnPreferencesChanged(const berry::IBerryPreferences*) override;
90 
94  void UpdateDisplayedPoints();
95 
99  void UpdateRegistration();
100 
104  void OnPointAdded();
105 
109  void OnPointRemoved();
110 
114  mitk::Point3D GetPointerTipInSensorCoordinates() const;
115 
119  mitk::PointSet::PointIdentifier GetMissingPointId(const mitk::PointSet::Pointer& a,
120  const mitk::PointSet::Pointer& b);
121 
125  Ui::PointerCalibView *m_Controls;
126 
130  mitk::DataStorage::Pointer m_DataStorage;
131  niftk::UltrasoundPointerBasedCalibration::Pointer m_Calibrator;
132  mitk::PointSet::Pointer m_ImagePoints;
133  mitk::DataNode::Pointer m_ImagePointsNode;
134  mitk::PointSet::Pointer m_SensorPoints;
135  mitk::DataNode::Pointer m_SensorPointsNode;
136  mitk::PointSetDataInteractor::Pointer m_Interactor;
137  long m_ImagePointsAddObserverTag;
138  long m_ImagePointsRemoveObserverTag;
139 };
140 
141 #endif // PointerCalibView_h
GLdouble GLdouble GLdouble b
Definition: glew.h:7885
virtual void SetFocus() override
Called by framework, sets the focus on a specific widget.
Definition: PointerCalibView.cxx:179
GLboolean GLboolean GLboolean GLboolean a
Definition: glew.h:8272
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: PointerCalibView.cxx:96
virtual void CreateQtPartControl(QWidget *parent) override
Called by framework, this method creates all the controls for this view.
Definition: PointerCalibView.cxx:103
virtual ~PointerCalibView()
Definition: PointerCalibView.cxx:78
cl_event event
Definition: glew.h:3231
PointerCalibView()
Definition: PointerCalibView.cxx:46
static const std::string VIEW_ID
Static view ID = uk.ac.ucl.cmic.igipointercalib.
Definition: PointerCalibView.h:46
User interface for Ultrasound Pointer Based Calibration as described in Muratore 2001.
Definition: PointerCalibView.h:32
GLsizei const GLcharARB ** string
Definition: glew.h:5194