Go to the documentation of this file.00001
00106 #include "Options.hpp"
00107 #include "reconstruction/StannPointCloudManager.hpp"
00108 #include "reconstruction/FastReconstruction.hpp"
00109 #include "io/PLYIO.hpp"
00110 #include "geometry/Matrix4.hpp"
00111 #include "geometry/TriangleMesh.hpp"
00112 #include "geometry/HalfEdgeMesh.hpp"
00113 #include <iostream>
00114
00115 using namespace lssr;
00116
00120 int main(int argc, char** argv)
00121 {
00122
00123 reconstruct::Options options(argc, argv);
00124
00125
00126
00127 if (options.printUsage()) return 0;
00128
00129 ::std::cout<<options<<::std::endl;
00130
00131
00132 StannPointCloudManager<Vertex<float>, Normal<float> > manager( options.getInputFileName(),
00133 options.getKn(),
00134 options.getKi(),
00135 options.getKd()
00136 );
00137
00138
00139 TriangleMesh<Vertex<float>, Normal<float> > mesh;
00140
00141
00142
00143 float resolution;
00144 bool useVoxelsize;
00145 if(options.getIntersections() > 0)
00146 {
00147 resolution = options.getIntersections();
00148 useVoxelsize = false;
00149 }
00150 else
00151 {
00152 resolution = options.getVoxelsize();
00153 useVoxelsize = true;
00154 }
00155
00156
00157 FastReconstruction<Vertex<float>, Normal<float> > reconstruction(manager, resolution, useVoxelsize);
00158 reconstruction.getMesh(mesh);
00159
00160
00161 mesh.finalize();
00162 mesh.save("triangle_mesh.ply");
00163
00164
00165 cout << timestamp << "Program end." << endl;
00166
00167 return 0;
00168 }
00169