@@ -33,6 +33,23 @@ using namespace Eigen;
33
33
// / That NormalsWorker fills a vector with the colors of the normals in that line.
34
34
// /
35
35
36
+ QString NormalsParameters::summary () {
37
+ QString ret = " Normals" ;
38
+ if (flatMethod == FLAT_RADIAL)
39
+ ret += " , radial flattning" ;
40
+ if (flatMethod == FLAT_FOURIER)
41
+ ret += " , frequencies based flattening" ;
42
+
43
+ if (surface_integration == SURFACE_ASSM)
44
+ ret += " , adaptive surface reconstruction" ;
45
+ if (surface_integration == SURFACE_BNI)
46
+ ret += " , bilateral surface reconstruction" ;
47
+ if (surface_integration == SURFACE_FFT)
48
+ ret += " , Fourier transform surface reconstruction" ;
49
+ ret += " ." ;
50
+ return ret;
51
+ }
52
+
36
53
void NormalsTask::initFromProject (Project &project) {
37
54
lens = project.lens ;
38
55
imageset.width = imageset.image_width = project.lens .width ;
@@ -48,10 +65,14 @@ void NormalsTask::initFromProject(Project &project) {
48
65
}
49
66
pixelSize = project.pixelSize ;
50
67
}
68
+ void NormalsTask::setParameters (NormalsParameters ¶m) {
69
+ parameters = param;
70
+ label = parameters.summary ();
71
+ }
51
72
52
73
void NormalsTask::run () {
53
74
status = RUNNING;
54
-
75
+ label = parameters. summary ();
55
76
56
77
function<bool (QString s, int d)> callback = [this ](QString s, int n)->bool { return this ->progressed (s, n); };
57
78
@@ -307,7 +328,7 @@ void NormalsTask::assm(QString filename, vector<float> &_normals, float approx_e
307
328
308
329
for (auto vertex: mesh.vertices ()) {
309
330
auto &p = mesh.position (vertex);
310
- p[1 ] * = imageset.height -p[1 ] -1 ;
331
+ p[1 ] = imageset.height -p[1 ] -1 ;
311
332
p[2 ] *= -1 ;
312
333
}
313
334
savePly (filename.toStdString ().c_str (), mesh);
0 commit comments