NormalForce.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_NormalForce_H
21 #define MIRTK_NormalForce_H
22 
23 #include "mirtk/InternalForce.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Constant internal force in normal direction
31  */
32 class NormalForce : public InternalForce
33 {
34  mirtkEnergyTermMacro(NormalForce, EM_NormalForce);
35 
36  // ---------------------------------------------------------------------------
37  // Construction/Destruction
38 
39 public:
40 
41  /// Constructor
42  NormalForce(const char * = "", double = 1.0);
43 
44  /// Copy constructor
45  NormalForce(const NormalForce &);
46 
47  /// Assignment operator
49 
50  /// Destructor
51  virtual ~NormalForce();
52 
53  // ---------------------------------------------------------------------------
54  // Evaluation
55 
56 protected:
57 
58  /// Evaluate external force term
59  virtual double Evaluate();
60 
61  /// Compute internal force w.r.t. transformation parameters
62  virtual void EvaluateGradient(double *, double, double);
63 
64 };
65 
66 
67 } // namespace mirtk
68 
69 #endif // MIRTK_NormalForce_H
virtual void EvaluateGradient(double *, double, double)
Compute internal force w.r.t. transformation parameters.
Definition: IOConfig.h:41
Constant force in normal direction.
Definition: EnergyMeasure.h:91
virtual ~NormalForce()
Destructor.
NormalForce & operator=(const NormalForce &)
Assignment operator.
virtual double Evaluate()
Evaluate external force term.
NormalForce(const char *="", double=1.0)
Constructor.