InflationForce.h
1 /*
2  * Medical Image Registration ToolKit (MIRTK)
3  *
4  * Copyright 2013-2015 Imperial College London
5  * Copyright 2013-2015 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_InflationForce_H
21 #define MIRTK_InflationForce_H
22 
23 #include "mirtk/SurfaceConstraint.h"
24 
25 #include "vtkSmartPointer.h"
26 #include "vtkDataArray.h"
27 
28 
29 namespace mirtk {
30 
31 
32 /**
33  * Surface inflation force
34  *
35  * The inflation is driven by the average convexity or concavity of a region.
36  * That is, points which lie in concave regions move outwards over time,
37  * while points in convex regions move inwards.
38  *
39  * Fischl et al., Cortical Surface-Based Analysis II: Inflation, Flattening,
40  * and a Surface-Based Coordinate System. NeuroImage, 9(2), 195–207 (1999).
41  *
42  * This force term is similar to the CurvatureConstraint. Both reduce the
43  * curvature of the surface mesh by moving points towards the centroid of the
44  * adjacent nodes. The inflation force is defined as the sum of the average
45  * squared adjacent edge lengths, while the curvature constraint is defined as
46  * the squared distance to the explicitly computed centroid position.
47  *
48  * Moreover, the average normal component is subtracted from the node force.
49  * This modification is not presented in the NeuroImage paper by Fischl et al,
50  * but can be seen in the implementation of FreeSurfer's mris_inflate tool
51  * (cf. mrisComputeNormalizedSpringTerm in mrisurf.c).
52  *
53  * @sa CurvatureConstraint
54  */
56 {
57  mirtkEnergyTermMacro(InflationForce, EM_InflationForce);
58 
59  // ---------------------------------------------------------------------------
60  // Construction/Destruction
61 
62 public:
63 
64  /// Constructor
65  InflationForce(const char * = "", double = 1.0);
66 
67  /// Copy constructor
69 
70  /// Assignment operator
72 
73  /// Destructor
74  virtual ~InflationForce();
75 
76  // ---------------------------------------------------------------------------
77  // Evaluation
78 
79 protected:
80 
81  /// Compute penalty for current transformation estimate
82  virtual double Evaluate();
83 
84  /// Compute internal force w.r.t. transformation parameters
85  virtual void EvaluateGradient(double *, double, double);
86 
87 };
88 
89 
90 } // namespace mirtk
91 
92 #endif // MIRTK_InflationForce_H
virtual void EvaluateGradient(double *, double, double)
Compute internal force w.r.t. transformation parameters.
virtual ~InflationForce()
Destructor.
virtual double Evaluate()
Compute penalty for current transformation estimate.
Inflate point set surface.
Definition: EnergyMeasure.h:89
Definition: IOConfig.h:41
InflationForce & operator=(const InflationForce &)
Assignment operator.
InflationForce(const char *="", double=1.0)
Constructor.