MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkOpenCVVideoControls.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef QmitkOpenCVVideoControls_h
14#define QmitkOpenCVVideoControls_h
15
16#include <ui_QmitkOpenCVVideoControls.h>
17#include <MitkOpenCVVideoSupportUIExports.h>
18#include <mitkPropertyListReplacedObserver.h>
19
20#include <opencv2/core.hpp>
21#include <opencv2/core/types_c.h>
22
23class QmitkRenderWindow;
24class QmitkVideoBackground;
25namespace mitk
26{
27 class VideoSource;
28 class OpenCVVideoSource;
29}
30
32
38class MITKOPENCVVIDEOSUPPORTUI_EXPORT QmitkOpenCVVideoControls : public QWidget, public mitk::PropertyListReplacedObserver
39{
40 Q_OBJECT
41
42public:
46 QmitkOpenCVVideoControls(QmitkVideoBackground* _VideoBackground, QmitkRenderWindow* _RenderWindow
47 , QWidget* parent = nullptr, Qt::WindowFlags f = {});
48
53
57 void SetRenderWindow(QmitkRenderWindow* _RenderWindow);
58
62 QmitkRenderWindow* GetRenderWindow() const;
63
67 void SetVideoBackground(QmitkVideoBackground* _VideoBackground);
68
72 QmitkVideoBackground* GetVideoBackground() const;
73
77 void AfterPropertyListReplaced(const std::string& id, mitk::PropertyList* propertyList) override;
78
79signals:
83 void NewOpenCVFrameAvailable(const IplImage*);
84
85 protected slots:
86 void on_UseGrabbingDeviceButton_clicked(bool checked = false);
87 void on_UseVideoFileButton_clicked(bool checked = false);
88 void on_VideoProgressSlider_sliderPressed();
89 void on_VideoProgressSlider_sliderReleased();
90 void on_VideoProgressSlider_valueChanged(int value);
91 void on_RepeatVideoButton_clicked(bool checked = false);
92 void on_PlayButton_clicked(bool checked = false);
93 void on_StopButton_clicked(bool checked = false);
94 void Play();
95 void Stop();
96 void Reset();
97 void IsPlaying(bool paused);
98 void QObjectDestroyed(QObject * obj = nullptr);
99
100 void NewFrameAvailable(mitk::VideoSource* videoSource);
101 void EndOfVideoSourceReached(mitk::VideoSource* videoSource);
102
103protected:
104 QmitkVideoBackground* m_VideoBackground;
105 QmitkRenderWindow* m_RenderWindow;
107 Ui::QmitkOpenCVVideoControls* m_Controls;
109
110private:
111
113
114 QScopedPointer<QmitkOpenCVVideoControlsPrivate> d;
115};
116
117#endif
Offers widgets to play/pause/stop a video on a certain render window with the use of an !...
QmitkVideoBackground * m_VideoBackground
void NewOpenCVFrameAvailable(const IplImage *)
mitk::OpenCVVideoSource * m_VideoSource
Ui::QmitkOpenCVVideoControls * m_Controls
IGT Exceptions.