Medical Imaging Interaction Toolkit  2016.11.0
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=0, Qt::WindowFlags f=0)
 
virtual ~QmitkOpenCVVideoControls ()
 
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_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 SwitchPlayButton (bool paused)
 
void QObjectDestroyed (QObject *obj=0)
 
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 40 of file QmitkOpenCVVideoControls.h.

Constructor & Destructor Documentation

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

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

Definition at line 48 of file QmitkOpenCVVideoControls.cpp.

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

QmitkOpenCVVideoControls::~QmitkOpenCVVideoControls ( )
virtual

Member Function Documentation

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

calls FromPropertyList

Reimplemented from mitk::PropertyListReplacedObserver.

Definition at line 444 of file QmitkOpenCVVideoControls.cpp.

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

Definition at line 288 of file QmitkOpenCVVideoControls.cpp.

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

Referenced by Play().

QmitkRenderWindow * QmitkOpenCVVideoControls::GetRenderWindow ( ) const

returns the current render window

Definition at line 323 of file QmitkOpenCVVideoControls.cpp.

References m_RenderWindow.

QmitkVideoBackground * QmitkOpenCVVideoControls::GetVideoBackground ( ) const

returns the current QmitkVideoBackground

Definition at line 375 of file QmitkOpenCVVideoControls.cpp.

References m_VideoBackground.

void QmitkOpenCVVideoControls::NewFrameAvailable ( mitk::VideoSource videoSource)
protectedslot
void QmitkOpenCVVideoControls::NewOpenCVFrameAvailable ( const IplImage *  )
signal

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

Referenced by NewFrameAvailable().

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

Definition at line 163 of file QmitkOpenCVVideoControls.cpp.

References Stop().

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

Definition at line 99 of file QmitkOpenCVVideoControls.cpp.

References m_Controls.

Referenced by SetVideoBackground(), and Stop().

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

Definition at line 105 of file QmitkOpenCVVideoControls.cpp.

References m_Controls.

Referenced by Stop().

void QmitkOpenCVVideoControls::on_VideoProgressSlider_sliderPressed ( )
protectedslot
void QmitkOpenCVVideoControls::on_VideoProgressSlider_sliderReleased ( )
protectedslot
void QmitkOpenCVVideoControls::QObjectDestroyed ( QObject *  obj = 0)
protectedslot

Definition at line 380 of file QmitkOpenCVVideoControls.cpp.

References m_VideoBackground, m_VideoSource, and SetVideoBackground().

Referenced by SetVideoBackground().

void QmitkOpenCVVideoControls::Reset ( void  )
protectedslot

Definition at line 259 of file QmitkOpenCVVideoControls.cpp.

References Stop().

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

void QmitkOpenCVVideoControls::SetRenderWindow ( QmitkRenderWindow _RenderWindow)

sets the render window for this video player

Definition at line 301 of file QmitkOpenCVVideoControls.cpp.

References m_RenderWindow, and Reset().

Referenced by QmitkOpenCVVideoControls().

void QmitkOpenCVVideoControls::SwitchPlayButton ( bool  paused)
protectedslot

Definition at line 264 of file QmitkOpenCVVideoControls.cpp.

References m_Controls.

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

Member Data Documentation

QmitkRenderWindow* QmitkOpenCVVideoControls::m_RenderWindow
protected

Definition at line 106 of file QmitkOpenCVVideoControls.h.

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

bool QmitkOpenCVVideoControls::m_SliderCurrentlyMoved
protected
QmitkVideoBackground* QmitkOpenCVVideoControls::m_VideoBackground
protected

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