go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedLinearInterpolateImageFunction.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef __itkAdvancedLinearInterpolateImageFunction_h
19#define __itkAdvancedLinearInterpolateImageFunction_h
20
21#include "itkLinearInterpolateImageFunction.h"
22
23namespace itk
24{
62template< class TInputImage, class TCoordRep = double >
64 public LinearInterpolateImageFunction< TInputImage, TCoordRep >
65{
66public:
67
70 typedef LinearInterpolateImageFunction< TInputImage, TCoordRep > Superclass;
72 typedef SmartPointer< const Self > ConstPointer;
73
75 itkTypeMacro( AdvancedLinearInterpolateImageFunction, LinearInterpolateImageFunction );
76
78 itkNewMacro( Self );
79
81 typedef typename Superclass::OutputType OutputType;
82
84 typedef typename Superclass::InputImageType InputImageType;
85 typedef typename InputImageType::SpacingType InputImageSpacingType;
86
88 typedef typename Superclass::InputPixelType InputPixelType;
89
91 typedef typename Superclass::RealType RealType;
92
94 itkStaticConstMacro( ImageDimension, unsigned int, Superclass::ImageDimension );
95
97 typedef typename Superclass::IndexType IndexType;
98
100 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
101 typedef typename ContinuousIndexType::ValueType ContinuousIndexValueType;
102
104 typedef CovariantVector< OutputType,
105 itkGetStaticConstMacro( ImageDimension ) > CovariantVectorType;
106
109 const ContinuousIndexType & x ) const;
110
113 const ContinuousIndexType & x,
114 OutputType & value,
115 CovariantVectorType & deriv ) const
116 {
118 Dispatch< ImageDimension >(), x, value, deriv );
119 }
120
121
122protected:
123
126
127private:
128
129 AdvancedLinearInterpolateImageFunction( const Self & ); // purposely not implemented
130 void operator=( const Self & ); // purposely not implemented
131
133 struct DispatchBase {};
134 template< unsigned int >
135 struct Dispatch : public DispatchBase {};
136
139 const Dispatch< 2 > &,
140 const ContinuousIndexType & x,
141 OutputType & value,
142 CovariantVectorType & deriv ) const;
143
146 const Dispatch< 3 > &,
147 const ContinuousIndexType & x,
148 OutputType & value,
149 CovariantVectorType & deriv ) const;
150
153 const DispatchBase &,
154 const ContinuousIndexType & x,
155 OutputType & value,
156 CovariantVectorType & deriv ) const
157 {
158 return this->EvaluateValueAndDerivativeUnOptimized( x, value, deriv );
159 }
160
161
164 const ContinuousIndexType & x,
165 OutputType & value,
166 CovariantVectorType & deriv ) const
167 {
168 itkExceptionMacro( << "ERROR: EvaluateValueAndDerivativeAtContinuousIndex() "
169 << "is not implemented for this dimension ("
170 << ImageDimension << ")." );
171 }
172
173
174};
175
176} // end namespace itk
177
178#ifndef ITK_MANUAL_INSTANTIATION
179#include "itkAdvancedLinearInterpolateImageFunction.hxx"
180#endif
181
182#endif
Linearly interpolate an image at specified positions.
LinearInterpolateImageFunction< TInputImage, TCoordRep > Superclass
itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension)
void EvaluateValueAndDerivativeOptimized(const Dispatch< 2 > &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
CovariantVector< OutputType, itkGetStaticConstMacro(ImageDimension) > CovariantVectorType
void EvaluateValueAndDerivativeOptimized(const Dispatch< 3 > &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
void EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
void EvaluateValueAndDerivativeUnOptimized(const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
CovariantVectorType EvaluateDerivativeAtContinuousIndex(const ContinuousIndexType &x) const
void EvaluateValueAndDerivativeOptimized(const DispatchBase &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo