Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
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>
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) |
QmitkRenderWindow * | GetRenderWindow () const |
void | SetVideoBackground (QmitkVideoBackground *_VideoBackground) |
QmitkVideoBackground * | GetVideoBackground () 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 | |
QmitkVideoBackground * | m_VideoBackground |
QmitkRenderWindow * | m_RenderWindow |
mitk::OpenCVVideoSource * | m_VideoSource |
Ui::QmitkOpenCVVideoControls * | m_Controls |
bool | m_SliderCurrentlyMoved |
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.
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().
|
virtual |
call reset if video playback is enabled here
Definition at line 79 of file QmitkOpenCVVideoControls.cpp.
References mitk::VideoSource::IsCapturingEnabled(), m_VideoSource, MITK_WARN, mitk::IPersistenceService::RemovePropertyListReplacedObserver(), and Stop().
|
overridevirtual |
calls FromPropertyList
Reimplemented from mitk::PropertyListReplacedObserver.
Definition at line 444 of file QmitkOpenCVVideoControls.cpp.
|
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.
|
protectedslot |
Definition at line 280 of file QmitkOpenCVVideoControls.cpp.
References mitk::OpenCVVideoSource::GetCurrentFrame(), mitk::OpenCVVideoSource::GetVideoCaptureProperty(), m_Controls, m_SliderCurrentlyMoved, m_VideoSource, and NewOpenCVFrameAvailable().
|
signal |
When playback is started this informs when a new frame was grabbed
Referenced by NewFrameAvailable().
|
protectedslot |
Definition at line 148 of file QmitkOpenCVVideoControls.cpp.
References m_VideoSource, MITK_INFO, mitk::OpenCVVideoSource::PauseCapturing(), Play(), and SwitchPlayButton().
|
protectedslot |
Definition at line 142 of file QmitkOpenCVVideoControls.cpp.
References m_VideoSource, MITK_INFO, and mitk::OpenCVVideoSource::SetRepeatVideo().
|
protectedslot |
Definition at line 163 of file QmitkOpenCVVideoControls.cpp.
References Stop().
|
protectedslot |
Definition at line 99 of file QmitkOpenCVVideoControls.cpp.
References m_Controls.
Referenced by SetVideoBackground(), and Stop().
|
protectedslot |
Definition at line 105 of file QmitkOpenCVVideoControls.cpp.
References m_Controls.
Referenced by Stop().
|
protectedslot |
Definition at line 120 of file QmitkOpenCVVideoControls.cpp.
References mitk::VideoSource::GetCapturePaused(), mitk::OpenCVVideoSource::GetVideoCaptureProperty(), m_SliderCurrentlyMoved, m_VideoSource, MITK_DEBUG, and mitk::OpenCVVideoSource::PauseCapturing().
|
protectedslot |
Definition at line 129 of file QmitkOpenCVVideoControls.cpp.
References mitk::VideoSource::GetCapturePaused(), m_Controls, m_SliderCurrentlyMoved, m_VideoSource, MITK_DEBUG, mitk::OpenCVVideoSource::PauseCapturing(), and mitk::OpenCVVideoSource::SetVideoCaptureProperty().
|
protectedslot |
Definition at line 168 of file QmitkOpenCVVideoControls.cpp.
References QmitkVideoBackground::AddRenderWindow(), QmitkVideoBackground::Enable(), EndOfVideoSourceReached(), mitk::VideoSource::GetCapturePaused(), QmitkRenderWindow::GetVtkRenderWindow(), mitk::VideoSource::IsCapturingEnabled(), m_Controls, m_RenderWindow, m_VideoBackground, m_VideoSource, MITK_ERROR, NewFrameAvailable(), mitk::OpenCVVideoSource::PauseCapturing(), mitk::OpenCVVideoSource::SetRepeatVideo(), QmitkVideoBackground::SetTimerDelay(), mitk::OpenCVVideoSource::SetVideoCameraInput(), mitk::OpenCVVideoSource::SetVideoFileInput(), mitk::OpenCVVideoSource::StartCapturing(), and SwitchPlayButton().
Referenced by EndOfVideoSourceReached(), and on_PlayButton_clicked().
|
protectedslot |
Definition at line 380 of file QmitkOpenCVVideoControls.cpp.
References m_VideoBackground, m_VideoSource, and SetVideoBackground().
Referenced by SetVideoBackground().
|
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::SetVideoBackground | ( | QmitkVideoBackground * | _VideoBackground | ) |
sets the qmitkvideobackground for this
Definition at line 328 of file QmitkOpenCVVideoControls.cpp.
References mitk::OpenCVVideoSource::GetGrabbingDeviceNumber(), QmitkVideoBackground::GetTimerDelay(), mitk::OpenCVVideoSource::GetVideoFileName(), QmitkVideoBackground::GetVideoSource(), m_Controls, m_VideoBackground, m_VideoSource, MITK_WARN, on_UseGrabbingDeviceButton_clicked(), QObjectDestroyed(), and Reset().
Referenced by QmitkOpenCVVideoControls(), and QObjectDestroyed().
|
protectedslot |
Definition at line 230 of file QmitkOpenCVVideoControls.cpp.
References QmitkVideoBackground::Disable(), QmitkRenderWindow::GetVtkRenderWindow(), m_Controls, m_RenderWindow, m_VideoBackground, m_VideoSource, NewFrameAvailable(), on_UseGrabbingDeviceButton_clicked(), on_UseVideoFileButton_clicked(), QmitkVideoBackground::RemoveRenderWindow(), mitk::OpenCVVideoSource::StopCapturing(), and SwitchPlayButton().
Referenced by EndOfVideoSourceReached(), on_StopButton_clicked(), Reset(), and ~QmitkOpenCVVideoControls().
|
protectedslot |
Definition at line 264 of file QmitkOpenCVVideoControls.cpp.
References m_Controls.
Referenced by on_PlayButton_clicked(), Play(), and Stop().
|
protected |
Definition at line 108 of file QmitkOpenCVVideoControls.h.
Referenced by EndOfVideoSourceReached(), NewFrameAvailable(), on_UseGrabbingDeviceButton_clicked(), on_UseVideoFileButton_clicked(), on_VideoProgressSlider_sliderReleased(), Play(), QmitkOpenCVVideoControls(), SetVideoBackground(), Stop(), and SwitchPlayButton().
|
protected |
Definition at line 106 of file QmitkOpenCVVideoControls.h.
Referenced by GetRenderWindow(), Play(), SetRenderWindow(), and Stop().
|
protected |
Definition at line 109 of file QmitkOpenCVVideoControls.h.
Referenced by NewFrameAvailable(), on_VideoProgressSlider_sliderPressed(), and on_VideoProgressSlider_sliderReleased().
|
protected |
Definition at line 105 of file QmitkOpenCVVideoControls.h.
Referenced by GetVideoBackground(), Play(), QObjectDestroyed(), SetVideoBackground(), and Stop().
|
protected |
Definition at line 107 of file QmitkOpenCVVideoControls.h.
Referenced by NewFrameAvailable(), on_PlayButton_clicked(), on_RepeatVideoButton_clicked(), on_VideoProgressSlider_sliderPressed(), on_VideoProgressSlider_sliderReleased(), Play(), QObjectDestroyed(), SetVideoBackground(), Stop(), and ~QmitkOpenCVVideoControls().