Subversion Repositories seema-scanner

Rev

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

Rev 139 Rev 148
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
#include <QListWidgetItem>
9
#include <QListWidgetItem>
10
 
10
 
11
#include "SMPreferenceDialog.h"
11
#include "SMPreferenceDialog.h"
12
#include "SMCaptureWorker.h"
12
#include "SMCaptureWorker.h"
13
#include "SMCalibrationWorker.h"
13
#include "SMCalibrationWorker.h"
14
#include "SMReconstructionWorker.h"
14
#include "SMReconstructionWorker.h"
15
 
15
 
16
#include <opencv2/opencv.hpp>
16
#include <opencv2/opencv.hpp>
17
#include <pcl/point_cloud.h>
17
#include <pcl/point_cloud.h>
18
#include <pcl/point_types.h>
18
#include <pcl/point_types.h>
19
 
19
 
20
 
20
 
21
namespace Ui {
21
namespace Ui {
22
    class SMScanner;
22
    class SMScanner;
23
}
23
}
24
 
24
 
25
class SMScanner : public QMainWindow{
25
class SMScanner : public QMainWindow{
26
    Q_OBJECT
26
    Q_OBJECT
27
 
27
 
28
    public:
28
    public:
29
        explicit SMScanner(QWidget *parent = 0);
29
        explicit SMScanner(QWidget *parent = 0);
30
        void closeEvent(QCloseEvent *event);
30
        void closeEvent(QCloseEvent *event);
31
        ~SMScanner();
31
        ~SMScanner();
32
 
32
 
33
    private slots:
33
    private slots:
34
        void on_actionPreferences_triggered();
34
        void on_actionPreferences_triggered();
35
        void onPreferencesChanged();
35
        void onPreferencesChanged();
36
 
36
 
37
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
37
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
38
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
38
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
39
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
39
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
40
        void onReceiveRotatedTo(float angle);
40
        void onReceiveRotatedTo(float angle);
41
 
41
 
42
        void onCalibrationSetProcessed(int idx);
42
        void onCalibrationSetProcessed(int idx);
43
        void onCalibrationFrameResult(int idx, int camID, bool success, cv::Mat result);
43
        void onCalibrationFrameResult(int idx, int camID, bool success, cv::Mat result);
44
 
44
 
45
        void on_singleCalibrationButton_clicked();
45
        void on_singleCalibrationButton_clicked();
46
 
46
 
47
        void on_calibrateButton_clicked();
47
        void on_calibrateButton_clicked();
48
 
48
 
49
        void onCalibrationDone();
49
        void onCalibrationDone();
50
        void on_calibrationListWidget_itemSelectionChanged();
50
        void on_calibrationListWidget_itemSelectionChanged();
51
 
51
 
52
        void on_singleCaptureButton_clicked();
52
        void on_singleCaptureButton_clicked();
53
 
53
 
54
 
54
 
55
        void on_calibrationRotationDial_sliderReleased();
55
        void on_calibrationRotationDial_sliderReleased();
56
 
56
 
57
        void on_captureRotationDial_sliderReleased();
57
        void on_captureRotationDial_sliderReleased();
58
 
58
 
59
        void on_captureTreeWidget_itemSelectionChanged();
59
        void on_captureTreeWidget_itemSelectionChanged();
60
 
60
 
61
        void on_batchCalibrationButton_clicked();
61
        void on_batchCalibrationButton_clicked();
62
 
62
 
63
        void on_batchCaptureButton_clicked();
63
        void on_batchCaptureButton_clicked();
64
 
64
 
65
        void on_actionExport_Sets_triggered();
65
        void on_actionExport_Sets_triggered();
66
 
66
 
67
        void on_actionExport_Sequences_triggered();
67
        void on_actionExport_Sequences_triggered();
68
 
68
 
69
        void on_reconstructButton_clicked();
69
        void on_reconstructButton_clicked();
70
        void onNewPointCloud(SMPointCloud pc);
70
        void onReceivePointCloud(SMPointCloud pc);
71
 
71
 
72
        void on_actionExport_Point_Clouds_triggered();
72
        void on_actionExport_Point_Clouds_triggered();
73
 
73
 
74
        void on_pointCloudsListWidget_itemChanged(QListWidgetItem *item);
74
        void on_pointCloudsListWidget_itemChanged(QListWidgetItem *item);
75
 
75
 
76
        void on_actionExport_Parameters_triggered();
76
        void on_actionExport_Parameters_triggered();
77
 
77
 
78
        void on_actionClear_Sequences_triggered();
78
        void on_actionClear_Sequences_triggered();
79
 
79
 
80
        void on_actionExport_White_Frames_triggered();
80
        void on_actionExport_White_Frames_triggered();
81
 
81
 
82
        void on_actionImport_Parameters_triggered();
82
        void on_actionImport_Parameters_triggered();
83
 
83
 
84
        void on_actionImport_Sets_triggered();
84
        void on_actionImport_Sets_triggered();
85
 
85
 
86
        void on_actionImport_Sequences_triggered();
86
        void on_actionImport_Sequences_triggered();
87
 
87
 
88
        void on_actionClear_Point_Clouds_triggered();
88
        void on_actionClear_Point_Clouds_triggered();
89
 
89
 
90
private:
90
private:
91
        Ui::SMScanner *ui;
91
        Ui::SMScanner *ui;
92
 
92
 
93
        QSettings settings;
93
        QSettings settings;
94
 
94
 
95
        SMPreferenceDialog preferenceDialog;
95
        SMPreferenceDialog preferenceDialog;
96
 
96
 
97
        SMCaptureWorker *captureWorker;
97
        SMCaptureWorker *captureWorker;
98
        QThread *captureWorkerThread;
98
        QThread *captureWorkerThread;
99
 
99
 
100
        SMCalibrationWorker *calibrationWorker;
100
        SMCalibrationWorker *calibrationWorker;
101
        QThread *calibrationWorkerThread;
101
        QThread *calibrationWorkerThread;
102
 
102
 
103
        SMReconstructionWorker *reconstructionWorker;
103
        SMReconstructionWorker *reconstructionWorker;
104
        QThread *reconstructionWorkerThread;
104
        QThread *reconstructionWorkerThread;
105
 
105
 
106
        std::vector< SMCalibrationSet > calibrationData;
106
        std::vector< SMCalibrationSet > calibrationData;
107
        std::vector< SMFrameSequence > captureData;
107
        std::vector< SMFrameSequence > captureData;
108
        std::vector< SMPointCloud > pointCloudData;
108
        std::vector< SMPointCloud > pointCloudData;
109
 
109
 
110
        bool calibrationReviewMode;
110
        bool calibrationReviewMode;
111
        bool captureReviewMode;
111
        bool captureReviewMode;
112
        int lastCaptureId;
112
        int lastCaptureId;
113
};
113
};
114
 
114
 
115
#endif // SMSCANNER_H
115
#endif // SMSCANNER_H
116
 
116