Subversion Repositories seema-scanner

Rev

Rev 244 | 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>
255 - 10
#include <QTimer>
1 jakw 11
 
9 jakw 12
#include "SMPreferenceDialog.h"
225 jakw 13
#include "SMLogDialog.h"
255 - 14
#include "SMExportWorker.h"
4 jakw 15
#include "SMCaptureWorker.h"
27 jakw 16
#include "SMCalibrationWorker.h"
17
#include "SMReconstructionWorker.h"
217 jakw 18
//#include "SMMeshingWorker.h"
4 jakw 19
 
20
#include <opencv2/opencv.hpp>
21
#include <pcl/point_cloud.h>
22
#include <pcl/point_types.h>
23
 
23 jakw 24
 
1 jakw 25
namespace Ui {
23 jakw 26
    class SMScanner;
1 jakw 27
}
28
 
23 jakw 29
class SMScanner : public QMainWindow{
1 jakw 30
    Q_OBJECT
31
 
23 jakw 32
    public:
33
        explicit SMScanner(QWidget *parent = 0);
34
        void closeEvent(QCloseEvent *event);
35
        ~SMScanner();
1 jakw 36
 
255 - 37
    signals:
38
        void exportFrameSequence(QString, SMFrameSequence);
39
 
23 jakw 40
    private slots:
41
        void on_actionPreferences_triggered();
73 jakw 42
        void onPreferencesChanged();
4 jakw 43
 
23 jakw 44
        void onReceiveFrame(unsigned int camId, cv::Mat frame);
27 jakw 45
        void onReceiveCalibrationSet(SMCalibrationSet calibrationSet);
46
        void onReceiveFrameSequence(SMFrameSequence frameSequence);
30 jakw 47
        void onReceiveRotatedTo(float angle);
27 jakw 48
 
255 - 49
        void onReceiveCheckerboardResult(int, SMCalibrationSet calibrationSet);
27 jakw 50
 
23 jakw 51
        void on_singleCalibrationButton_clicked();
52
 
225 jakw 53
        void on_calibrateCamerasButton_clicked();
27 jakw 54
 
225 jakw 55
        void onReceiveCalibrationDone();
27 jakw 56
        void on_calibrationListWidget_itemSelectionChanged();
57
 
58
        void on_singleCaptureButton_clicked();
59
 
23 jakw 60
        void on_calibrationRotationDial_sliderReleased();
61
 
27 jakw 62
        void on_captureRotationDial_sliderReleased();
25 jakw 63
 
27 jakw 64
        void on_captureTreeWidget_itemSelectionChanged();
25 jakw 65
 
30 jakw 66
        void on_batchCalibrationButton_clicked();
67
 
68
        void on_batchCaptureButton_clicked();
69
 
36 jakw 70
        void on_actionExport_Sets_triggered();
71
 
72
        void on_actionExport_Sequences_triggered();
73
 
148 jakw 74
        void onReceivePointCloud(SMPointCloud pc);
41 jakw 75
 
255 - 76
        void onAbortedExport();
77
 
78
        void onExportProgress(int progress);
79
 
80
        void onFinishedExport(int id);
81
 
44 jakw 82
        void on_actionExport_Point_Clouds_triggered();
42 jakw 83
 
44 jakw 84
        void on_pointCloudsListWidget_itemChanged(QListWidgetItem *item);
85
 
86
        void on_actionExport_Parameters_triggered();
87
 
67 jakw 88
        void on_actionClear_Sequences_triggered();
89
 
117 jakw 90
        void on_actionExport_White_Frames_triggered();
91
 
135 jakw 92
        void on_actionImport_Parameters_triggered();
93
 
94
        void on_actionImport_Sets_triggered();
95
 
139 jakw 96
        void on_actionImport_Sequences_triggered();
97
 
98
        void on_actionClear_Point_Clouds_triggered();
99
 
159 jakw 100
        void on_calibrationRotationSpinBox_editingFinished();
101
 
102
        void on_captureRotationSpinBox_editingFinished();
103
 
199 jakw 104
        void on_actionProject_Focusing_Pattern_triggered();
105
 
225 jakw 106
        void on_calibrateRotationStageButton_clicked();
107
 
108
        void on_actionView_Log_Messages_triggered();
109
 
227 jakw 110
        void on_tabWidget_currentChanged(int index);
111
 
232 jakw 112
        void on_calibrationListWidget_currentRowChanged(int currentRow);
113
 
244 jakw 114
        void on_actionEdit_Configuration_File_triggered();
115
 
255 - 116
        void on_exportCheckBox_toggled(bool checked);
117
 
118
        void on_browseExportPushButton_clicked();
119
 
1 jakw 120
private:
23 jakw 121
        Ui::SMScanner *ui;
4 jakw 122
 
23 jakw 123
        QSettings settings;
4 jakw 124
 
23 jakw 125
        SMPreferenceDialog preferenceDialog;
225 jakw 126
        SMLogDialog logDialog;
4 jakw 127
 
255 - 128
        SMExportWorker *exportWorker;
129
        QThread *exportWorkerThread;
130
        QTimer* exportTimer;
131
 
23 jakw 132
        SMCaptureWorker *captureWorker;
133
        QThread *captureWorkerThread;
4 jakw 134
 
27 jakw 135
        SMCalibrationWorker *calibrationWorker;
136
        QThread *calibrationWorkerThread;
4 jakw 137
 
27 jakw 138
        SMReconstructionWorker *reconstructionWorker;
139
        QThread *reconstructionWorkerThread;
140
 
225 jakw 141
        std::vector< SMCalibrationSet > calibrationData;
208 flgw 142
 
27 jakw 143
        std::vector< SMFrameSequence > captureData;
41 jakw 144
        std::vector< SMPointCloud > pointCloudData;
25 jakw 145
 
146
        bool calibrationReviewMode;
27 jakw 147
        bool captureReviewMode;
75 jakw 148
        int lastCaptureId;
225 jakw 149
 
1 jakw 150
};
151
 
152
#endif // SMSCANNER_H