v2.0.0
Loading...
Searching...
No Matches
layoutmaker.h
Go to the documentation of this file.
1//=============================================================================================================
31
32#ifndef LAYOUTMAKER_H
33#define LAYOUTMAKER_H
34
35//=============================================================================================================
36// INCLUDES
37//=============================================================================================================
38
39#include "utils_global.h"
40
41#include <vector>
42#include <string>
43#include <fstream>
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QVector>
50#include <QList>
51#include <QStringList>
52#include <QFile>
53
54//=============================================================================================================
55// EIGEN INCLUDES
56//=============================================================================================================
57
58#include <Eigen/Core>
59
60//=============================================================================================================
61// DEFINE NAMESPACE MNELIB
62//=============================================================================================================
63
64namespace UTILSLIB
65{
66
67//=============================================================================================================
68// TYPEDEFS
69//=============================================================================================================
70
72struct fitUserRec {
73 Eigen::MatrixXf rr;
74 int np;
75 int report;
76};
78
79//=============================================================================================================
86{
87public:
88
89 //=========================================================================================================
106 static bool makeLayout(const QList<QVector<float> > &inputPoints,
107 QList<QVector<float> > &outputPoints,
108 const QStringList &names,
109 QFile &outFile,
110 bool do_fit,
111 float prad,
112 float w,
113 float h,
114 bool writeFile = false,
115 bool mirrorXAxis = false,
116 bool mirrorYAxis = false);
117
118 //=========================================================================================================
135 static bool makeLayout(const std::vector<std::vector<float> > &inputPoints,
136 std::vector<std::vector<float> > &outputPoints,
137 const std::vector<std::string> &names,
138 const std::string& outFilePath,
139 bool do_fit,
140 float prad,
141 float w,
142 float h,
143 bool writeFile = false,
144 bool mirrorXAxis = false,
145 bool mirrorYAxis = false);
146
147private:
148 static void sphere_coord(float x,
149 float y,
150 float z,
151 float *r,
152 float *theta,
153 float *phi);
154};
155} //NAMESPACE
156
157#endif // LAYOUTMAKER_H
Public umbrella header for UTILSLIB exposing the UTILSSHARED_EXPORT macro and build-info accessors.
#define UTILSSHARED_EXPORT
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
fitUserRec * fitUser
Definition layoutmaker.h:77
Workspace for sphere-fitting used by the layout maker, holding 3-D point coordinates and fit paramete...
Definition layoutmaker.h:72
Eigen::MatrixXf rr
Definition layoutmaker.h:73
Make layout files from given 3D points.
Definition layoutmaker.h:86
static bool makeLayout(const QList< QVector< float > > &inputPoints, QList< QVector< float > > &outputPoints, const QStringList &names, QFile &outFile, bool do_fit, float prad, float w, float h, bool writeFile=false, bool mirrorXAxis=false, bool mirrorYAxis=false)