go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkDeformationFieldInterpolatingTransform.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 __itkDeformationFieldInterpolatingTransform_h
19#define __itkDeformationFieldInterpolatingTransform_h
20
21#include <iostream>
23#include "itkMacro.h"
24#include "itkImage.h"
25#include "itkVectorInterpolateImageFunction.h"
26#include "itkVectorNearestNeighborInterpolateImageFunction.h"
27
28namespace itk
29{
30
42template<
43class TScalarType = double, // Data type for scalars (float or double)
44unsigned int NDimensions = 3, // Number of input dimensions
45class TComponentType = double >
46// ComponentType of the deformation field
48 public AdvancedTransform< TScalarType, NDimensions, NDimensions >
49{
50public:
51
56 typedef SmartPointer< const Self > ConstPointer;
57
59 itkNewMacro( Self );
60
63
65 itkStaticConstMacro( InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension );
66 itkStaticConstMacro( OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension );
67
86
88
89 typedef TComponentType DeformationFieldComponentType;
90 typedef Vector< DeformationFieldComponentType,
91 itkGetStaticConstMacro( OutputSpaceDimension ) > DeformationFieldVectorType;
93 itkGetStaticConstMacro( InputSpaceDimension ) > DeformationFieldType;
94 typedef typename DeformationFieldType::Pointer DeformationFieldPointer;
95
96 typedef VectorInterpolateImageFunction<
98 typedef typename DeformationFieldInterpolatorType::Pointer DeformationFieldInterpolatorPointer;
99 typedef VectorNearestNeighborInterpolateImageFunction<
101
105 void SetParameters( const ParametersType & ) override
106 {
107 itkExceptionMacro( << "ERROR: SetParameters() is not implemented "
108 << "for DeformationFieldInterpolatingTransform.\n"
109 << "Use SetDeformationField() instead.\n"
110 << "Note that this transform is NOT suited for image registration.\n"
111 << "Just use it as an (initial) fixed transform that is not optimized." );
112 }
113
114
116 void SetFixedParameters( const ParametersType & ) override
117 {
118 // This transform has no fixed parameters.
119 }
120
121
123 const ParametersType & GetFixedParameters( void ) const override
124 {
125 // This transform has no fixed parameters.
126 return this->m_FixedParameters;
127 }
128
129
133 OutputPointType TransformPoint( const InputPointType & point ) const override;
134
137 {
138 itkExceptionMacro(
139 << "TransformVector(const InputVectorType &) is not implemented "
140 << "for DeformationFieldInterpolatingTransform" );
141 }
142
143
145 {
146 itkExceptionMacro(
147 << "TransformVector(const InputVnlVectorType &) is not implemented "
148 << "for DeformationFieldInterpolatingTransform" );
149 }
150
151
153 {
154 itkExceptionMacro(
155 << "TransformCovariantVector(const InputCovariantVectorType &) is not implemented "
156 << "for DeformationFieldInterpolatingTransform" );
157 }
158
159
162 void SetIdentity( void );
163
166
168
171
173
174 bool IsLinear( void ) const override { return false; }
175
178 const InputPointType & ipp, JacobianType & j,
179 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override
180 {
181 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
182 }
183
184
186 const InputPointType & ipp, SpatialJacobianType & sj ) const override
187 {
188 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
189 }
190
191
193 const InputPointType & ipp, SpatialHessianType & sh ) const override
194 {
195 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
196 }
197
198
201 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override
202 {
203 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
204 }
205
206
208 const InputPointType & ipp, SpatialJacobianType & sj,
210 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override
211 {
212 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
213 }
214
215
218 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override
219 {
220 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
221 }
222
223
225 const InputPointType & ipp, SpatialHessianType & sh,
227 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override
228 {
229 itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
230 }
231
232
233protected:
234
237
239 typedef typename DeformationFieldInterpolatorType::ContinuousIndexType
241 typedef typename DeformationFieldInterpolatorType::OutputType InterpolatorOutputType;
242
244 void PrintSelf( std::ostream & os, Indent indent ) const override;
245
249
250private:
251
252 DeformationFieldInterpolatingTransform( const Self & ); // purposely not implemented
253 void operator=( const Self & ); // purposely not implemented
254
255};
256
257} // namespace itk
258
259#ifndef ITK_MANUAL_INSTANTIATION
260#include "itkDeformationFieldInterpolatingTransform.hxx"
261#endif
262
263#endif /* __itkDeformationFieldInterpolatingTransform_h */
Transform maps points, vectors and covariant vectors from an input space to an output space.
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Transform that interpolates a given deformation field.
OutputPointType TransformPoint(const InputPointType &point) const override
DeformationFieldInterpolatorType::ContinuousIndexType InputContinuousIndexType
Vector< DeformationFieldComponentType, itkGetStaticConstMacro(OutputSpaceDimension) > DeformationFieldVectorType
void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
virtual void SetDeformationFieldInterpolator(DeformationFieldInterpolatorType *_arg)
void PrintSelf(std::ostream &os, Indent indent) const override
void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
VectorNearestNeighborInterpolateImageFunction< DeformationFieldType, ScalarType > DefaultDeformationFieldInterpolatorType
itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension)
const ParametersType & GetFixedParameters(void) const override
void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const override
VectorInterpolateImageFunction< DeformationFieldType, ScalarType > DeformationFieldInterpolatorType
void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void GetJacobianOfSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
virtual void SetDeformationField(DeformationFieldType *_arg)
AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass
DeformationFieldInterpolatorType::OutputType InterpolatorOutputType
OutputVectorType TransformVector(const InputVectorType &) const override
DeformationFieldInterpolatorType::Pointer DeformationFieldInterpolatorPointer
void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const override
itkGetModifiableObjectMacro(DeformationFieldInterpolator, DeformationFieldInterpolatorType)
itkStaticConstMacro(OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension)
itkGetModifiableObjectMacro(DeformationField, DeformationFieldType)
Image< DeformationFieldVectorType, itkGetStaticConstMacro(InputSpaceDimension) > DeformationFieldType
void GetJacobianOfSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo