DGtalTools
1.5.beta
estimators
volSurfaceRegularization-details
surface_approx.h
1
#pragma once
2
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>
8
#include <tuple>
9
10
bool
ends_with(
const
std::string& value,
const
std::string& ending);
11
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
;
24
25
std::tuple<Calculus, FlatVector>
26
initCalculusAndNormalsFromSurfelNormalsCSV(
const
std::string& filename);
27
28
bool
29
checkOperatorSymmetry(
const
OperatorMatrix& matrix,
const
double
tol=1e-8);
30
31
FlatVector
32
vertexNormals(
const
Calculus
& calculus,
const
FlatVector& face_normals);
33
34
struct
ApproxParams
35
{
36
double
regularization_position
;
37
double
regularization_center
;
38
double
align
;
39
double
fairness
;
40
double
barycenter
;
41
};
42
43
void
44
exportOBJ(
const
Calculus
& calculus,
const
FlatVector& positions,
const
std::string& filename);
45
46
// (original_positions, regularization_position, original_centers, regularized_centers)
47
std::tuple<FlatVector, FlatVector, FlatVector, FlatVector>
48
approximateSurface(
const
Calculus
& calculus,
const
FlatVector& normals,
const
ApproxParams
& params);
49
50
// (L_position, L_align)
51
std::tuple<double, double>
52
approximateSurfaceEnergies(
const
Calculus
& calculus,
const
FlatVector& normals,
const
FlatVector& positions);
53
DGtal::DiscreteExteriorCalculus
DGtal::DiscreteExteriorCalculus::LinearAlgebraBackend
TLinearAlgebraBackend LinearAlgebraBackend
Point
typename Self::Point Point
DGtal::KhalimskySpaceND
PointVector< dim, Integer >
ApproxParams
Definition:
surface_approx.h:35
ApproxParams::fairness
double fairness
Definition:
surface_approx.h:39
ApproxParams::regularization_position
double regularization_position
Definition:
surface_approx.h:36
ApproxParams::regularization_center
double regularization_center
Definition:
surface_approx.h:37
ApproxParams::barycenter
double barycenter
Definition:
surface_approx.h:40
ApproxParams::align
double align
Definition:
surface_approx.h:38
DGtal::CanonicCellEmbedder
DGtal::CanonicSCellEmbedder
KhalimskyCell< dim, Integer >
DGtal::SignedKhalimskyCell
Companion project associated to
DGtal
; Generated on Mon Aug 26 2024 21:31:31 for DGtalTools by
1.9.1