The VideoPlayerController class manages visualization of image data and manual changes to keyframes.
More...
#include <videoplayercontroller.h>
|
| void | sig_hasStatusMessage (QString message) |
| | [signal] sig_hasStatusMessage(...) is emitted when VideoPlayerController has a status message to display to the user.
|
| |
| void | sig_imageToProcess (cv::Mat *image, int id) |
| | [signal] sig_imageToProcess(...) is emitted when VideoPlayer is about to display a new image.
|
| |
| void | sig_read (uint idx) |
| | [signal] sig_read sends an image request to the worker thread to read the image.
|
| |
| 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 | sig_toggleKeyframe (uint idx, bool isNowKeyframe) |
| | [signal] sig_toggleKeyframe notifies about a manual keyframe change by clicking Add keyframe/Remove keyframe
|
| |
|
void | sig_deleteKeyframes () |
| | [signal] sig_deleteKeyframes is emitted when all keyframes are deleted
|
| |
|
void | sig_deleteAllKeyframes () |
| | [signal] sig_deleteAllKeyframes is emitted when frames are reseted to be keyframes
|
| |
The VideoPlayerController class manages visualization of image data and manual changes to keyframes.
The image data is provided by the DataManager *dataManager. For visualization a VideoPlayer *player and a Timeline *timeline are used. The user can select images and modify keyframes using Timeline and VideoPlayer functions which delegate the command to this VideoPlayerController using signals. This VideoPlayerController is tasked with updating the data provided by dataManager as well as refreshing the view-elements (Timeline and VideoPlayer) periodically and after changes to the image data.
- Author
- Dominik Wüst
- Date
- 2021/02/10
◆ VideoPlayerController()
Creates a VideoPlayerController instance. Connects to the signals from VideoPlayer and Timeline and initializes both with image data from DataManager. Initializes a timer to interrupt periodically.
- Parameters
-
| parent | a QWidget as parent in the Qt object hierarchy |
| player | a VideoPlayer instance to display images |
| timeline | a Timeline instance to visualize keyframe distribution |
| dataManager | a DataManager Instance to access image data |
| algoController | an AlgorithmController instance to transform images and preview them |
◆ getImageIndexOnScreen()
| unsigned int VideoPlayerController::getImageIndexOnScreen |
( |
| ) |
|
getImageIndexOnScreen getter for m_imageIndexOnScreen (only used in tests for now)
- Returns
- index of image currently displayed
◆ sig_hasStatusMessage
| void VideoPlayerController::sig_hasStatusMessage |
( |
QString |
message | ) |
|
|
signal |
[signal] sig_hasStatusMessage(...) is emitted when VideoPlayerController has a status message to display to the user.
- Parameters
-
| message | the QString to display. |
◆ sig_imageToProcess
| void VideoPlayerController::sig_imageToProcess |
( |
cv::Mat * |
image, |
|
|
int |
id |
|
) |
| |
|
signal |
[signal] sig_imageToProcess(...) is emitted when VideoPlayer is about to display a new image.
- Parameters
-
| image | the image thats getting displayed |
| id | Identifier for the result |
◆ sig_read
| void VideoPlayerController::sig_read |
( |
uint |
idx | ) |
|
|
signal |
[signal] sig_read sends an image request to the worker thread to read the image.
- Parameters
-
◆ sig_sendToITransform
| void VideoPlayerController::sig_sendToITransform |
( |
uint |
idx, |
|
|
const cv::Mat & |
img, |
|
|
const Resolution & |
resolution, |
|
|
const ROI & |
roi |
|
) |
| |
|
signal |
[signal] sig_sendToITransform sends the image for processing to the connected ITransforms.
- Parameters
-
| idx | The image index |
| img | The image to process |
◆ sig_toggleKeyframe
| void VideoPlayerController::sig_toggleKeyframe |
( |
uint |
idx, |
|
|
bool |
isNowKeyframe |
|
) |
| |
|
signal |
[signal] sig_toggleKeyframe notifies about a manual keyframe change by clicking Add keyframe/Remove keyframe
- Parameters
-
| idx | Index of the changed frame |
| isNowKeyframe | true if the frame wasn't a keyframe and became one by the user, false otherwise |
◆ slot_changeIndex
| void VideoPlayerController::slot_changeIndex |
( |
unsigned int |
index | ) |
|
|
slot |
[slot] slot_changeIndex(...) displays the image from DataManager referenced by given index.
- Parameters
-
◆ slot_changeStepSize
| void VideoPlayerController::slot_changeStepSize |
( |
unsigned int |
stepsize | ) |
|
|
slot |
[slot] slot_changeStepSize(...) changes stepsize for iterating the images.
- Parameters
-
◆ slot_displayImage
| void VideoPlayerController::slot_displayImage |
( |
uint |
idx, |
|
|
const cv::Mat & |
img |
|
) |
| |
|
slot |
[slot] slot_displayImage diplays img if transformation is enabled
- Parameters
-
| idx | index if image |
| img | image |
◆ slot_imageProcessed
| void VideoPlayerController::slot_imageProcessed |
( |
cv::Mat * |
preview, |
|
|
int |
id |
|
) |
| |
|
slot |
[slot] slot_imageProcessed(...) is invoked when image has been processed and provides additional images.
- Parameters
-
| procesedImgs | The results of image processing |
| id | Identifier for the result |
◆ slot_receiveImage
| void VideoPlayerController::slot_receiveImage |
( |
uint |
idx, |
|
|
const cv::Mat & |
img |
|
) |
| |
|
slot |
[slot] slot_receiveImage draws given image with and applies a transformable plugin if neccessary
- Parameters
-
| idx | transformable plugin index |
| img | image which should be displayed or transformed |
◆ slot_selectedITransformChanged
| void VideoPlayerController::slot_selectedITransformChanged |
( |
uint |
id | ) |
|
|
slot |
[slot] slot_selectedITransformChanged connects new plugin to videoplayer
- Parameters
-
◆ slot_showNextImage
| void VideoPlayerController::slot_showNextImage |
( |
| ) |
|
|
slot |
◆ slot_showPreviousImage
| void VideoPlayerController::slot_showPreviousImage |
( |
| ) |
|
|
slot |
◆ slot_toggleKeyframesOnly
| void VideoPlayerController::slot_toggleKeyframesOnly |
( |
bool |
checked | ) |
|
|
slot |
[slot] slot_toggleKeyframesOnly(...) switches between displaying all images or keyframes only.
- Parameters
-
| checked | display all images if false, keyframes only if true |
◆ slot_transformEnabledChanged
| void VideoPlayerController::slot_transformEnabledChanged |
( |
bool |
enabled | ) |
|
|
slot |
slot_transformEnabledChanged reads data with new changed enabled parameter
- Parameters
-
| enabled | new enabled parameter |
The documentation for this class was generated from the following files: