Subversion Repositories seema-scanner

Rev

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

Rev 73 Rev 75
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 onNewPointCloud(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
private:
80
private:
81
        Ui::SMScanner *ui;
81
        Ui::SMScanner *ui;
82
 
82
 
83
        QSettings settings;
83
        QSettings settings;
84
 
84
 
85
        SMPreferenceDialog preferenceDialog;
85
        SMPreferenceDialog preferenceDialog;
86
 
86
 
87
        SMCaptureWorker *captureWorker;
87
        SMCaptureWorker *captureWorker;
88
        QThread *captureWorkerThread;
88
        QThread *captureWorkerThread;
89
 
89
 
90
        SMCalibrationWorker *calibrationWorker;
90
        SMCalibrationWorker *calibrationWorker;
91
        QThread *calibrationWorkerThread;
91
        QThread *calibrationWorkerThread;
92
 
92
 
93
        SMReconstructionWorker *reconstructionWorker;
93
        SMReconstructionWorker *reconstructionWorker;
94
        QThread *reconstructionWorkerThread;
94
        QThread *reconstructionWorkerThread;
95
 
95
 
96
        std::vector< SMCalibrationSet > calibrationData;
96
        std::vector< SMCalibrationSet > calibrationData;
97
        std::vector< SMFrameSequence > captureData;
97
        std::vector< SMFrameSequence > captureData;
98
        std::vector< SMPointCloud > pointCloudData;
98
        std::vector< SMPointCloud > pointCloudData;
99
 
99
 
100
        int lastCaptureId;
-
 
101
 
-
 
102
        bool calibrationReviewMode;
100
        bool calibrationReviewMode;
103
        bool captureReviewMode;
101
        bool captureReviewMode;
-
 
102
        int lastCaptureId;
104
};
103
};
105
 
104
 
106
#endif // SMSCANNER_H
105
#endif // SMSCANNER_H
107
 
106