Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
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 (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 
13 #ifndef QmitkIGTPlayerWidget_h
14 #define QmitkIGTPlayerWidget_h
15 
16 //QT headers
17 #include <QWidget>
18 
19 //mitk headers
20 #include "MitkIGTUIExports.h"
21 #include <mitkNavigationTool.h>
24 #include <mitkPointSet.h>
25 
26 
27 
28 //ui header
29 #include "ui_QmitkIGTPlayerWidgetControls.h"
30 
43 class MITKIGTUI_EXPORT QmitkIGTPlayerWidget : public QWidget
44 {
45  Q_OBJECT
46 
47 public:
48  static const std::string VIEW_ID;
49 
53  QmitkIGTPlayerWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
54 
58  ~QmitkIGTPlayerWidget() override;
59 
63  //void SetRealTimePlayer(mitk::NavigationDataPlayer::Pointer player);
64 
68  //void SetSequentialPlayer(mitk::NavigationDataSequentialPlayer::Pointer player);
69 
73  QTimer* GetPlayingTimer();
74 
78  const std::vector<mitk::NavigationData::Pointer> GetNavigationDatas();
79 
83  const mitk::PointSet::Pointer GetNavigationDatasPointSet();
84 
88  const mitk::PointSet::PointType GetNavigationDataPoint(unsigned int index);
89 
90 
94  void SetUpdateRate(unsigned int msecs);
95 
96 
102  unsigned int GetNumberOfTools();
103 
107  void StopPlaying();
108 
112  void SetTrajectoryNames(const QStringList toolNames);
113 
117  int GetResolution();
118 
122  void ClearTrajectorySelectCombobox();
123 
127  bool IsTrajectoryInSplineMode();
128 
129 
130  enum PlaybackMode {
131  RealTimeMode = 1,
132  SequentialMode = 2
133  };
134 
135 
136  PlaybackMode GetCurrentPlaybackMode();
137 
138 
139 signals:
143  void SignalPlayingStarted();
147  void SignalPlayingResumed();
151  void SignalPlayingStopped();
155  void SignalPlayingPaused();
159  void SignalPlayingEnded();
160 
164  void SignalPlayerUpdated();
165 
169  void SignalInputFileChanged();
170 
174  void SignalCurrentTrajectoryChanged(int index);
175 
179  void SignalSplineModeToggled(bool toggled);
180 
181 
182  protected slots:
186  void OnPlayButtonClicked(bool toggled);
190  void OnPlaying();
194  void OnStopPlaying();
198  void OnOpenFileButtonPressed();
202  void OnGoToEnd();
206  void OnGoToBegin();
210  void OnSequencialModeToggled(bool toggled);
214  void OnSliderPressed();
218  void OnSliderReleased();
219 
220 
221 
222 protected:
223 
225  virtual void CreateConnections();
226 
230  bool CheckInputFileValid();
231 
235  void ResetLCDNumbers();
236 
237  mitk::NavigationDataPlayer::Pointer m_RealTimePlayer;
238  mitk::NavigationDataSequentialPlayer::Pointer m_SequentialPlayer;
241  Ui::QmitkIGTPlayerWidgetControls* m_Controls;
242 
243  QString m_CmpFilename;
244  QTimer* m_PlayingTimer;
245 };
246 #endif
QmitkIGTPlayerWidget::m_Controls
Ui::QmitkIGTPlayerWidgetControls * m_Controls
Definition: QmitkIGTPlayerWidget.h:241
QmitkIGTPlayerWidget::PlaybackMode
PlaybackMode
Definition: QmitkIGTPlayerWidget.h:130
mitkNavigationDataPlayer.h
itk::SmartPointer< Self >
QmitkIGTPlayerWidget::m_CmpFilename
QString m_CmpFilename
filename of the input file
Definition: QmitkIGTPlayerWidget.h:243
mitkPointSet.h
mitkNavigationDataSequentialPlayer.h
mitk::Point< ScalarType, 3 >
QmitkIGTPlayerWidget
GUI to access the IGT Player. User must specify the file name where the input xml-file is located....
Definition: QmitkIGTPlayerWidget.h:43
QmitkIGTPlayerWidget::m_PlayingTimer
QTimer * m_PlayingTimer
update timer
Definition: QmitkIGTPlayerWidget.h:244
QmitkIGTPlayerWidget::m_CurrentSequentialPointNumber
unsigned int m_CurrentSequentialPointNumber
current point number
Definition: QmitkIGTPlayerWidget.h:240
QmitkIGTPlayerWidget::m_SequentialPlayer
mitk::NavigationDataSequentialPlayer::Pointer m_SequentialPlayer
Definition: QmitkIGTPlayerWidget.h:238
mitk::NavigationData::TimeStampType
double TimeStampType
type that holds the time at which the data was recorded in milliseconds
Definition: mitkNavigationData.h:60
QmitkIGTPlayerWidget::m_RealTimePlayer
mitk::NavigationDataPlayer::Pointer m_RealTimePlayer
plays NDs from a XML file
Definition: QmitkIGTPlayerWidget.h:237
QmitkIGTPlayerWidget::m_StartTime
mitk::NavigationData::TimeStampType m_StartTime
start time of playback needed for time display
Definition: QmitkIGTPlayerWidget.h:239
mitkNavigationTool.h
QmitkIGTPlayerWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkIGTPlayerWidget.h:48