LinearImageGradientFunction3D.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_LinearImageGradientFunction3D_H
21 #define MIRTK_LinearImageGradientFunction3D_H
22 
23 #include "mirtk/LinearImageGradientFunction.h"
24 
25 
26 namespace mirtk {
27 
28 
29 /**
30  * Linear interpolation of generic 3D image gradient
31  */
32 template <class TImage>
35 {
36  mirtkObjectMacro(GenericLinearImageGradientFunction3D);
37  mirtkGenericGradientInterpolatorTypes(GenericLinearImageGradientFunction);
38 
39 public:
40 
41  /// Default constructor
43 
44  /// Evaluate image gradient without handling boundary conditions
45  ///
46  /// This version is faster than EvaluateOutside, but is only defined inside
47  /// the domain for which all image values required for interpolation are
48  /// defined and thus require no extrapolation of the finite image.
49  virtual GradientType GetInside(double, double, double = 0, double = 0) const;
50 
51  /// Evaluate image gradient without handling boundary conditions
52  ///
53  /// If the location is partially inside the foreground region of the image,
54  /// only the foreground values are interpolated. Otherwise, the _DefaultValue
55  /// is returned.
56  ///
57  /// This version is faster than GetWithPaddingOutside, but is only defined
58  /// inside the domain for which all image values required for interpolation
59  /// are defined and thus require no extrapolation of the finite image.
60  virtual GradientType GetWithPaddingInside(double, double, double = 0, double = 0) const;
61 
62 };
63 
64 
65 /**
66  * Linear interpolation of any 3D image gradient
67  */
69 : public GenericLinearImageGradientFunction3D<BaseImage>
70 {
71  mirtkObjectMacro(LinearImageGradientFunction3D);
72 
73 public:
74 
75  /// Constructor
77 
78 };
79 
80 
81 } // namespace mirtk
82 
83 #endif // MIRTK_LinearImageGradientFunction3D_H
virtual GradientType GetWithPaddingInside(double, double, double=0, double=0) const
Definition: IOConfig.h:41
virtual GradientType GetInside(double, double, double=0, double=0) const