IntrinsicLeastAreaDistortionSurfaceMapper.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_IntrinsicLeastAreaDistortionSurfaceMapper_H
21 #define MIRTK_IntrinsicLeastAreaDistortionSurfaceMapper_H
22 
23 #include "mirtk/NearOptimalIntrinsicSurfaceMapper.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Compute a near-optimal intrinsic surface map which minimizes area distortion
31  *
32  * - Desbrun, Meyer, and Alliez (2002). Intrinsic parameterizations of surface meshes.
33  * Computer Graphics Forum, 21(3), 209–218.
34  */
36 {
38 
39  // ---------------------------------------------------------------------------
40  // Attributes
41 
42  /// Minimum step length used for gradient descent to find optimal lambda value
43  mirtkPublicAttributeMacro(double, MinStepLength);
44 
45  /// Maximum step length used for gradient descent to find optimal lambda value
46  mirtkPublicAttributeMacro(double, MaxStepLength);
47 
48  /// Copy attributes of this class from another instance
49  void CopyAttributes(const IntrinsicLeastAreaDistortionSurfaceMapper &);
50 
51  // ---------------------------------------------------------------------------
52  // Construction/Destruction
53 
54 public:
55 
56  /// Default constructor
58 
59  /// Copy constructor
61 
62  /// Assignment operator
65  );
66 
67  /// Destructor
69 
70  // ---------------------------------------------------------------------------
71  // Execution
72 
73 protected:
74 
75  /// Compute affine combination weight that minimizes a given distortion measure
76  ///
77  /// \param[in] u0 Discrete authalic surface map values, i.e., lambda=0.
78  /// \param[in] u1 Discrete conformal surface map values, i.e., lambda=1.
79  ///
80  /// \returns Affine combination weight \f$\lambda\f$, where final surface map values
81  /// are computed as \f$\lambda u1 + (1 - \lambda) * u0\f$.
82  virtual double ComputeLambda(vtkDataArray *u0, vtkDataArray *u1) const;
83 
84 };
85 
86 
87 } // namespace mirtk
88 
89 #endif // MIRTK_IntrinsicLeastAreaDistortionSurfaceMapper_H
IntrinsicLeastAreaDistortionSurfaceMapper & operator=(const IntrinsicLeastAreaDistortionSurfaceMapper &)
Assignment operator.
virtual double ComputeLambda(vtkDataArray *u0, vtkDataArray *u1) const
virtual ~IntrinsicLeastAreaDistortionSurfaceMapper()
Destructor.
Definition: IOConfig.h:41
IntrinsicLeastAreaDistortionSurfaceMapper()
Default constructor.