showinrawviewwidget.hpp 1.41 KB
Newer Older
1 2 3 4 5
#ifndef CVVISUAL_SHOW_IN_RAWVIEW
#define CVVISUAL_SHOW_IN_RAWVIEW

#include <QWidget>

Maksim Shabunin's avatar
Maksim Shabunin committed
6
#include "opencv2/features2d.hpp"
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63

#include "matchmanagement.hpp"
#include "keypointmanagement.hpp"
#include "rawview_window.hpp"

namespace  cvv {namespace qtutil{
/**
 * @brief this class shows a RawViewWindow when it will be shown and hides it when this will be hidden
 * and it connect the managemts (match/keypoint) with the RawViewWindow
 */
class ShowInRawView:public QWidget{

	Q_OBJECT

public:
	/**
	 * @brief the constructor
	 * @param left_key the left keypoints
	 * @param right_key th right keypoints
	 * @param matches the matches
	 * @param matchmnt the matchmanagement
	 * @param keymnt the keypointmanagement
	 * @param parent the parent Widget
	 */
	ShowInRawView(std::vector<cv::KeyPoint> left_key,
		      std::vector<cv::KeyPoint> right_key,
		      std::vector<cv::DMatch> matches,
		      MatchManagement* matchmnt,
		      KeyPointManagement* keymnt,
		      QWidget*parent=nullptr);

	/**
	 * @brief the cestructor deletes the RawViewWindow
	 */
	~ShowInRawView();

protected:
	virtual void hideEvent(QHideEvent * );

	virtual void showEvent(QShowEvent *);

private slots:

	void getcurrentSelection();

private:
	MatchManagement* matchmnt_;
	KeyPointManagement* keymnt_;
	RawviewWindow* rawViewWindow_;
	std::vector<cv::KeyPoint> left_key_;
	std::vector<cv::KeyPoint> right_key_;
	std::vector<cv::DMatch> matches_;
};

}}

#endif