Subversion Repositories seema-scanner

Rev

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

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