Volume Cartographer 2.27.0
OrderedPointSetMesher.hpp
Go to the documentation of this file.
1#pragma once
2
5#include <cstddef>
6
7#include <opencv2/core.hpp>
8
11
12namespace volcart::meshing
13{
35{
36public:
39
43
45 explicit OrderedPointSetMesher(PointSet points) : input_{std::move(points)}
46 {
47 }
52 void setPointSet(const PointSet& points) { input_ = points; }
53
62 void setComputeTriangulation(bool b) { generateTriangles_ = b; }
63
65 ITKMesh::Pointer getOutputMesh() const { return output_; }
72 ITKMesh::Pointer compute();
75private:
76 PointSet input_;
77 ITKMesh::Pointer output_;
78
79 bool generateTriangles_{true};
80
88 void add_cell_(std::size_t a, std::size_t b, std::size_t c);
89};
90} // namespace volcart::meshing
Generate an ordered mesh from an OrderedPointSet.
OrderedPointSetMesher()=default
Default Constructor.
void add_cell_(std::size_t a, std::size_t b, std::size_t c)
Add a face to the output mesh.
void setPointSet(const PointSet &points)
Set the input OrderedPointSet.
void setComputeTriangulation(bool b)
Set whether to compute a triangulation from point ordering.
ITKMesh::Pointer getOutputMesh() const
Get the generated mesh.
OrderedPointSetMesher(PointSet points)
Construct with OrderedPointSet to be converted.
ITKMesh::Pointer compute()
Compute the mesh triangulation.
Mesh generation and modification library.