ShapePreservingSurfaceMapper.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_ShapePreservingSurfaceMapper_H
21 #define MIRTK_ShapePreservingSurfaceMapper_H
22 
23 #include "mirtk/NonSymmetricWeightsSurfaceMapper.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Linear surface mapper with Floater's shape preserving convex combination weights
31  *
32  * The shape preserving convex combination weights are the average Barycentric coordinates
33  * of overlapping triangles containing the respective center node, where the Barycentric
34  * coordinates are the unique coordinates which satisfy the convex combination interpolation
35  * criteria for the case where the center node is adjacent to exactly three nodes.
36  *
37  * - Floater (1997). Parametrization and smooth approximation of surface triangulations.
38  * Computer Aided Geometric Design, 14(3), 231–250.
39  * - Guskov (2004). An anisotropic mesh parameterization scheme.
40  * Engineering with Computers, 20(2), 129–135.
41  */
43 {
44  mirtkObjectMacro(ShapePreservingSurfaceMapper);
45 
46  // ---------------------------------------------------------------------------
47  // Attributes
48 
49  /// Copy attributes of this class from another instance
50  void CopyAttributes(const ShapePreservingSurfaceMapper &);
51 
52  // ---------------------------------------------------------------------------
53  // Construction/Destruction
54 
55 public:
56 
57  /// Default constructor
59 
60  /// Copy constructor
62 
63  /// Assignment operator
65 
66  /// Destructor
68 
69  // ---------------------------------------------------------------------------
70  // Execution
71 
72 protected:
73 
74  /// Weights of edges adjacent to node i
75  ///
76  /// \param[in] i Index of central node.
77  /// \param[in] j Indices of adjacent nodes.
78  /// \param[out] w Weights of \p d_i edges (i, j).
79  /// \param[in] d Number of adjacent nodes, i.e., node degree.
80  virtual void Weights(int i, const int *j, double *w, int d) const;
81 
82 };
83 
84 
85 } // namespace mirtk
86 
87 #endif // MIRTK_ShapePreservingSurfaceMapper_H
ShapePreservingSurfaceMapper & operator=(const ShapePreservingSurfaceMapper &)
Assignment operator.
ShapePreservingSurfaceMapper()
Default constructor.
Definition: IOConfig.h:41
virtual ~ShapePreservingSurfaceMapper()
Destructor.
virtual void Weights(int i, const int *j, double *w, int d) const