MaximumCurvatureConstraint.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_MaximumCurvatureConstraint_H
21 #define MIRTK_MaximumCurvatureConstraint_H
22 
23 #include "mirtk/SurfaceConstraint.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Maximum principle curvature constraint term
31  */
33 {
34  mirtkEnergyTermMacro(MaximumCurvatureConstraint, EM_MaximumCurvature);
35 
36  // ---------------------------------------------------------------------------
37  // Attributes
38 
39  /// Maximum curvature threshold
40  mirtkPublicAttributeMacro(double, Threshold);
41 
42  /// Copy attributes of this class from another instance
43  void CopyAttributes(const MaximumCurvatureConstraint &);
44 
45  // ---------------------------------------------------------------------------
46  // Construction/Destruction
47 
48 public:
49 
50  /// Constructor
51  MaximumCurvatureConstraint(const char * = "", double = 1.0);
52 
53  /// Copy constructor
55 
56  /// Assignment operator
58 
59  /// Destructor
61 
62  // ---------------------------------------------------------------------------
63  // Evaluation
64 
65  /// Initialize force term once input and parameters have been set
66  virtual void Initialize();
67 
68  /// Update internal force data structures
69  virtual void Update(bool);
70 
71 protected:
72 
73  /// Evaluate energy of internal force term
74  virtual double Evaluate();
75 
76  /// Evaluate internal force w.r.t. transformation parameters or surface nodes
77  virtual void EvaluateGradient(double *, double, double);
78 
79 };
80 
81 
82 } // namespace mirtk
83 
84 #endif // MIRTK_MaximumCurvatureConstraint_H
MaximumCurvatureConstraint & operator=(const MaximumCurvatureConstraint &)
Assignment operator.
virtual void EvaluateGradient(double *, double, double)
Evaluate internal force w.r.t. transformation parameters or surface nodes.
virtual void Initialize()
Initialize force term once input and parameters have been set.
MaximumCurvatureConstraint(const char *="", double=1.0)
Constructor.
Definition: IOConfig.h:41
Maximum curvature constraint.
Definition: EnergyMeasure.h:86
virtual double Evaluate()
Evaluate energy of internal force term.
virtual void Update(bool)
Update internal force data structures.
virtual ~MaximumCurvatureConstraint()
Destructor.