Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
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:
Collaboration diagram for QmitkIGTPlayerWidget:

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=nullptr, Qt::WindowFlags f=nullptr)
 default constructor More...
 
 ~QmitkIGTPlayerWidget () override
 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

mitk::NavigationDataPlayer::Pointer m_RealTimePlayer
 plays NDs from a XML file More...
 
mitk::NavigationDataSequentialPlayer::Pointer m_SequentialPlayer
 
mitk::NavigationData::TimeStampType m_StartTime
 start time of playback needed for time display More...
 
unsigned int m_CurrentSequentialPointNumber
 current point number More...
 
Ui::QmitkIGTPlayerWidgetControls * m_Controls
 
QString m_CmpFilename
 filename of the input file More...
 
QTimer * m_PlayingTimer
 update timer More...
 

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 = nullptr 
)

default constructor

◆ ~QmitkIGTPlayerWidget()

QmitkIGTPlayerWidget::~QmitkIGTPlayerWidget ( )
override

default deconstructor

Member Function Documentation

◆ CheckInputFileValid()

bool QmitkIGTPlayerWidget::CheckInputFileValid ( )
protected

Checks if an imput file with the set filename exists.

◆ ClearTrajectorySelectCombobox()

void QmitkIGTPlayerWidget::ClearTrajectorySelectCombobox ( )

Clears all items in the trajectory selection combobox.

◆ CreateConnections()

virtual void QmitkIGTPlayerWidget::CreateConnections ( )
protectedvirtual

Creation of the connections.

◆ GetCurrentPlaybackMode()

PlaybackMode QmitkIGTPlayerWidget::GetCurrentPlaybackMode ( )

◆ 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.

◆ GetNavigationDatas()

const std::vector<mitk::NavigationData::Pointer> QmitkIGTPlayerWidget::GetNavigationDatas ( )

Returns the current playback NavigationDatas from the xml-file.

◆ GetNavigationDatasPointSet()

const mitk::PointSet::Pointer QmitkIGTPlayerWidget::GetNavigationDatasPointSet ( )

Returns a PointSet of the current NavigationDatas for all recorded tools.

◆ GetNumberOfTools()

unsigned int QmitkIGTPlayerWidget::GetNumberOfTools ( )

Returns the number of different tools from the current playing stream.

Retuns 0 if playback file is invalid.

◆ 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

◆ GetResolution()

int QmitkIGTPlayerWidget::GetResolution ( )

Returns the current resolution value from the resolution spinbox.

◆ IsTrajectoryInSplineMode()

bool QmitkIGTPlayerWidget::IsTrajectoryInSplineMode ( )

Returns whether spline mode checkbox is selected.

◆ OnGoToBegin

void QmitkIGTPlayerWidget::OnGoToBegin ( )
protectedslot

Stops the playback and resets the player to the beginning.

◆ OnGoToEnd

void QmitkIGTPlayerWidget::OnGoToEnd ( )
protectedslot

Stops the playback.

◆ OnOpenFileButtonPressed

void QmitkIGTPlayerWidget::OnOpenFileButtonPressed ( )
protectedslot

Opens file open dialog for searching the input file.

◆ OnPlayButtonClicked

void QmitkIGTPlayerWidget::OnPlayButtonClicked ( bool  toggled)
protectedslot

Starts or pauses the playback.

◆ OnPlaying

void QmitkIGTPlayerWidget::OnPlaying ( )
protectedslot

Updates the playback data.

◆ OnSequencialModeToggled

void QmitkIGTPlayerWidget::OnSequencialModeToggled ( bool  toggled)
protectedslot

Switches widget between realtime and sequential mode.

◆ OnSliderPressed

void QmitkIGTPlayerWidget::OnSliderPressed ( )
protectedslot

Pauses playback when slider is pressed by user.

◆ OnSliderReleased

void QmitkIGTPlayerWidget::OnSliderReleased ( )
protectedslot

Moves player position to the position selected with the slider.

◆ OnStopPlaying

void QmitkIGTPlayerWidget::OnStopPlaying ( )
protectedslot

Stops the playback.

◆ ResetLCDNumbers()

void QmitkIGTPlayerWidget::ResetLCDNumbers ( )
protected

Sets all LCD numbers to 0.

◆ SetTrajectoryNames()

void QmitkIGTPlayerWidget::SetTrajectoryNames ( const QStringList  toolNames)

Sets the given tool names list to the trajectory select combobox.

◆ SetUpdateRate()

void QmitkIGTPlayerWidget::SetUpdateRate ( unsigned int  msecs)

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

◆ 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.

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 file: