ChordLengthSurfaceMapper.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_ChordLengthSurfaceMapper_H
21 #define MIRTK_ChordLengthSurfaceMapper_H
22 
23 #include "mirtk/SymmetricWeightsSurfaceMapper.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Piecewise linear surface mapper with convex combination weights inverse proportional to edge length
31  *
32  * - Floater (1997). Parametrization and smooth approximation of surface triangulations.
33  * Computer Aided Geometric Design, 14(3), 231–250.
34  */
36 {
37  mirtkObjectMacro(ChordLengthSurfaceMapper);
38 
39  // ---------------------------------------------------------------------------
40  // Attributes
41 
42  /// Number of times the edge length is exponentiated
43  mirtkPublicAttributeMacro(int, Exponent);
44 
45  /// Copy attributes of this class from another instance
46  void CopyAttributes(const ChordLengthSurfaceMapper &);
47 
48  // ---------------------------------------------------------------------------
49  // Construction/Destruction
50 
51 public:
52 
53  /// Default constructor
54  ///
55  /// \param[in] Edge length exponent.
56  ChordLengthSurfaceMapper(int p = 2);
57 
58  /// Copy constructor
60 
61  /// Assignment operator
63 
64  /// Destructor
65  virtual ~ChordLengthSurfaceMapper();
66 
67  // ---------------------------------------------------------------------------
68  // Execution
69 
70 protected:
71 
72  /// Weight of undirected edge (i, j)
73  ///
74  /// \param[in] i First end point.
75  /// \param[in] j Second end point.
76  ///
77  /// \returns Weight of undirected edge (i, j).
78  virtual double Weight(int i, int j) const;
79 
80 };
81 
82 
83 } // namespace mirtk
84 
85 #endif // MIRTK_ChordLengthSurfaceMapper_H
virtual double Weight(int i, int j) const
Definition: IOConfig.h:41
virtual ~ChordLengthSurfaceMapper()
Destructor.
ChordLengthSurfaceMapper & operator=(const ChordLengthSurfaceMapper &)
Assignment operator.