Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
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, SequentialMode } |
Signals | |
void | SignalPlayingStarted () |
This signal is emitted when the player starts the playback. More... | |
void | SignalPlayingResumed () |
This signal is emitted when the player resumes after a pause. More... | |
void | SignalPlayingStopped () |
This signal is emitted when the player stops. More... | |
void | SignalPlayingPaused () |
This signal is emitted when the player is paused. More... | |
void | SignalPlayingEnded () |
This signal is emitted when the player reaches the end of the playback. More... | |
void | SignalPlayerUpdated () |
This signal is emitted every time the player updated the NavigationDatas. More... | |
void | SignalInputFileChanged () |
This signal is emitted if the input file for the replay was changed. More... | |
void | SignalCurrentTrajectoryChanged (int index) |
This signal is emitted if the index of the current selected trajectory select combobox item changes. More... | |
void | SignalSplineModeToggled (bool toggled) |
This signal is emitted if the spline mode checkbox is toggled or untoggled. More... | |
Public Member Functions | |
QmitkIGTPlayerWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
default constructor More... | |
~QmitkIGTPlayerWidget () | |
default deconstructor More... | |
QTimer * | GetPlayingTimer () |
Sets the real time player for this player widget. More... | |
const std::vector< mitk::NavigationData::Pointer > | GetNavigationDatas () |
Returns the current playback NavigationDatas from the xml-file. More... | |
const mitk::PointSet::Pointer | GetNavigationDatasPointSet () |
Returns a PointSet of the current NavigationDatas for all recorded tools. More... | |
const mitk::PointSet::PointType | GetNavigationDataPoint (unsigned int index) |
Returns a PointType of the current NavigationData for a specific tool with the given index. More... | |
void | SetUpdateRate (unsigned int msecs) |
Sets the update rate of this widget's playing timer. More... | |
unsigned int | GetNumberOfTools () |
Returns the number of different tools from the current playing stream. More... | |
void | StopPlaying () |
Stops the playback. More... | |
void | SetTrajectoryNames (const QStringList toolNames) |
Sets the given tool names list to the trajectory select combobox. More... | |
int | GetResolution () |
Returns the current resolution value from the resolution spinbox. More... | |
void | ClearTrajectorySelectCombobox () |
Clears all items in the trajectory selection combobox. More... | |
bool | IsTrajectoryInSplineMode () |
Returns whether spline mode checkbox is selected. More... | |
PlaybackMode | GetCurrentPlaybackMode () |
Static Public Attributes | |
static const std::string | VIEW_ID |
Protected Slots | |
void | OnPlayButtonClicked (bool toggled) |
Starts or pauses the playback. More... | |
void | OnPlaying () |
Updates the playback data. More... | |
void | OnStopPlaying () |
Stops the playback. More... | |
void | OnOpenFileButtonPressed () |
Opens file open dialog for searching the input file. More... | |
void | OnGoToEnd () |
Stops the playback. More... | |
void | OnGoToBegin () |
Stops the playback and resets the player to the beginning. More... | |
void | OnSequencialModeToggled (bool toggled) |
Switches widget between realtime and sequential mode. More... | |
void | OnSliderPressed () |
Pauses playback when slider is pressed by user. More... | |
void | OnSliderReleased () |
Moves player position to the position selected with the slider. More... | |
Protected Member Functions | |
virtual void | CreateConnections () |
Creation of the connections. More... | |
bool | CheckInputFileValid () |
Checks if an imput file with the set filename exists. More... | |
void | ResetLCDNumbers () |
Sets all LCD numbers to 0. More... | |
Protected Attributes | |
Ui::QmitkIGTPlayerWidgetControls * | m_Controls |
mitk::NavigationDataPlayer::Pointer | m_RealTimePlayer |
plays NDs from a XML file More... | |
mitk::NavigationDataSequentialPlayer::Pointer | m_SequentialPlayer |
QString | m_CmpFilename |
filename of the input file More... | |
QTimer * | m_PlayingTimer |
update timer More... | |
mitk::NavigationData::TimeStampType | m_StartTime |
start time of playback needed for time display More... | |
unsigned int | m_CurrentSequentialPointNumber |
current point number More... | |
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 47 of file QmitkIGTPlayerWidget.h.
Enumerator | |
---|---|
RealTimeMode |
playback mode enum |
SequentialMode |
Definition at line 134 of file QmitkIGTPlayerWidget.h.
QmitkIGTPlayerWidget::QmitkIGTPlayerWidget | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | f = 0 |
||
) |
default constructor
Definition at line 35 of file QmitkIGTPlayerWidget.cpp.
References CreateConnections(), m_Controls, m_PlayingTimer, and ResetLCDNumbers().
QmitkIGTPlayerWidget::~QmitkIGTPlayerWidget | ( | ) |
default deconstructor
Definition at line 53 of file QmitkIGTPlayerWidget.cpp.
References m_Controls, and m_PlayingTimer.
|
protected |
Checks if an imput file with the set filename exists.
Definition at line 83 of file QmitkIGTPlayerWidget.cpp.
References m_CmpFilename.
Referenced by OnPlayButtonClicked().
void QmitkIGTPlayerWidget::ClearTrajectorySelectCombobox | ( | ) |
Clears all items in the trajectory selection combobox.
Definition at line 528 of file QmitkIGTPlayerWidget.cpp.
References m_Controls, and SignalCurrentTrajectoryChanged().
Referenced by SetTrajectoryNames().
|
protectedvirtual |
Creation of the connections.
Definition at line 60 of file QmitkIGTPlayerWidget.cpp.
References m_Controls, m_PlayingTimer, OnGoToBegin(), OnGoToEnd(), OnOpenFileButtonPressed(), OnPlayButtonClicked(), OnPlaying(), OnSliderPressed(), OnSliderReleased(), SignalCurrentTrajectoryChanged(), and SignalSplineModeToggled().
Referenced by QmitkIGTPlayerWidget().
QmitkIGTPlayerWidget::PlaybackMode QmitkIGTPlayerWidget::GetCurrentPlaybackMode | ( | ) |
Definition at line 242 of file QmitkIGTPlayerWidget.cpp.
References RealTimeMode.
Referenced by GetNavigationDataPoint(), GetNavigationDatas(), GetNavigationDatasPointSet(), GetNumberOfTools(), OnGoToBegin(), OnPlayButtonClicked(), and OnPlaying().
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 405 of file QmitkIGTPlayerWidget.cpp.
References GetCurrentPlaybackMode(), GetNumberOfTools(), m_RealTimePlayer, m_SequentialPlayer, RealTimeMode, and SequentialMode.
const std::vector< mitk::NavigationData::Pointer > QmitkIGTPlayerWidget::GetNavigationDatas | ( | ) |
Returns the current playback NavigationDatas from the xml-file.
Definition at line 343 of file QmitkIGTPlayerWidget.cpp.
References GetCurrentPlaybackMode(), m_RealTimePlayer, m_SequentialPlayer, RealTimeMode, and SequentialMode.
const mitk::PointSet::Pointer QmitkIGTPlayerWidget::GetNavigationDatasPointSet | ( | ) |
Returns a PointSet of the current NavigationDatas for all recorded tools.
Definition at line 366 of file QmitkIGTPlayerWidget.cpp.
References GetCurrentPlaybackMode(), m_RealTimePlayer, m_SequentialPlayer, mitk::PointSet::New(), RealTimeMode, and SequentialMode.
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 97 of file QmitkIGTPlayerWidget.cpp.
References GetCurrentPlaybackMode(), m_RealTimePlayer, m_SequentialPlayer, RealTimeMode, and SequentialMode.
Referenced by GetNavigationDataPoint().
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 250 of file QmitkIGTPlayerWidget.cpp.
References m_PlayingTimer.
int QmitkIGTPlayerWidget::GetResolution | ( | ) |
Returns the current resolution value from the resolution spinbox.
Definition at line 523 of file QmitkIGTPlayerWidget.cpp.
References m_Controls.
bool QmitkIGTPlayerWidget::IsTrajectoryInSplineMode | ( | ) |
Returns whether spline mode checkbox is selected.
Definition at line 78 of file QmitkIGTPlayerWidget.cpp.
References m_Controls.
|
protectedslot |
Stops the playback and resets the player to the beginning.
Definition at line 481 of file QmitkIGTPlayerWidget.cpp.
References GetCurrentPlaybackMode(), m_Controls, m_PlayingTimer, m_RealTimePlayer, m_StartTime, RealTimeMode, and ResetLCDNumbers().
Referenced by CreateConnections().
|
protectedslot |
Stops the playback.
Definition at line 473 of file QmitkIGTPlayerWidget.cpp.
References ResetLCDNumbers(), and StopPlaying().
Referenced by CreateConnections(), and OnOpenFileButtonPressed().
|
protectedslot |
Opens file open dialog for searching the input file.
stops playing and resets lcd numbers
Definition at line 446 of file QmitkIGTPlayerWidget.cpp.
References filename, mitk::IOUtil::LoadBaseData(), m_CmpFilename, m_Controls, m_RealTimePlayer, m_SequentialPlayer, OnGoToEnd(), and SignalInputFileChanged().
Referenced by CreateConnections().
|
protectedslot |
Starts or pauses the playback.
Definition at line 122 of file QmitkIGTPlayerWidget.cpp.
References CheckInputFileValid(), GetCurrentPlaybackMode(), mitk::IOUtil::LoadBaseData(), m_CmpFilename, m_Controls, m_PlayingTimer, m_RealTimePlayer, m_SequentialPlayer, mitk::NavigationDataSequentialPlayer::New(), mitk::NavigationDataPlayer::New(), RealTimeMode, SequentialMode, SignalPlayingPaused(), SignalPlayingResumed(), and SignalPlayingStarted().
Referenced by CreateConnections().
|
protectedslot |
Updates the playback data.
Definition at line 277 of file QmitkIGTPlayerWidget.cpp.
References GetCurrentPlaybackMode(), m_Controls, m_CurrentSequentialPointNumber, m_RealTimePlayer, m_SequentialPlayer, m_StartTime, min(), RealTimeMode, SequentialMode, SignalPlayerUpdated(), and StopPlaying().
Referenced by CreateConnections().
|
protectedslot |
Switches widget between realtime and sequential mode.
Definition at line 539 of file QmitkIGTPlayerWidget.cpp.
References m_Controls, and StopPlaying().
|
protectedslot |
Pauses playback when slider is pressed by user.
Definition at line 569 of file QmitkIGTPlayerWidget.cpp.
References m_Controls.
Referenced by CreateConnections().
|
protectedslot |
Moves player position to the position selected with the slider.
Definition at line 554 of file QmitkIGTPlayerWidget.cpp.
References m_Controls, m_CurrentSequentialPointNumber, and m_SequentialPlayer.
Referenced by CreateConnections().
|
protectedslot |
Stops the playback.
Definition at line 255 of file QmitkIGTPlayerWidget.cpp.
References StopPlaying().
|
protected |
Sets all LCD numbers to 0.
Definition at line 499 of file QmitkIGTPlayerWidget.cpp.
References m_Controls.
Referenced by OnGoToBegin(), OnGoToEnd(), QmitkIGTPlayerWidget(), and StopPlaying().
void QmitkIGTPlayerWidget::SetTrajectoryNames | ( | const QStringList | toolNames | ) |
Sets the given tool names list to the trajectory select combobox.
Definition at line 506 of file QmitkIGTPlayerWidget.cpp.
References ClearTrajectorySelectCombobox(), m_Controls, and SignalCurrentTrajectoryChanged().
void QmitkIGTPlayerWidget::SetUpdateRate | ( | unsigned int | msecs | ) |
Sets the update rate of this widget's playing timer.
Definition at line 117 of file QmitkIGTPlayerWidget.cpp.
References m_PlayingTimer.
|
signal |
This signal is emitted if the index of the current selected trajectory select combobox item changes.
Referenced by ClearTrajectorySelectCombobox(), CreateConnections(), and SetTrajectoryNames().
|
signal |
This signal is emitted if the input file for the replay was changed.
Referenced by OnOpenFileButtonPressed().
|
signal |
This signal is emitted every time the player updated the NavigationDatas.
Referenced by OnPlaying().
|
signal |
This signal is emitted when the player reaches the end of the playback.
|
signal |
This signal is emitted when the player is paused.
Referenced by OnPlayButtonClicked().
|
signal |
This signal is emitted when the player resumes after a pause.
Referenced by OnPlayButtonClicked().
|
signal |
This signal is emitted when the player starts the playback.
Referenced by OnPlayButtonClicked().
|
signal |
This signal is emitted when the player stops.
Referenced by StopPlaying().
|
signal |
This signal is emitted if the spline mode checkbox is toggled or untoggled.
Referenced by CreateConnections().
void QmitkIGTPlayerWidget::StopPlaying | ( | ) |
Stops the playback.
Definition at line 260 of file QmitkIGTPlayerWidget.cpp.
References m_Controls, m_CurrentSequentialPointNumber, m_PlayingTimer, m_RealTimePlayer, m_StartTime, ResetLCDNumbers(), and SignalPlayingStopped().
Referenced by OnGoToEnd(), OnPlaying(), OnSequencialModeToggled(), and OnStopPlaying().
|
protected |
filename of the input file
Definition at line 246 of file QmitkIGTPlayerWidget.h.
Referenced by CheckInputFileValid(), OnOpenFileButtonPressed(), and OnPlayButtonClicked().
|
protected |
Definition at line 241 of file QmitkIGTPlayerWidget.h.
Referenced by ClearTrajectorySelectCombobox(), CreateConnections(), GetResolution(), IsTrajectoryInSplineMode(), OnGoToBegin(), OnOpenFileButtonPressed(), OnPlayButtonClicked(), OnPlaying(), OnSequencialModeToggled(), OnSliderPressed(), OnSliderReleased(), QmitkIGTPlayerWidget(), ResetLCDNumbers(), SetTrajectoryNames(), StopPlaying(), and ~QmitkIGTPlayerWidget().
|
protected |
current point number
Definition at line 250 of file QmitkIGTPlayerWidget.h.
Referenced by OnPlaying(), OnSliderReleased(), and StopPlaying().
|
protected |
update timer
Definition at line 247 of file QmitkIGTPlayerWidget.h.
Referenced by CreateConnections(), GetPlayingTimer(), OnGoToBegin(), OnPlayButtonClicked(), QmitkIGTPlayerWidget(), SetUpdateRate(), StopPlaying(), and ~QmitkIGTPlayerWidget().
|
protected |
plays NDs from a XML file
Definition at line 243 of file QmitkIGTPlayerWidget.h.
Referenced by GetNavigationDataPoint(), GetNavigationDatas(), GetNavigationDatasPointSet(), GetNumberOfTools(), OnGoToBegin(), OnOpenFileButtonPressed(), OnPlayButtonClicked(), OnPlaying(), and StopPlaying().
|
protected |
Definition at line 244 of file QmitkIGTPlayerWidget.h.
Referenced by GetNavigationDataPoint(), GetNavigationDatas(), GetNavigationDatasPointSet(), GetNumberOfTools(), OnOpenFileButtonPressed(), OnPlayButtonClicked(), OnPlaying(), and OnSliderReleased().
|
protected |
start time of playback needed for time display
Definition at line 249 of file QmitkIGTPlayerWidget.h.
Referenced by OnGoToBegin(), OnPlaying(), and StopPlaying().
|
static |
Definition at line 52 of file QmitkIGTPlayerWidget.h.