Subversion Repositories seema-scanner

Rev

Rev 30 | Rev 41 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30 Rev 36
1
#ifndef SMSCANNER_H
1
#ifndef SMSCANNER_H
2
#define SMSCANNER_H
2
#define SMSCANNER_H
3
 
3
 
4
#include <QMainWindow>
4
#include <QMainWindow>
5
#include <QSettings>
5
#include <QSettings>
6
#include <QThread>
6
#include <QThread>
7
#include <QCloseEvent>
7
#include <QCloseEvent>
8
#include <QModelIndex>
8
#include <QModelIndex>
9
 
9
 
10
#include "SMPreferenceDialog.h"
10
#include "SMPreferenceDialog.h"
11
#include "SMCaptureWorker.h"
11
#include "SMCaptureWorker.h"
12
#include "SMCalibrationWorker.h"
12
#include "SMCalibrationWorker.h"
13
#include "SMReconstructionWorker.h"
13
#include "SMReconstructionWorker.h"
14
 
14
 
15
#include <opencv2/opencv.hpp>
15
#include <opencv2/opencv.hpp>
16
#include <pcl/point_cloud.h>
16
#include <pcl/point_cloud.h>
17
#include <pcl/point_types.h>
17
#include <pcl/point_types.h>
18
 
18
 
19
 
19
 
20
namespace Ui {
20
namespace Ui {
21
    class SMScanner;
21
    class SMScanner;
22
}
22
}
23
 
23
 
24
class SMScanner : public QMainWindow{
24
class SMScanner : public QMainWindow{
25
    Q_OBJECT
25
    Q_OBJECT
26
 
26
 
27
    public:
27
    public:
28
        explicit SMScanner(QWidget *parent = 0);
28
        explicit SMScanner(QWidget *parent = 0);
29
        void closeEvent(QCloseEvent *event);
29
        void closeEvent(QCloseEvent *event);
30
        ~SMScanner();
30
        ~SMScanner();
31
 
31
 
32
    private slots:
32
    private slots:
33
        void on_actionPreferences_triggered();
33
        void on_actionPreferences_triggered();
34
 
34
 
35
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
35
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
36
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
36
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
37
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
37
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
38
        void onReceiveRotatedTo(float angle);
38
        void onReceiveRotatedTo(float angle);
39
 
39
 
40
        void onCalibrationSetProcessed(int idx);
40
        void onCalibrationSetProcessed(int idx);
41
        void onCalibrationFrameResult(int idx, int camID, bool success, cv::Mat result);
41
        void onCalibrationFrameResult(int idx, int camID, bool success, cv::Mat result);
42
 
42
 
43
        void on_singleCalibrationButton_clicked();
43
        void on_singleCalibrationButton_clicked();
44
 
44
 
45
        void on_calibrateButton_clicked();
45
        void on_calibrateButton_clicked();
46
 
46
 
47
        void onCalibrationDone();
47
        void onCalibrationDone();
48
        void on_calibrationListWidget_itemSelectionChanged();
48
        void on_calibrationListWidget_itemSelectionChanged();
49
 
49
 
50
        void on_singleCaptureButton_clicked();
50
        void on_singleCaptureButton_clicked();
51
 
51
 
52
 
52
 
53
        void on_calibrationRotationDial_sliderReleased();
53
        void on_calibrationRotationDial_sliderReleased();
54
 
54
 
55
        void on_captureRotationDial_sliderReleased();
55
        void on_captureRotationDial_sliderReleased();
56
 
56
 
57
        void on_captureTreeWidget_itemSelectionChanged();
57
        void on_captureTreeWidget_itemSelectionChanged();
58
 
58
 
59
        void on_batchCalibrationButton_clicked();
59
        void on_batchCalibrationButton_clicked();
60
 
60
 
61
        void on_batchCaptureButton_clicked();
61
        void on_batchCaptureButton_clicked();
62
 
62
 
-
 
63
        void on_actionExport_Sets_triggered();
-
 
64
 
-
 
65
        void on_actionExport_Sequences_triggered();
-
 
66
 
63
private:
67
private:
64
        Ui::SMScanner *ui;
68
        Ui::SMScanner *ui;
65
 
69
 
66
        QSettings settings;
70
        QSettings settings;
67
 
71
 
68
        SMPreferenceDialog preferenceDialog;
72
        SMPreferenceDialog preferenceDialog;
69
 
73
 
70
        SMCaptureWorker *captureWorker;
74
        SMCaptureWorker *captureWorker;
71
        QThread *captureWorkerThread;
75
        QThread *captureWorkerThread;
72
 
76
 
73
        SMCalibrationWorker *calibrationWorker;
77
        SMCalibrationWorker *calibrationWorker;
74
        QThread *calibrationWorkerThread;
78
        QThread *calibrationWorkerThread;
75
 
79
 
76
        SMReconstructionWorker *reconstructionWorker;
80
        SMReconstructionWorker *reconstructionWorker;
77
        QThread *reconstructionWorkerThread;
81
        QThread *reconstructionWorkerThread;
78
 
82
 
79
        std::vector< SMCalibrationSet > calibrationData;
83
        std::vector< SMCalibrationSet > calibrationData;
80
        std::vector< SMFrameSequence > captureData;
84
        std::vector< SMFrameSequence > captureData;
81
        std::vector< pcl::PointCloud<pcl::PointXYZRGB>::Ptr > pointClouds;
85
        std::vector< pcl::PointCloud<pcl::PointXYZRGB>::Ptr > pointClouds;
82
 
86
 
83
        bool calibrationReviewMode;
87
        bool calibrationReviewMode;
84
        bool captureReviewMode;
88
        bool captureReviewMode;
85
};
89
};
86
 
90
 
87
#endif // SMSCANNER_H
91
#endif // SMSCANNER_H
88
 
92