Subversion Repositories seema-scanner

Rev

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

Rev 67 Rev 73
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
 
36
 
36
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
37
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
37
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
38
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
38
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
39
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
39
        void onReceiveRotatedTo(float angle);
40
        void onReceiveRotatedTo(float angle);
40
 
41
 
41
        void onCalibrationSetProcessed(int idx);
42
        void onCalibrationSetProcessed(int idx);
42
        void onCalibrationFrameResult(int idx, int camID, bool success, cv::Mat result);
43
        void onCalibrationFrameResult(int idx, int camID, bool success, cv::Mat result);
43
 
44
 
44
        void on_singleCalibrationButton_clicked();
45
        void on_singleCalibrationButton_clicked();
45
 
46
 
46
        void on_calibrateButton_clicked();
47
        void on_calibrateButton_clicked();
47
 
48
 
48
        void onCalibrationDone();
49
        void onCalibrationDone();
49
        void on_calibrationListWidget_itemSelectionChanged();
50
        void on_calibrationListWidget_itemSelectionChanged();
50
 
51
 
51
        void on_singleCaptureButton_clicked();
52
        void on_singleCaptureButton_clicked();
52
 
53
 
53
 
54
 
54
        void on_calibrationRotationDial_sliderReleased();
55
        void on_calibrationRotationDial_sliderReleased();
55
 
56
 
56
        void on_captureRotationDial_sliderReleased();
57
        void on_captureRotationDial_sliderReleased();
57
 
58
 
58
        void on_captureTreeWidget_itemSelectionChanged();
59
        void on_captureTreeWidget_itemSelectionChanged();
59
 
60
 
60
        void on_batchCalibrationButton_clicked();
61
        void on_batchCalibrationButton_clicked();
61
 
62
 
62
        void on_batchCaptureButton_clicked();
63
        void on_batchCaptureButton_clicked();
63
 
64
 
64
        void on_actionExport_Sets_triggered();
65
        void on_actionExport_Sets_triggered();
65
 
66
 
66
        void on_actionExport_Sequences_triggered();
67
        void on_actionExport_Sequences_triggered();
67
 
68
 
68
        void on_reconstructButton_clicked();
69
        void on_reconstructButton_clicked();
69
        void onNewPointCloud(SMPointCloud pc);
70
        void onNewPointCloud(SMPointCloud pc);
70
 
71
 
71
        void on_actionExport_Point_Clouds_triggered();
72
        void on_actionExport_Point_Clouds_triggered();
72
 
73
 
73
        void on_pointCloudsListWidget_itemChanged(QListWidgetItem *item);
74
        void on_pointCloudsListWidget_itemChanged(QListWidgetItem *item);
74
 
75
 
75
        void on_actionExport_Parameters_triggered();
76
        void on_actionExport_Parameters_triggered();
76
 
77
 
77
        void on_actionClear_Sequences_triggered();
78
        void on_actionClear_Sequences_triggered();
78
 
79
 
79
private:
80
private:
80
        Ui::SMScanner *ui;
81
        Ui::SMScanner *ui;
81
 
82
 
82
        QSettings settings;
83
        QSettings settings;
83
 
84
 
84
        SMPreferenceDialog preferenceDialog;
85
        SMPreferenceDialog preferenceDialog;
85
 
86
 
86
        SMCaptureWorker *captureWorker;
87
        SMCaptureWorker *captureWorker;
87
        QThread *captureWorkerThread;
88
        QThread *captureWorkerThread;
88
 
89
 
89
        SMCalibrationWorker *calibrationWorker;
90
        SMCalibrationWorker *calibrationWorker;
90
        QThread *calibrationWorkerThread;
91
        QThread *calibrationWorkerThread;
91
 
92
 
92
        SMReconstructionWorker *reconstructionWorker;
93
        SMReconstructionWorker *reconstructionWorker;
93
        QThread *reconstructionWorkerThread;
94
        QThread *reconstructionWorkerThread;
94
 
95
 
95
        std::vector< SMCalibrationSet > calibrationData;
96
        std::vector< SMCalibrationSet > calibrationData;
96
        std::vector< SMFrameSequence > captureData;
97
        std::vector< SMFrameSequence > captureData;
97
        std::vector< SMPointCloud > pointCloudData;
98
        std::vector< SMPointCloud > pointCloudData;
98
 
99
 
99
        int lastCaptureId;
100
        int lastCaptureId;
100
 
101
 
101
        bool calibrationReviewMode;
102
        bool calibrationReviewMode;
102
        bool captureReviewMode;
103
        bool captureReviewMode;
103
};
104
};
104
 
105
 
105
#endif // SMSCANNER_H
106
#endif // SMSCANNER_H
106
 
107