28 template <
typename BaseVecT>
33 string pcm_name = options.
getPcm();
37 if (pcm_name ==
"PCL")
39 cout <<
timestamp <<
"Using PCL as point cloud manager is not implemented yet!" << endl;
42 else if (pcm_name ==
"STANN" || pcm_name ==
"FLANN" || pcm_name ==
"NABO" ||
43 pcm_name ==
"NANOFLANN")
45 surface = make_shared<AdaptiveKSearchSurface<BaseVecT>>(
46 buffer, pcm_name, options.
getKn(), options.
getKi(), options.
getKd(), 1,
"");
50 cout <<
timestamp <<
"Unable to create PointCloudManager." << endl;
51 cout <<
timestamp <<
"Unknown option '" << pcm_name <<
"'." << endl;
56 surface->setKd(options.
getKd());
57 surface->setKi(options.
getKi());
58 surface->setKn(options.
getKn());
61 if (!buffer->hasNormals() && buffer.get()->numPoints() < 1000000)
63 surface->calculateSurfaceNormals();
73 std::cout << endl <<
"Received signal bit..." << endl;
80 cout <<
timestamp <<
"Saving mesh." << endl;
96 std::cout << options << std::endl;
109 struct sigaction sigIntHandler;
111 sigIntHandler.sa_handler =
saveMesh;
112 sigemptyset(&sigIntHandler.sa_mask);
113 sigIntHandler.sa_flags = 0;
115 sigaction(SIGINT, &sigIntHandler,
NULL);
120 cout <<
"Failed to create Buffer...exiting..." << endl;
122 model.get()->m_mesh.get()->numVertices());
128 string pcm_name = options.
getPcm();
129 auto surface = loadPointCloud<Vec>(
options, buffer);
132 cout <<
"Failed to create pointcloud. Exiting." << endl;
A class to handle point information with an arbitrarily large number of attribute channels...
void setNumBalances(int m_balances)
const kaboom::Options * options
std::shared_ptr< MeshBuffer > MeshBufferPtr
void setWithCollapse(bool m_withCollapse)
void setRuntime(int m_runtime)
static Timestamp timestamp
A global time stamp object for program runtime measurement.
static ModelPtr readModel(std::string filename)
void setDeleteLongEdgesFactor(int m_deleteLongEdgesFactor)
void setBoxFactor(float m_boxFactor)
void setNumSplits(int m_numSplits)
MeshBufferPtr apply(const BaseMesh< BaseVecT > &mesh)
std::shared_ptr< PointBuffer > PointBufferPtr
void setCollapseThreshold(float m_collapseThreshold)
void setLearningRate(float m_learningRate)
PointsetSurfacePtr< BaseVecT > loadPointCloud(const gs_reconstruction::Options &options, PointBufferPtr buffer)
void setInterior(bool m_interior)
Half-edge data structure implementing the BaseMesh interface.
void setBasicSteps(int m_basicSteps)
void getMesh(HalfEdgeMesh< BaseVecT > &mesh)
void setFilterChain(bool m_filterChain)
int main(int argc, char **argv)
std::shared_ptr< Model > ModelPtr
void panic_unimplemented(std::string msg)
Throws a panic exception with the given error message and denotes that the exception was thrown due t...
void setNeighborLearningRate(float m_neighborLearningRate)
void setAllowMiss(int m_allowMiss)
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
void setDecreaseFactor(float m_decreaseFactor)
string getInputFileName() const
static void saveModel(ModelPtr m, std::string file)