Medical Imaging Interaction Toolkit  2018.4.99-bd7b41ba
Medical Imaging Interaction Toolkit
QmitkOpenCVVideoControls Class Reference

Offers widgets to play/pause/stop a video on a certain render window with the use of an !initialized! QmitkVideoBackground. The QmitkVideoBackground should contain an OpenCVVideoSource is then owned by this widget (and deleted) More...

#include <QmitkOpenCVVideoControls.h>

Inheritance diagram for QmitkOpenCVVideoControls:
Collaboration diagram for QmitkOpenCVVideoControls:

Signals

void NewOpenCVFrameAvailable (const IplImage *)
 

Public Member Functions

 QmitkOpenCVVideoControls (QmitkVideoBackground *_VideoBackground, QmitkRenderWindow *_RenderWindow, QWidget *parent=nullptr, Qt::WindowFlags f=nullptr)
 
 ~QmitkOpenCVVideoControls () override
 
void SetRenderWindow (QmitkRenderWindow *_RenderWindow)
 
QmitkRenderWindowGetRenderWindow () const
 
void SetVideoBackground (QmitkVideoBackground *_VideoBackground)
 
QmitkVideoBackgroundGetVideoBackground () const
 
void AfterPropertyListReplaced (const std::string &id, mitk::PropertyList *propertyList) override
 
- Public Member Functions inherited from mitk::PropertyListReplacedObserver
virtual void BeforePropertyListReplaced (const std::string &id, mitk::PropertyList *propertyList)
 

Protected Slots

void on_UseGrabbingDeviceButton_clicked (bool checked=false)
 
void on_UseVideoFileButton_clicked (bool checked=false)
 
void on_VideoProgressSlider_sliderPressed ()
 
void on_VideoProgressSlider_sliderReleased ()
 
void on_VideoProgressSlider_valueChanged (int value)
 
void on_RepeatVideoButton_clicked (bool checked=false)
 
void on_PlayButton_clicked (bool checked=false)
 
void on_StopButton_clicked (bool checked=false)
 
void Play ()
 
void Stop ()
 
void Reset ()
 
void IsPlaying (bool paused)
 
void QObjectDestroyed (QObject *obj=nullptr)
 
void NewFrameAvailable (mitk::VideoSource *videoSource)
 
void EndOfVideoSourceReached (mitk::VideoSource *videoSource)
 

Protected Attributes

QmitkVideoBackgroundm_VideoBackground
 
QmitkRenderWindowm_RenderWindow
 
mitk::OpenCVVideoSourcem_VideoSource
 
Ui::QmitkOpenCVVideoControls * m_Controls
 
bool m_SliderCurrentlyMoved
 

Detailed Description

Offers widgets to play/pause/stop a video on a certain render window with the use of an !initialized! QmitkVideoBackground. The QmitkVideoBackground should contain an OpenCVVideoSource is then owned by this widget (and deleted)

Definition at line 37 of file QmitkOpenCVVideoControls.h.

Constructor & Destructor Documentation

◆ QmitkOpenCVVideoControls()

QmitkOpenCVVideoControls::QmitkOpenCVVideoControls ( QmitkVideoBackground _VideoBackground,
QmitkRenderWindow _RenderWindow,
QWidget *  parent = nullptr,
Qt::WindowFlags  f = nullptr 
)

Construct the widget with the given render window and the given preset values

Definition at line 44 of file QmitkOpenCVVideoControls.cpp.

References mitk::IPersistenceService::AddPropertyListReplacedObserver(), m_Controls, MITK_WARN, SetRenderWindow(), and SetVideoBackground().

◆ ~QmitkOpenCVVideoControls()

QmitkOpenCVVideoControls::~QmitkOpenCVVideoControls ( )
override

Member Function Documentation

◆ AfterPropertyListReplaced()

void QmitkOpenCVVideoControls::AfterPropertyListReplaced ( const std::string &  id,
mitk::PropertyList propertyList 
)
overridevirtual

calls FromPropertyList

Reimplemented from mitk::PropertyListReplacedObserver.

Definition at line 440 of file QmitkOpenCVVideoControls.cpp.

◆ EndOfVideoSourceReached

void QmitkOpenCVVideoControls::EndOfVideoSourceReached ( mitk::VideoSource videoSource)
protectedslot

Definition at line 284 of file QmitkOpenCVVideoControls.cpp.

