IntrinsicSurfaceMapper.h
1 /*
2  * Medical Image Registration ToolKit (MIRTK)
3  *
4  * Copyright 2016 Imperial College London
5  * Copyright 2016 Andreas Schuh
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #ifndef MIRTK_IntrinsicSurfaceMapper_H
21 #define MIRTK_IntrinsicSurfaceMapper_H
22 
23 #include "mirtk/NonSymmetricWeightsSurfaceMapper.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Surface maps based on a class of intrinsic surface parameterizations
31  *
32  * Surface mapping methods based on this class use a linear combination of edge
33  * weights which result from the discrete formulations of Dirichlet (angle preserving)
34  * and Chi (Euler characteristic, area preserving) energy functionals (Desbrun et al., 2002)
35  * obtaind using the finite element method (FEM). A discrete harmonic map, also
36  * referred to as Discrete Conformal Parameterization (DCP), is obtained by
37  * minimizing the Dirichlet energy functional. A convex combination map referred
38  * to as Discrete Authalic Parameterization (DAP) is obtained by minimizing only
39  * the Chi energy. The normalized weights are a generalization of Barycentric
40  * coordinates (Meyer, 2002). The discrete Dirichlet energy functional used by
41  * this mapper is the piecewise linear finite element approximation of the Laplace
42  * equation (Eck et al., 1995; Wardetzky et al., 2007). These cotangent weights
43  * were previously used by Pinkall and Polthier (1993) to compute a conformal surface map.
44  *
45  * - Wachspress (1975). A Rational Finite Element Basis.
46  * - Pinkall and Polthier (1993). Computing Discrete Minimal Surfaces and Their Conjugates.
47  * Experiment. Math., 2(1), 15–36.
48  * - Eck et al. (1995). Multiresolution analysis of arbitrary meshes. SIGGRAPH.
49  * - Desbrun, Meyer, and Alliez (2002). Intrinsic parameterizations of surface meshes.
50  * Computer Graphics Forum, 21(3), 209–218.
51  * - Meyer et al. (2002). Generalized Barycentric Coordinates on Irregular Polygons.
52  * Journal of Graphics Tools, 7(1), 13–22.
53  * - Wardetzky et al. (2007). Discrete quadratic curvature energies.
54  * Computer Aided Geometric Design, 24(8–9), 499–518.
55  */
57 {
58  mirtkObjectMacro(IntrinsicSurfaceMapper);
59 
60  // ---------------------------------------------------------------------------
61  // Attributes
62 
63  /// Weight of conformal energy in [0, 1], weight of authalic energy is 1 - Lambda.
64  mirtkPublicAttributeMacro(double, Lambda);
65 
66  /// Copy attributes of this class from another instance
67  void CopyAttributes(const IntrinsicSurfaceMapper &);
68 
69  // ---------------------------------------------------------------------------
70  // Construction/Destruction
71 
72 public:
73 
74  /// Constructor
75  ///
76  /// \param[in] lambda Weight of conformal energy in [0, 1].
77  /// The weight of the authalic energy is 1 - \p lambda.
78  IntrinsicSurfaceMapper(double lambda = .5);
79 
80  /// Copy constructor
82 
83  /// Assignment operator
85 
86  /// Destructor
87  virtual ~IntrinsicSurfaceMapper();
88 
89  // ---------------------------------------------------------------------------
90  // Execution
91 
92 protected:
93 
94  /// Weight of directed edge (i, j)
95  ///
96  /// \param[in] i Index of start point.
97  /// \param[in] j Index of end point.
98  ///
99  /// \returns Weight of directed edge (i, j).
100  virtual double Weight(int i, int j) const;
101 
102 };
103 
104 
105 } // namespace mirtk
106 
107 #endif // MIRTK_IntrinsicSurfaceMapper_H
virtual double Weight(int i, int j) const
IntrinsicSurfaceMapper(double lambda=.5)
Definition: IOConfig.h:41
virtual ~IntrinsicSurfaceMapper()
Destructor.
IntrinsicSurfaceMapper & operator=(const IntrinsicSurfaceMapper &)
Assignment operator.