Subversion Repositories seema-scanner

Rev

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

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