HarmonicTetrahedralMeshMapper.h
1 /*
2  * Medical Image Registration ToolKit (MIRTK)
3  *
4  * Copyright 2015-2016 Imperial College London
5  * Copyright 2015-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_HarmonicTetrahedralMeshMapper_H
21 #define MIRTK_HarmonicTetrahedralMeshMapper_H
22 
23 #include "mirtk/LinearTetrahedralMeshMapper.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Approximate harmonic piecewise linear volumetric map using finite element method (FEM)
31  *
32  * This implementation is based on
33  *
34  * Paillé & Poulin (2012), As-conformal-as-possible discrete volumetric mapping,
35  * Computers and Graphics (Pergamon), 36(5), 427–433.
36  *
37  * The discrete volumetric harmonic map was first presented in
38  *
39  * Wang et al. (2004), Volumetric harmonic map,
40  * Communications in Information and Systems, 3(3), 191–202.
41  */
43 {
44  mirtkObjectMacro(HarmonicTetrahedralMeshMapper);
45 
46 public:
47 
48  // ---------------------------------------------------------------------------
49  // Construction/Destruction
50 
51  /// Default constructor
53 
54  /// Copy constructor
56 
57  /// Assignment operator
59 
60  /// Destructor
62 
63  // ---------------------------------------------------------------------------
64  // Auxiliary functions
65 
66 protected:
67 
68  /// Calculate operator weight for given tetrahadron
69  ///
70  /// \param[in] cellId ID of tetrahedron.
71  /// \param[in] v0 First vertex/point of tetrahedron.
72  /// \param[in] v1 Second vertex/point of tetrahedron.
73  /// \param[in] v2 Third vertex/point of tetrahedron.
74  /// \param[in] v3 Fourth vertex/point of tetrahedron.
75  /// \param[in] volume Volume of tetrahedron.
76  ///
77  /// \return Operator weight contribution of tetrahedron.
78  virtual Matrix3x3 GetWeight(vtkIdType cellId,
79  const double v0[3],
80  const double v1[3],
81  const double v2[3],
82  const double v3[3],
83  double volume) const;
84 
85 };
86 
87 
88 } // namespace mirtk
89 
90 #endif // MIRTK_HarmonicTetrahedralMeshMapper_H
HarmonicTetrahedralMeshMapper & operator=(const HarmonicTetrahedralMeshMapper &)
Assignment operator.
HarmonicTetrahedralMeshMapper()
Default constructor.
virtual Matrix3x3 GetWeight(vtkIdType cellId, const double v0[3], const double v1[3], const double v2[3], const double v3[3], double volume) const
Definition: IOConfig.h:41
virtual ~HarmonicTetrahedralMeshMapper()
Destructor.