Subversion Repositories seema-scanner

Rev

Rev 199 | Rev 217 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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