1#ifndef VIDEOPLAYERCONTROLLER_H
2#define VIDEOPLAYERCONTROLLER_H
8#include "plugin/algorithmmanager.h"
10#include "DataManager.h"
12#include "view/videoplayer.h"
13#include "view/timeline.h"
15#include "controller/ModelInputIterator.h"
16#include "controller/algorithmcontroller.h"
18#include "controller/imageiterator.h"
19#include "controller/modelinputiteratorfactory.h"
20#include "view/reallydeletedialog.h"
22#include "cvmat_qmetadata.h"
24#define ERROR_MSG_APPROX_COUNT 5
25#define BOUDNARY_STATIONARY_DURATION 1000
237 void slot_timerNextImage();
238 void slot_boundaryStopped();
244 QTimer *m_frametimer;
245 QTimer *m_boundaryMoveTimer;
246 unsigned int m_imageIndex;
247 unsigned int m_imageIndexOnScreen;
248 unsigned int m_stepsize;
249 bool m_keyframesOnly;
255 const int m_frametime = 33;
257 std::set<int> m_foundCorruptedFrames = {};
The AlgorithmController class is responsible for controlling the user input regarding algorithm selec...
Definition algorithmcontroller.h:40
The DataManager class is a Facade for the data holding classes in the model. It delegates most of it'...
Definition DataManager.h:29
The ROI class manages a region of interest represented as a rectangle in the [0,1]x[0,...
Definition roi.h:21
The Resolution class encapsulates an image resolution (width and height). It provides functionality f...
Definition resolution.h:17
The Timeline class is the class wich coordinates and manages all timeline events and elements.
Definition timeline.h:30
The VideoPlayerController class manages visualization of image data and manual changes to keyframes.
Definition videoplayercontroller.h:43
void slot_imageProcessed(cv::Mat *preview, int id)
[slot] slot_imageProcessed(...) is invoked when image has been processed and provides additional imag...
Definition videoplayercontroller.cpp:299
void slot_updateBoundaries(QPoint boundaries)
[slot] slot_updateBoundaries() updates the mip so that the boundaries are up to date
Definition videoplayercontroller.cpp:267
void slot_mipChanged()
[slot] slot_mipChanged() is called when image data changed. VideoPlayer and Timeline are updated.
Definition videoplayercontroller.cpp:217
~VideoPlayerController()
disconnects signals, deletes timer and VideoPlayerController instance.
Definition videoplayercontroller.cpp:76
void sig_deleteAllKeyframes()
[signal] sig_deleteAllKeyframes is emitted when frames are reseted to be keyframes
void slot_play()
[slot] slot_play() toggles automatic iteration over image sequence.
Definition videoplayercontroller.cpp:108
void sig_deleteKeyframes()
[signal] sig_deleteKeyframes is emitted when all keyframes are deleted
void sig_read(uint idx)
[signal] sig_read sends an image request to the worker thread to read the image.
void slot_selectedITransformChanged(uint id)
[slot] slot_selectedITransformChanged connects new plugin to videoplayer
Definition videoplayercontroller.cpp:367
void sig_imageToProcess(cv::Mat *image, int id)
[signal] sig_imageToProcess(...) is emitted when VideoPlayer is about to display a new image.
void slot_displayImage(uint idx, const cv::Mat &img)
[slot] slot_displayImage diplays img if transformation is enabled
Definition videoplayercontroller.cpp:355
void sig_hasStatusMessage(QString message)
[signal] sig_hasStatusMessage(...) is emitted when VideoPlayerController has a status message to disp...
void slot_showLastImage()
[slot] slot_showLastImage() displays last image.
Definition videoplayercontroller.cpp:126
void slot_deleteAllKeyframes()
[slot] slot_deleteAllKeyframes() deletes all keyframes.
Definition videoplayercontroller.cpp:238
void sig_toggleKeyframe(uint idx, bool isNowKeyframe)
[signal] sig_toggleKeyframe notifies about a manual keyframe change by clicking Add keyframe/Remove k...
void slot_stopPlay()
[slot] slot_stopPlay() stops running videoPlayer.
Definition videoplayercontroller.cpp:261
void slot_redraw()
[slot] slot_redraw() draws selected image again.
Definition videoplayercontroller.cpp:309
void slot_changeIndex(unsigned int index)
[slot] slot_changeIndex(...) displays the image from DataManager referenced by given index.
Definition videoplayercontroller.cpp:210
void slot_deleteKeyframes()
[slot] slot_deleteKeyframes() deletes all selected keyframes.
Definition videoplayercontroller.cpp:226
void slot_showNextImage()
[slot] slot_showNextImage() displays image going one or more steps forward from current image.
Definition videoplayercontroller.cpp:142
void slot_transformEnabledChanged(bool enabled)
slot_transformEnabledChanged reads data with new changed enabled parameter
Definition videoplayercontroller.cpp:381
void slot_resetBoundaries()
[slot] slot_resetBoundaries() updates the mip so that the boundaries are back to default
Definition videoplayercontroller.cpp:294
void sig_sendToITransform(uint idx, const cv::Mat &img, const Resolution &resolution, const ROI &roi)
[signal] sig_sendToITransform sends the image for processing to the connected ITransforms.
void slot_changeStepSize(unsigned int stepsize)
[slot] slot_changeStepSize(...) changes stepsize for iterating the images.
Definition videoplayercontroller.cpp:205
void slot_receiveImage(uint idx, const cv::Mat &img)
[slot] slot_receiveImage draws given image with and applies a transformable plugin if neccessary
Definition videoplayercontroller.cpp:314
void slot_toggleKeyframesOnly(bool checked)
[slot] slot_toggleKeyframesOnly(...) switches between displaying all images or keyframes only.
Definition videoplayercontroller.cpp:176
unsigned int getImageIndexOnScreen()
getImageIndexOnScreen getter for m_imageIndexOnScreen (only used in tests for now)
Definition videoplayercontroller.cpp:103
void slot_showFirstImage()
[slot] slot_showFirstImage() displays first image.
Definition videoplayercontroller.cpp:118
void slot_showPreviousImage()
[slot] slot_showPreviousImage() displays image going one or more steps backward from current image.
Definition videoplayercontroller.cpp:134
void slot_toggleKeyframe()
[slot] slot_toggleKeyframe() toggles keyframe-state for currently displayed image.
Definition videoplayercontroller.cpp:150
The VideoPlayer class provides a view to display images and holds buttons to interact with image sequ...
Definition videoplayer.h:49