This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
mainwindow.h
129 lines (106 loc) · 4.31 KB
/
mainwindow.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QMenuBar>
#include <QMenu>
#include <QMessageBox>
#include <QtWidgets>
#include <QDialog>
#include <QProgressBar>
#include <iostream>
#include <fstream>
#include <string>
#include "Eigen/Dense"
#include "Eigen/Geometry"
#include "Properties/ReaderProperties.h"
#include "configuration.h"
#include "Point3D.h"
#include "Statistics/Statistics.h"
#include "datadialogshowestimated.h"
#include "dialogscalatraslarota.h"
#include "winslam.h"
#include "dialogshowestimated.h"
#include "datadialogparameters.h"
#include "dialogparameters.h"
#include "dialogmessage.h"
#include "transformation/Transformador.h"
#include "Registrador/Registrador.h"
#include "GeneratorPCA/GeneratorPCA.h"
#include "ModuloEscala/FindScala.h"
class QAction;
class QLabel;
class QMenu;
class GLWidget;
class QDialog;
class QProgressBar;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void loadFile(const QString &fileName, Eigen::MatrixXd &dataset, int dataSet_A_B);
void performModifySequence(double scalaX,double scalaY,double scalaZ, double traslaX,double traslaY, double traslaZ,double rotaX,double rotaY,double rotaZ, int gNoise, int cNoise, double timeOffset,int pcaIndex,double frequency, double gnoise_value);
void cleanDataSets(); // this method clean the datasets, datasetA,datasetB and datasetEstimated
QWidget *myWinSlam;
QLabel *statusLabel;
QProgressBar *statusProgressBar;
//DIALOG that shows parameters of transformation to be performed , scale, traslation , rotation, gaussian and cosmic noise
DialogScalaTraslaRota *dialogScalaTraslaRota;
DataDialogScalaTraslaRota* dataDialogScalaTraslaRota;
//DIALOG that shows parameters of ESTIMATED transformations, scale, traslation, rotation
DialogShowEstimated *dialogShowEstimated;
DataDialogShowEstimated *dataDialogShowEstimated;
//DIALOG that shows CONFIGURATION parameters
//DialogConfiguration *dialogConfiguration;
DataDialogParameters *dataDialogParameters;
DialogParameters *dialogParameters;
DialogMessage* dialogMessage;
//============================== Model Objects to estimate transformation
Transformador myTransformador; //Perform transformations (Scale,Rotation,Traslation,Gaussian and Cosmic Noise ) over dataset
Registrador myRegistrador; //Estimate Rotation and Traslation over a dataset
GeneratorPCA myGeneratorPCA;//Calculate PCA over a dataset
FindScala myFindScala; // to find the scala
Interpolator myInterpolator;// to interpolate
char * myInputFileName;
char * myOutputFileName;
//==============================
//============================== Matrix that will store the data model
Eigen::MatrixXd readingA;
Eigen::MatrixXd readingB;
Eigen::MatrixXd readingA_xyz;
Eigen::MatrixXd readingB_xyz;
Eigen::MatrixXd readingAquaternion;
Eigen::MatrixXd readingBquaternion;
Eigen::MatrixXd dataQuaternionEstimated;
Eigen::MatrixXd dataEstimated;
Eigen::MatrixXd rotationEstimated;
Eigen::MatrixXd traslationEstimated;
Eigen::VectorXd timeA; //[10000];
Eigen::VectorXd timeB; //[10000];
//===============================
double timeOffset;
double timeOffsetEstimated;
double frequency=-1;
int ftype=-1;
bool dataSetB_isLoaded_NotTransformed=false;//this variable indicate if dataset B is loaded from another file or if is the result of transforming dataSet A
private:
Ui::MainWindow *ui;
void onOpenFileA();
void onOpenFileB();
void onModifySequence();
void onEstimateSequence(int way,bool RANSAC); // way==0 means A to B . way==1 means B to A
void onEstimateSequenceAtoB();
void onEstimateSequenceBtoA();
void onEstimateSequenceAtoB_RANSAC();
void onEstimateSequenceBtoA_RANSAC();
void onExit();
void onSetDots();//Menu View:indicate that dataset will be displayed as 3d points
void onSetLines();//Menu View:indicate that dataset will be displayed as 3d lines
void onViewJustEstimated();//Menu View; indicate that only estimated dataset will be shown
void onModifyParameters();//Menu View: Shows several configuration parameters to be changed. Example:Max Number of Lines for dataset
};
#endif // MAINWINDOW_H