Subversion Repositories seema-scanner

Rev

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