Subversion Repositories seema-scanner

Rev

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

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