Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkIGTPlayerWidget.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 QmitkIGTPlayerWidget_H
18 #define QmitkIGTPlayerWidget_H
19 
20 //QT headers
21 #include <QWidget>
22 
23 //mitk headers
24 #include "MitkIGTUIExports.h"
25 #include <mitkNavigationTool.h>
28 #include <mitkPointSet.h>
29 
30 
31 
32 //ui header
33 #include "ui_QmitkIGTPlayerWidgetControls.h"
34 
47 class MITKIGTUI_EXPORT QmitkIGTPlayerWidget : public QWidget
48 {
49  Q_OBJECT
50 
51 public:
52  static const std::string VIEW_ID;
53 
57  QmitkIGTPlayerWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
58 
63 
67  //void SetRealTimePlayer(mitk::NavigationDataPlayer::Pointer player);
68 
72  //void SetSequentialPlayer(mitk::NavigationDataSequentialPlayer::Pointer player);
73 
77  QTimer* GetPlayingTimer();
78 
82  const std::vector<mitk::NavigationData::Pointer> GetNavigationDatas();
83 
87  const mitk::PointSet::Pointer GetNavigationDatasPointSet();
88 
92  const mitk::PointSet::PointType GetNavigationDataPoint(unsigned int index);
93 
94 
98  void SetUpdateRate(unsigned int msecs);
99 
100 
106  unsigned int GetNumberOfTools();
107 
111  void StopPlaying();
112 
116  void SetTrajectoryNames(const QStringList toolNames);
117 
121  int GetResolution();
122 
126  void ClearTrajectorySelectCombobox();
127 
131  bool IsTrajectoryInSplineMode();
132 
133 
134  enum PlaybackMode {
135  RealTimeMode = 1,
136  SequentialMode = 2
137  };
138 
139 
140  PlaybackMode GetCurrentPlaybackMode();
141 
142 
143 signals:
147  void SignalPlayingStarted();
151  void SignalPlayingResumed();
155  void SignalPlayingStopped();
159  void SignalPlayingPaused();
163  void SignalPlayingEnded();
164 
168  void SignalPlayerUpdated();
169 
173  void SignalInputFileChanged();
174 
178  void SignalCurrentTrajectoryChanged(int index);
179 
183  void SignalSplineModeToggled(bool toggled);
184 
185 
186  protected slots:
190  void OnPlayButtonClicked(bool toggled);
194  void OnPlaying();
198  void OnStopPlaying();
202  void OnOpenFileButtonPressed();
206  void OnGoToEnd();
210  void OnGoToBegin();
214  void OnSequencialModeToggled(bool toggled);
218  void OnSliderPressed();
222  void OnSliderReleased();
223 
224 
225 
226 protected:
227 
229  virtual void CreateConnections();
230 
234  bool CheckInputFileValid();
235 
239  void ResetLCDNumbers();
240 
241  Ui::QmitkIGTPlayerWidgetControls* m_Controls;
242 
245 
246  QString m_CmpFilename;
247  QTimer* m_PlayingTimer;
248 
251 };
252 #endif
mitk::NavigationData::TimeStampType m_StartTime
start time of playback needed for time display
itk::SmartPointer< Self > Pointer
GUI to access the IGT Player. User must specify the file name where the input xml-file is located...
mitk::NavigationDataSequentialPlayer::Pointer m_SequentialPlayer
mitk::NavigationDataPlayer::Pointer m_RealTimePlayer
plays NDs from a XML file
QString m_CmpFilename
filename of the input file
static const std::string VIEW_ID
double TimeStampType
type that holds the time at which the data was recorded
unsigned int m_CurrentSequentialPointNumber
current point number
QTimer * m_PlayingTimer
update timer
Ui::QmitkIGTPlayerWidgetControls * m_Controls