HarmonicSurfaceMapper.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_HarmonicSurfaceMapper_H
21 #define MIRTK_HarmonicSurfaceMapper_H
22 
23 #include "mirtk/SymmetricWeightsSurfaceMapper.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Computes piecewise linear harmonic surface map with fixed boundary
31  *
32  * The harmonic surface map minimizes the discrete Dirichlet energy. It is the
33  * solution of the discrete Laplace equation. Moreover, because the boundary
34  * points are fixed and therefore the area of the parameteric domain is constant,
35  * this minimum is also a critical point of the conformal energy (Mullen et al., 2008).
36  * But because of these Dirichlet boundary conditions, the resulting map can only
37  * be as conformal as possible in a least squares sense. For a free boundary
38  * surface map which minimizes the conformal energy, see the NaturalConformalSurfaceMapper.
39  *
40  * The surface map is the solution of a sparse linear system of equations, where
41  * the coefficients are the well-known cotangent weights of the discretized
42  * Laplace-Beltrami operator.
43  *
44  * - Pinkall and Polthier (1993). Computing Discrete Minimal Surfaces and Their Conjugates.
45  * Experiment. Math., 2(1), 15–36.
46  * - Eck et al. (1995). Multiresolution analysis of arbitrary meshes. SIGGRAPH.
47  * - Meyer et al. (2002). Generalized Barycentric Coordinates on Irregular Polygons.
48  * Journal of Graphics Tools, 7(1), 13–22.
49  * - Desbrun, Meyer, and Alliez (2002). Intrinsic parameterizations of surface meshes.
50  * Computer Graphics Forum, 21(3), 209–218.
51  * - Mullen et al. (2008). Spectral conformal parameterization.
52  * Eurographics Symposium on Geometry Processing, 27(5), 1487–1494.
53  */
55 {
56  mirtkObjectMacro(HarmonicSurfaceMapper);
57 
58  // ---------------------------------------------------------------------------
59  // Attributes
60 
61  /// Copy attributes of this class from another instance
62  void CopyAttributes(const HarmonicSurfaceMapper &);
63 
64  // ---------------------------------------------------------------------------
65  // Construction/Destruction
66 
67 public:
68 
69  /// Default constructor
71 
72  /// Copy constructor
74 
75  /// Assignment operator
77 
78 public:
79 
80  /// Destructor
81  virtual ~HarmonicSurfaceMapper();
82 
83  // ---------------------------------------------------------------------------
84  // Execution
85 
86 protected:
87 
88  /// Weight of undirected edge (i, j)
89  ///
90  /// \param[in] i First end point.
91  /// \param[in] j Second end point.
92  ///
93  /// \returns Weight of undirected edge (i, j).
94  virtual double Weight(int i, int j) const;
95 
96 };
97 
98 
99 } // namespace mirtk
100 
101 #endif // MIRTK_HarmonicSurfaceMapper_H
virtual double Weight(int i, int j) const
Definition: IOConfig.h:41
HarmonicSurfaceMapper & operator=(const HarmonicSurfaceMapper &)
Assignment operator.
HarmonicSurfaceMapper()
Default constructor.
virtual ~HarmonicSurfaceMapper()
Destructor.