NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
SurfaceRegView.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 SurfaceRegView_h
16 #define SurfaceRegView_h
17 
18 #include <niftkBaseView.h>
19 #include "ui_SurfaceRegView.h"
20 #include <vtkSmartPointer.h>
22 #include <QFuture>
23 #include <QFutureWatcher>
24 
25 class vtkMatrix4x4;
26 
37 {
42  Q_OBJECT
43 
44 public:
45 
47  virtual ~SurfaceRegView();
48 
52  static const std::string VIEW_ID;
53 
58  virtual std::string GetViewID() const;
59 
60 protected:
61 
65  virtual void CreateQtPartControl(QWidget *parent) override;
66 
70  virtual void SetFocus() override;
71 
72 protected slots:
73 
74 protected:
75  float ComputeDistance(vtkSmartPointer<vtkPolyData> fixed, vtkSmartPointer<vtkPolyData> moving);
76 
77 private slots:
78 
79  void OnCalculateButtonPressed();
80  void OnComposeWithDataButtonPressed();
81  void OnSaveToFileButtonPressed();
82 
83  void DataStorageEventListener(const mitk::DataNode* node);
84 
85  void OnComputeDistance();
86  void OnBackgroundProcessFinished();
87 
88 private:
89 
93  void RetrievePreferenceValues();
94 
98  virtual void OnPreferencesChanged(const berry::IBerryPreferences*) override;
99 
103  Ui::SurfaceRegView *m_Controls;
104  vtkSmartPointer<vtkMatrix4x4> m_Matrix;
105 
106  int m_MaxIterations;
107  int m_MaxPoints;
108  unsigned int m_TLSITerations;
109  unsigned int m_TLSPercentage;
110 
111  QFuture<float> m_BackgroundProcess;
112  QFutureWatcher<float> m_BackgroundProcessWatcher;
113 
114 };
115 
116 #endif // SurfaceRegView_h
static const std::string VIEW_ID
Static view ID = uk.ac.ucl.cmic.igisurfacereg.
Definition: SurfaceRegView.h:52
virtual void SetFocus() override
Called by framework, sets the focus on a specific widget.
Definition: SurfaceRegView.cxx:355
User interface to provide controls for surface based registration.
Definition: SurfaceRegView.h:36
float ComputeDistance(vtkSmartPointer< vtkPolyData > fixed, vtkSmartPointer< vtkPolyData > moving)
Definition: SurfaceRegView.cxx:198
SurfaceRegView()
Definition: SurfaceRegView.cxx:41
virtual ~SurfaceRegView()
Definition: SurfaceRegView.cxx:55
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: SurfaceRegView.cxx:73
GLsizei const GLcharARB ** string
Definition: glew.h:5194
virtual void CreateQtPartControl(QWidget *parent) override
Called by framework, this method creates all the controls for this view.
Definition: SurfaceRegView.cxx:80