References m_Controls, Play(), Reset(), and Stop().

Referenced by Play().

◆ GetRenderWindow()

QmitkRenderWindow * QmitkOpenCVVideoControls::GetRenderWindow ( ) const

returns the current render window

Definition at line 319 of file QmitkOpenCVVideoControls.cpp.

References m_RenderWindow.

◆ GetVideoBackground()

QmitkVideoBackground * QmitkOpenCVVideoControls::GetVideoBackground ( ) const

returns the current QmitkVideoBackground

Definition at line 371 of file QmitkOpenCVVideoControls.cpp.

References m_VideoBackground.

◆ IsPlaying

void QmitkOpenCVVideoControls::IsPlaying ( bool  paused)
protectedslot

Definition at line 257 of file QmitkOpenCVVideoControls.cpp.

References m_Controls.

Referenced by on_PlayButton_clicked(), Play(), and Stop().

◆ NewFrameAvailable

void QmitkOpenCVVideoControls::NewFrameAvailable ( mitk::VideoSource videoSource)
protectedslot

◆ NewOpenCVFrameAvailable

void QmitkOpenCVVideoControls::NewOpenCVFrameAvailable ( const IplImage *  )
signal

When playback is started this informs when a new frame was grabbed

Referenced by NewFrameAvailable().

◆ on_PlayButton_clicked

void QmitkOpenCVVideoControls::on_PlayButton_clicked ( bool  checked = false)
protectedslot

◆ on_RepeatVideoButton_clicked

void QmitkOpenCVVideoControls::on_RepeatVideoButton_clicked ( bool  checked = false)
protectedslot

◆ on_StopButton_clicked

void QmitkOpenCVVideoControls::on_StopButton_clicked ( bool  checked = false)
protectedslot

Definition at line 155 of file QmitkOpenCVVideoControls.cpp.

References Stop().

◆ on_UseGrabbingDeviceButton_clicked

void QmitkOpenCVVideoControls::on_UseGrabbingDeviceButton_clicked ( bool  checked = false)
protectedslot

Definition at line 101 of file QmitkOpenCVVideoControls.cpp.

References m_Controls.

Referenced by SetVideoBackground(), and Stop().

◆ on_UseVideoFileButton_clicked

void QmitkOpenCVVideoControls::on_UseVideoFileButton_clicked ( bool  checked = false)
protectedslot

Definition at line 107 of file QmitkOpenCVVideoControls.cpp.

References m_Controls.

Referenced by Stop().

◆ on_VideoProgressSlider_sliderPressed

void QmitkOpenCVVideoControls::on_VideoProgressSlider_sliderPressed ( )
protectedslot

◆ on_VideoProgressSlider_sliderReleased

◆ on_VideoProgressSlider_valueChanged

void QmitkOpenCVVideoControls::on_VideoProgressSlider_valueChanged ( int  value)
protectedslot

◆ Play

◆ QObjectDestroyed

void QmitkOpenCVVideoControls::QObjectDestroyed ( QObject *  obj = nullptr)
protectedslot

◆ Reset

void QmitkOpenCVVideoControls::Reset ( void  )
protectedslot

Definition at line 252 of file QmitkOpenCVVideoControls.cpp.

References Stop().

Referenced by EndOfVideoSourceReached(), SetRenderWindow(), and SetVideoBackground().

◆ SetRenderWindow()

void QmitkOpenCVVideoControls::SetRenderWindow ( QmitkRenderWindow _RenderWindow)

sets the render window for this video player

Definition at line 297 of file QmitkOpenCVVideoControls.cpp.

References m_RenderWindow, and Reset().

Referenced by QmitkOpenCVVideoControls().

◆ SetVideoBackground()

◆ Stop

Member Data Documentation

◆ m_Controls

◆ m_RenderWindow

QmitkRenderWindow* QmitkOpenCVVideoControls::m_RenderWindow
protected

Definition at line 104 of file QmitkOpenCVVideoControls.h.

Referenced by GetRenderWindow(), Play(), SetRenderWindow(), and Stop().

◆ m_SliderCurrentlyMoved

bool QmitkOpenCVVideoControls::m_SliderCurrentlyMoved
protected

◆ m_VideoBackground

QmitkVideoBackground* QmitkOpenCVVideoControls::m_VideoBackground
protected

◆ m_VideoSource


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