3 #include <DGtal/helpers/StdDefs.h>
4 #include <DGtal/topology/CanonicCellEmbedder.h>
5 #include <DGtal/topology/CanonicSCellEmbedder.h>
6 #include <DGtal/math/linalg/EigenSupport.h>
7 #include <DGtal/dec/DiscreteExteriorCalculus.h>
10 bool ends_with(
const std::string& value,
const std::string& ending);
12 typedef DGtal::DiscreteExteriorCalculus<2, 3, DGtal::EigenLinearAlgebraBackend> Calculus;
13 typedef Calculus::LinearAlgebraBackend Backend;
14 typedef Calculus::KSpace KSpace;
15 typedef DGtal::CanonicCellEmbedder<KSpace> CellEmbedder;
16 typedef DGtal::CanonicSCellEmbedder<KSpace> SCellEmbedder;
17 typedef KSpace::SCell SCell;
18 typedef KSpace::Cell Cell;
19 typedef Backend::DenseVector FlatVector;
20 typedef Backend::SparseMatrix OperatorMatrix;
21 typedef Backend::Triplet Triplet;
22 typedef DGtal::Z3i::Point Point;
23 typedef DGtal::Z3i::RealPoint RealPoint;
25 std::tuple<Calculus, FlatVector>
26 initCalculusAndNormalsFromSurfelNormalsCSV(
const std::string& filename);
29 checkOperatorSymmetry(
const OperatorMatrix& matrix,
const double tol=1e-8);
32 vertexNormals(
const Calculus& calculus,
const FlatVector& face_normals);
44 exportOBJ(
const Calculus& calculus,
const FlatVector& positions,
const std::string& filename);
47 std::tuple<FlatVector, FlatVector, FlatVector, FlatVector>
48 approximateSurface(
const Calculus& calculus,
const FlatVector& normals,
const ApproxParams& params);
51 std::tuple<double, double>
52 approximateSurfaceEnergies(
const Calculus& calculus,
const FlatVector& normals,
const FlatVector& positions);
double regularization_position
double regularization_center