Medical Imaging Interaction Toolkit
2018.4.99-389bf124
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=nullptr, Qt::WindowFlags f=nullptr) | |
~QmitkOpenCVVideoControls () override | |
void | SetRenderWindow (QmitkRenderWindow *_RenderWindow) |
QmitkRenderWindow * | GetRenderWindow () const |
void | SetVideoBackground (QmitkVideoBackground *_VideoBackground) |
QmitkVideoBackground * | GetVideoBackground () const |
void | AfterPropertyListReplaced (const std::string &id, mitk::PropertyList *propertyList) override |
![]() | |
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 | |
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 37 of file QmitkOpenCVVideoControls.h.
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().
|
override |
call reset if video playback is enabled here
Definition at line 75 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 440 of file QmitkOpenCVVideoControls.cpp.
|
protectedslot |
Definition at line 284 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 319 of file QmitkOpenCVVideoControls.cpp.
References m_RenderWindow.
QmitkVideoBackground * QmitkOpenCVVideoControls::GetVideoBackground | ( | ) | const |
returns the current QmitkVideoBackground
Definition at line 371 of file QmitkOpenCVVideoControls.cpp.
References m_VideoBackground.
|
protectedslot |
Definition at line 257 of file QmitkOpenCVVideoControls.cpp.
References m_Controls.
Referenced by on_PlayButton_clicked(), Play(), and Stop().
|
protectedslot |
Definition at line 273 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 140 of file QmitkOpenCVVideoControls.cpp.
References IsPlaying(), m_VideoSource, MITK_INFO, mitk::OpenCVVideoSource::PauseCapturing(), and Play().
|
protectedslot |
Definition at line 134 of file QmitkOpenCVVideoControls.cpp.
References m_VideoSource, MITK_INFO, and mitk::OpenCVVideoSource::SetRepeatVideo().
|
protectedslot |
Definition at line 155 of file QmitkOpenCVVideoControls.cpp.
References Stop().
|
protectedslot |
Definition at line 101 of file QmitkOpenCVVideoControls.cpp.
References m_Controls.
Referenced by SetVideoBackground(), and Stop().
|
protectedslot |
Definition at line 107 of file QmitkOpenCVVideoControls.cpp.
References m_Controls.
Referenced by Stop().
|
protectedslot |
Definition at line 114 of file QmitkOpenCVVideoControls.cpp.
References mitk::VideoSource::GetCapturePaused(), m_SliderCurrentlyMoved, m_VideoSource, and mitk::OpenCVVideoSource::PauseCapturing().
|
protectedslot |
Definition at line 122 of file QmitkOpenCVVideoControls.cpp.
References mitk::VideoSource::GetCapturePaused(), mitk::OpenCVVideoSource::GetVideoCaptureProperty(), m_Controls, m_SliderCurrentlyMoved, m_VideoSource, mitk::OpenCVVideoSource::PauseCapturing(), and mitk::OpenCVVideoSource::SetVideoCaptureProperty().
Referenced by on_VideoProgressSlider_valueChanged().
|
protectedslot |
Definition at line 95 of file QmitkOpenCVVideoControls.cpp.
References on_VideoProgressSlider_sliderReleased().
|
protectedslot |
Definition at line 160 of file QmitkOpenCVVideoControls.cpp.
References QmitkVideoBackground::AddRenderWindow(), QmitkVideoBackground::Enable(), EndOfVideoSourceReached(), mitk::VideoSource::GetCapturePaused(), QmitkRenderWindow::GetVtkRenderWindow(), mitk::VideoSource::IsCapturingEnabled(), IsPlaying(), 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(), and mitk::OpenCVVideoSource::StartCapturing().
Referenced by EndOfVideoSourceReached(), and on_PlayButton_clicked().
|
protectedslot |
Definition at line 376 of file QmitkOpenCVVideoControls.cpp.
References GetPersistenceService(), mitk::IPersistenceService::GetPropertyList(), m_VideoBackground, m_VideoSource, MITK_WARN, and SetVideoBackground().
Referenced by SetVideoBackground().
|
protectedslot |
Definition at line 252 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 297 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 324 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 222 of file QmitkOpenCVVideoControls.cpp.
References QmitkVideoBackground::Disable(), QmitkRenderWindow::GetVtkRenderWindow(), IsPlaying(), m_Controls, m_RenderWindow, m_VideoBackground, m_VideoSource, NewFrameAvailable(), on_UseGrabbingDeviceButton_clicked(), on_UseVideoFileButton_clicked(), QmitkVideoBackground::RemoveRenderWindow(), and mitk::OpenCVVideoSource::StopCapturing().
Referenced by EndOfVideoSourceReached(), on_StopButton_clicked(), Reset(), and ~QmitkOpenCVVideoControls().
|
protected |
Definition at line 106 of file QmitkOpenCVVideoControls.h.
Referenced by EndOfVideoSourceReached(), IsPlaying(), NewFrameAvailable(), on_UseGrabbingDeviceButton_clicked(), on_UseVideoFileButton_clicked(), on_VideoProgressSlider_sliderReleased(), Play(), QmitkOpenCVVideoControls(), SetVideoBackground(), and Stop().
|
protected |
Definition at line 104 of file QmitkOpenCVVideoControls.h.
Referenced by GetRenderWindow(), Play(), SetRenderWindow(), and Stop().
|
protected |
Definition at line 107 of file QmitkOpenCVVideoControls.h.
Referenced by NewFrameAvailable(), on_VideoProgressSlider_sliderPressed(), and on_VideoProgressSlider_sliderReleased().
|
protected |
Definition at line 103 of file QmitkOpenCVVideoControls.h.
Referenced by GetVideoBackground(), Play(), QObjectDestroyed(), SetVideoBackground(), and Stop().
|
protected |
Definition at line 105 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().