MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkIGTPlayerWidget Class Reference

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>

Inheritance diagram for QmitkIGTPlayerWidget:

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
 

Detailed Description

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.

Member Enumeration Documentation

◆ PlaybackMode

Enumerator
RealTimeMode 

playback mode enum

SequentialMode 

Definition at line 130 of file QmitkIGTPlayerWidget.h.

Constructor & Destructor Documentation

◆ QmitkIGTPlayerWidget()

QmitkIGTPlayerWidget::QmitkIGTPlayerWidget ( QWidget * parent = nullptr,
Qt::WindowFlags f = {} )

default constructor

Definition at line 32 of file QmitkIGTPlayerWidget.cpp.

◆ ~QmitkIGTPlayerWidget()

QmitkIGTPlayerWidget::~QmitkIGTPlayerWidget ( )
override

default deconstructor

Definition at line 50 of file QmitkIGTPlayerWidget.cpp.

Member Function Documentation

◆ CheckInputFileValid()

bool QmitkIGTPlayerWidget::CheckInputFileValid ( )
protected

Checks if an imput file with the set filename exists.

Definition at line 80 of file QmitkIGTPlayerWidget.cpp.

◆ ClearTrajectorySelectCombobox()

void QmitkIGTPlayerWidget::ClearTrajectorySelectCombobox ( )

Clears all items in the trajectory selection combobox.

Definition at line 519 of file QmitkIGTPlayerWidget.cpp.

◆ CreateConnections()

void QmitkIGTPlayerWidget::CreateConnections ( )
protectedvirtual

Creation of the connections.

Definition at line 57 of file QmitkIGTPlayerWidget.cpp.

◆ GetCurrentPlaybackMode()

QmitkIGTPlayerWidget::PlaybackMode QmitkIGTPlayerWidget::GetCurrentPlaybackMode ( )

Definition at line 239 of file QmitkIGTPlayerWidget.cpp.

◆ GetNavigationDataPoint()

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.

◆ GetNavigationDatas()

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.

◆ GetNavigationDatasPointSet()

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.

◆ GetNumberOfTools()

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.

◆ GetPlayingTimer()

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.

◆ GetResolution()

int QmitkIGTPlayerWidget::GetResolution ( )

Returns the current resolution value from the resolution spinbox.

Definition at line 514 of file QmitkIGTPlayerWidget.cpp.

◆ IsTrajectoryInSplineMode()

bool QmitkIGTPlayerWidget::IsTrajectoryInSplineMode ( )

Returns whether spline mode checkbox is selected.

Definition at line 75 of file QmitkIGTPlayerWidget.cpp.

◆ OnGoToBegin

void QmitkIGTPlayerWidget::OnGoToBegin ( )
protectedslot

Stops the playback and resets the player to the beginning.

Definition at line 472 of file QmitkIGTPlayerWidget.cpp.

◆ OnGoToEnd

void QmitkIGTPlayerWidget::OnGoToEnd ( )
protectedslot

Stops the playback.

Definition at line 464 of file QmitkIGTPlayerWidget.cpp.

◆ OnOpenFileButtonPressed

void QmitkIGTPlayerWidget::OnOpenFileButtonPressed ( )
protectedslot

Opens file open dialog for searching the input file.

stops playing and resets lcd numbers

Definition at line 436 of file QmitkIGTPlayerWidget.cpp.

◆ OnPlayButtonClicked

void QmitkIGTPlayerWidget::OnPlayButtonClicked ( bool toggled)
protectedslot

Starts or pauses the playback.

Definition at line 119 of file QmitkIGTPlayerWidget.cpp.

◆ OnPlaying

void QmitkIGTPlayerWidget::OnPlaying ( )
protectedslot

Updates the playback data.

Definition at line 274 of file QmitkIGTPlayerWidget.cpp.

◆ OnSequencialModeToggled

void QmitkIGTPlayerWidget::OnSequencialModeToggled ( bool toggled)
protectedslot

Switches widget between realtime and sequential mode.

Definition at line 530 of file QmitkIGTPlayerWidget.cpp.

◆ OnSliderPressed

void QmitkIGTPlayerWidget::OnSliderPressed ( )
protectedslot

Pauses playback when slider is pressed by user.

Definition at line 560 of file QmitkIGTPlayerWidget.cpp.

◆ OnSliderReleased

void QmitkIGTPlayerWidget::OnSliderReleased ( )
protectedslot

