MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkIGTPlayerWidget.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
43class MITKIGTUI_EXPORT QmitkIGTPlayerWidget : public QWidget
44{
45 Q_OBJECT
46
47public:
48 static const std::string VIEW_ID;
49
53 QmitkIGTPlayerWidget(QWidget* parent = nullptr, Qt::WindowFlags f = {});
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
131 RealTimeMode = 1,
132 SequentialMode = 2
133 };
134
135
136 PlaybackMode GetCurrentPlaybackMode();
137
138
139signals:
160
165
170
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
222protected:
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
245};
246#endif
GUI to access the IGT Player. User must specify the file name where the input xml-file is located....
void SignalPlayingStarted()
This signal is emitted when the player starts the playback.
void SignalPlayingResumed()
This signal is emitted when the player resumes after a pause.
QTimer * m_PlayingTimer
update timer
void SignalSplineModeToggled(bool toggled)
This signal is emitted if the spline mode checkbox is toggled or untoggled.
QString m_CmpFilename
filename of the input file
void SignalPlayingPaused()
This signal is emitted when the player is paused.
unsigned int m_CurrentSequentialPointNumber
current point number
mitk::NavigationDataSequentialPlayer::Pointer m_SequentialPlayer
void SignalInputFileChanged()
This signal is emitted if the input file for the replay was changed.
void SignalPlayingEnded()
This signal is emitted when the player reaches the end of the playback.
static const std::string VIEW_ID
void SignalCurrentTrajectoryChanged(int index)
This signal is emitted if the index of the current selected trajectory select combobox item changes.
Ui::QmitkIGTPlayerWidgetControls * m_Controls
void SignalPlayerUpdated()
This signal is emitted every time the player updated the NavigationDatas.
void SignalPlayingStopped()
This signal is emitted when the player stops.
mitk::NavigationData::TimeStampType m_StartTime
start time of playback needed for time display
mitk::NavigationDataPlayer::Pointer m_RealTimePlayer
plays NDs from a XML file
double TimeStampType
type that holds the time at which the data was recorded in milliseconds