MITK-IGT
IGT Extension of MITK
|
GUI to access the IGT Player. User must specify the file name where the input xml-file is located. The NavigationDatas from the xml-file can be played in normal mode or in PointSet mode. More...
#include <QmitkIGTPlayerWidget.h>
Public Types | |
enum | PlaybackMode { RealTimeMode = 1 , SequentialMode = 2 } |
Signals | |
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. | |
void | SignalPlayingStopped () |
This signal is emitted when the player stops. | |
void | SignalPlayingPaused () |
This signal is emitted when the player is paused. | |
void | SignalPlayingEnded () |
This signal is emitted when the player reaches the end of the playback. | |
void | SignalPlayerUpdated () |
This signal is emitted every time the player updated the NavigationDatas. | |
void | SignalInputFileChanged () |
This signal is emitted if the input file for the replay was changed. | |
void | SignalCurrentTrajectoryChanged (int index) |
This signal is emitted if the index of the current selected trajectory select combobox item changes. | |
void | SignalSplineModeToggled (bool toggled) |
This signal is emitted if the spline mode checkbox is toggled or untoggled. | |
Public Member Functions | |
QmitkIGTPlayerWidget (QWidget *parent=nullptr, Qt::WindowFlags f={}) | |
default constructor | |
~QmitkIGTPlayerWidget () override | |
default deconstructor | |
QTimer * | GetPlayingTimer () |
Sets the real time player for this player widget. | |
const std::vector< mitk::NavigationData::Pointer > | GetNavigationDatas () |
Returns the current playback NavigationDatas from the xml-file. | |
const mitk::PointSet::Pointer | GetNavigationDatasPointSet () |
Returns a PointSet of the current NavigationDatas for all recorded tools. | |
const mitk::PointSet::PointType | GetNavigationDataPoint (unsigned int index) |
Returns a PointType of the current NavigationData for a specific tool with the given index. | |
void | SetUpdateRate (unsigned int msecs) |
Sets the update rate of this widget's playing timer. | |
unsigned int | GetNumberOfTools () |
Returns the number of different tools from the current playing stream. | |
void | StopPlaying () |
Stops the playback. | |
void | SetTrajectoryNames (const QStringList toolNames) |
Sets the given tool names list to the trajectory select combobox. | |
int | GetResolution () |
Returns the current resolution value from the resolution spinbox. | |
void | ClearTrajectorySelectCombobox () |
Clears all items in the trajectory selection combobox. | |
bool | IsTrajectoryInSplineMode () |
Returns whether spline mode checkbox is selected. | |
PlaybackMode | GetCurrentPlaybackMode () |
Static Public Attributes | |
static const std::string | VIEW_ID |
Protected Slots | |
void | OnPlayButtonClicked (bool toggled) |
Starts or pauses the playback. | |
void | OnPlaying () |
Updates the playback data. | |
void | OnStopPlaying () |
Stops the playback. | |
void | OnOpenFileButtonPressed () |
Opens file open dialog for searching the input file. | |
void | OnGoToEnd () |
Stops the playback. | |
void | OnGoToBegin () |
Stops the playback and resets the player to the beginning. | |
void | OnSequencialModeToggled (bool toggled) |
Switches widget between realtime and sequential mode. | |
void | OnSliderPressed () |
Pauses playback when slider is pressed by user. | |
void | OnSliderReleased () |
Moves player position to the position selected with the slider. | |
Protected Member Functions | |
virtual void | CreateConnections () |
Creation of the connections. | |
bool | CheckInputFileValid () |
Checks if an imput file with the set filename exists. | |
void | ResetLCDNumbers () |
Sets all LCD numbers to 0. | |
Protected Attributes | |
mitk::NavigationDataPlayer::Pointer | m_RealTimePlayer |
plays NDs from a XML file | |
mitk::NavigationDataSequentialPlayer::Pointer | m_SequentialPlayer |
mitk::NavigationData::TimeStampType | m_StartTime |
start time of playback needed for time display | |
unsigned int | m_CurrentSequentialPointNumber |
current point number | |
Ui::QmitkIGTPlayerWidgetControls * | m_Controls |
QString | m_CmpFilename |
filename of the input file | |
QTimer * | m_PlayingTimer |
update timer | |
GUI to access the IGT Player. User must specify the file name where the input xml-file is located. The NavigationDatas from the xml-file can be played in normal mode or in PointSet mode.
Documentation:
In normal mode the player updates the NavigationDatas every 100ms (can be changed in SetUpdateRate()) and returns them when GetNavigationDatas() is called. In PointSet mode the player generates a PointSet with all NavigationDatas from the xml-file. So the playback is performed on this ND PointSet.
Definition at line 43 of file QmitkIGTPlayerWidget.h.
Enumerator | |
---|---|
RealTimeMode | playback mode enum |
SequentialMode |
Definition at line 130 of file QmitkIGTPlayerWidget.h.
QmitkIGTPlayerWidget::QmitkIGTPlayerWidget | ( | QWidget * | parent = nullptr, |
Qt::WindowFlags | f = {} ) |
default constructor
Definition at line 32 of file QmitkIGTPlayerWidget.cpp.
|
override |
default deconstructor
Definition at line 50 of file QmitkIGTPlayerWidget.cpp.
|
protected |
Checks if an imput file with the set filename exists.
Definition at line 80 of file QmitkIGTPlayerWidget.cpp.
void QmitkIGTPlayerWidget::ClearTrajectorySelectCombobox | ( | ) |
Clears all items in the trajectory selection combobox.
Definition at line 519 of file QmitkIGTPlayerWidget.cpp.
|
protectedvirtual |
Creation of the connections.
Definition at line 57 of file QmitkIGTPlayerWidget.cpp.
QmitkIGTPlayerWidget::PlaybackMode QmitkIGTPlayerWidget::GetCurrentPlaybackMode | ( | ) |
Definition at line 239 of file QmitkIGTPlayerWidget.cpp.
const mitk::PointSet::PointType QmitkIGTPlayerWidget::GetNavigationDataPoint | ( | unsigned int | index | ) |
Returns a PointType of the current NavigationData for a specific tool with the given index.
Definition at line 395 of file QmitkIGTPlayerWidget.cpp.
const std::vector< mitk::NavigationData::Pointer > QmitkIGTPlayerWidget::GetNavigationDatas | ( | ) |
Returns the current playback NavigationDatas from the xml-file.
Definition at line 340 of file QmitkIGTPlayerWidget.cpp.
const mitk::PointSet::Pointer QmitkIGTPlayerWidget::GetNavigationDatasPointSet | ( | ) |
Returns a PointSet of the current NavigationDatas for all recorded tools.
Definition at line 363 of file QmitkIGTPlayerWidget.cpp.
unsigned int QmitkIGTPlayerWidget::GetNumberOfTools | ( | ) |
Returns the number of different tools from the current playing stream.
Retuns 0 if playback file is invalid.
Definition at line 94 of file QmitkIGTPlayerWidget.cpp.
QTimer * QmitkIGTPlayerWidget::GetPlayingTimer | ( | ) |
Sets the real time player for this player widget.
Sets the sequential player for this player widget
Returns the playing timer of this widget
Definition at line 247 of file QmitkIGTPlayerWidget.cpp.
int QmitkIGTPlayerWidget::GetResolution | ( | ) |
Returns the current resolution value from the resolution spinbox.
Definition at line 514 of file QmitkIGTPlayerWidget.cpp.
bool QmitkIGTPlayerWidget::IsTrajectoryInSplineMode | ( | ) |
Returns whether spline mode checkbox is selected.
Definition at line 75 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Stops the playback and resets the player to the beginning.
Definition at line 472 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Stops the playback.
Definition at line 464 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Opens file open dialog for searching the input file.
stops playing and resets lcd numbers
Definition at line 436 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Starts or pauses the playback.
Definition at line 119 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Updates the playback data.
Definition at line 274 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Switches widget between realtime and sequential mode.
Definition at line 530 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Pauses playback when slider is pressed by user.
Definition at line 560 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Moves player position to the position selected with the slider.
Definition at line 545 of file QmitkIGTPlayerWidget.cpp.
|
protectedslot |
Stops the playback.
Definition at line 252 of file QmitkIGTPlayerWidget.cpp.
|
protected |
Sets all LCD numbers to 0.
Definition at line 490 of file QmitkIGTPlayerWidget.cpp.
void QmitkIGTPlayerWidget::SetTrajectoryNames | ( | const QStringList | toolNames | ) |
Sets the given tool names list to the trajectory select combobox.
Definition at line 497 of file QmitkIGTPlayerWidget.cpp.
void QmitkIGTPlayerWidget::SetUpdateRate | ( | unsigned int | msecs | ) |
Sets the update rate of this widget's playing timer.
Definition at line 114 of file QmitkIGTPlayerWidget.cpp.
|
signal |
This signal is emitted if the index of the current selected trajectory select combobox item changes.
|
signal |
This signal is emitted if the input file for the replay was changed.
|
signal |
This signal is emitted every time the player updated the NavigationDatas.
|
signal |
This signal is emitted when the player reaches the end of the playback.
|
signal |
This signal is emitted when the player is paused.
|
signal |
This signal is emitted when the player resumes after a pause.
|
signal |
This signal is emitted when the player starts the playback.
|
signal |
This signal is emitted when the player stops.
|
signal |
This signal is emitted if the spline mode checkbox is toggled or untoggled.
void QmitkIGTPlayerWidget::StopPlaying | ( | ) |
Stops the playback.
Definition at line 257 of file QmitkIGTPlayerWidget.cpp.
|
protected |
filename of the input file
Definition at line 243 of file QmitkIGTPlayerWidget.h.
|
protected |
Definition at line 241 of file QmitkIGTPlayerWidget.h.
|
protected |
current point number
Definition at line 240 of file QmitkIGTPlayerWidget.h.
|
protected |
update timer
Definition at line 244 of file QmitkIGTPlayerWidget.h.
|
protected |
plays NDs from a XML file
Definition at line 237 of file QmitkIGTPlayerWidget.h.
|
protected |
Definition at line 238 of file QmitkIGTPlayerWidget.h.
|
protected |
start time of playback needed for time display
Definition at line 239 of file QmitkIGTPlayerWidget.h.
|
static |
Definition at line 48 of file QmitkIGTPlayerWidget.h.