Moves player position to the position selected with the slider.

Definition at line 545 of file QmitkIGTPlayerWidget.cpp.

◆ OnStopPlaying

void QmitkIGTPlayerWidget::OnStopPlaying ( )
protectedslot

Stops the playback.

Definition at line 252 of file QmitkIGTPlayerWidget.cpp.

◆ ResetLCDNumbers()

void QmitkIGTPlayerWidget::ResetLCDNumbers ( )
protected

Sets all LCD numbers to 0.

Definition at line 490 of file QmitkIGTPlayerWidget.cpp.

◆ SetTrajectoryNames()

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.

◆ SetUpdateRate()

void QmitkIGTPlayerWidget::SetUpdateRate ( unsigned int msecs)

Sets the update rate of this widget's playing timer.

Definition at line 114 of file QmitkIGTPlayerWidget.cpp.

◆ SignalCurrentTrajectoryChanged

void QmitkIGTPlayerWidget::SignalCurrentTrajectoryChanged ( int index)
signal

This signal is emitted if the index of the current selected trajectory select combobox item changes.

◆ SignalInputFileChanged

void QmitkIGTPlayerWidget::SignalInputFileChanged ( )
signal

This signal is emitted if the input file for the replay was changed.

◆ SignalPlayerUpdated

void QmitkIGTPlayerWidget::SignalPlayerUpdated ( )
signal

This signal is emitted every time the player updated the NavigationDatas.

◆ SignalPlayingEnded

void QmitkIGTPlayerWidget::SignalPlayingEnded ( )
signal

This signal is emitted when the player reaches the end of the playback.

◆ SignalPlayingPaused

void QmitkIGTPlayerWidget::SignalPlayingPaused ( )
signal

This signal is emitted when the player is paused.

◆ SignalPlayingResumed

void QmitkIGTPlayerWidget::SignalPlayingResumed ( )
signal

This signal is emitted when the player resumes after a pause.

◆ SignalPlayingStarted

void QmitkIGTPlayerWidget::SignalPlayingStarted ( )
signal

This signal is emitted when the player starts the playback.

◆ SignalPlayingStopped

void QmitkIGTPlayerWidget::SignalPlayingStopped ( )
signal

This signal is emitted when the player stops.

◆ SignalSplineModeToggled

void QmitkIGTPlayerWidget::SignalSplineModeToggled ( bool toggled)
signal

This signal is emitted if the spline mode checkbox is toggled or untoggled.

◆ StopPlaying()

void QmitkIGTPlayerWidget::StopPlaying ( )

Stops the playback.

Definition at line 257 of file QmitkIGTPlayerWidget.cpp.

Member Data Documentation

◆ m_CmpFilename

QString QmitkIGTPlayerWidget::m_CmpFilename
protected

filename of the input file

Definition at line 243 of file QmitkIGTPlayerWidget.h.

◆ m_Controls

Ui::QmitkIGTPlayerWidgetControls* QmitkIGTPlayerWidget::m_Controls
protected

Definition at line 241 of file QmitkIGTPlayerWidget.h.

◆ m_CurrentSequentialPointNumber

unsigned int QmitkIGTPlayerWidget::m_CurrentSequentialPointNumber
protected

current point number

Definition at line 240 of file QmitkIGTPlayerWidget.h.

◆ m_PlayingTimer

QTimer* QmitkIGTPlayerWidget::m_PlayingTimer
protected

update timer

Definition at line 244 of file QmitkIGTPlayerWidget.h.

◆ m_RealTimePlayer

mitk::NavigationDataPlayer::Pointer QmitkIGTPlayerWidget::m_RealTimePlayer
protected

plays NDs from a XML file

Definition at line 237 of file QmitkIGTPlayerWidget.h.

◆ m_SequentialPlayer

mitk::NavigationDataSequentialPlayer::Pointer QmitkIGTPlayerWidget::m_SequentialPlayer
protected

Definition at line 238 of file QmitkIGTPlayerWidget.h.

◆ m_StartTime

mitk::NavigationData::TimeStampType QmitkIGTPlayerWidget::m_StartTime
protected

start time of playback needed for time display

Definition at line 239 of file QmitkIGTPlayerWidget.h.

◆ VIEW_ID

const std::string QmitkIGTPlayerWidget::VIEW_ID
static

Definition at line 48 of file QmitkIGTPlayerWidget.h.


The documentation for this class was generated from the following files: