Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkITKTransformInverse.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: $RCSfile: vtkITKTransformInverse.h,v $
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or https://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15
26
27#ifndef __vtkITKTransformInverse_h
28#define __vtkITKTransformInverse_h
29
30namespace itk
31{
32
33//----------------------------------------------------------------------------
34template <typename TScalar = double, unsigned int NDimensions = 3, unsigned int VSplineOrder = 3>
35class InverseBSplineTransform : public BSplineTransform<TScalar, NDimensions, VSplineOrder>
36{
37public:
40 typedef BSplineTransform<TScalar, NDimensions, VSplineOrder> Superclass;
41 typedef SmartPointer<Self> Pointer;
42 typedef SmartPointer<const Self> ConstPointer;
43
46
49
52 using Superclass::TransformPoint;
53 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
54 {
55 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
56 }
57 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
58 {
59 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
60 }
61 // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
62 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
63 {
64 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
65 }
66 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
67 {
68 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
69 }
70 // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
71 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
72 {
73 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
74 }
75 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
76 {
77 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
78 }
79 void ComputeJacobianFromBSplineWeightsWithRespectToPosition(const typename Superclass::InputPointType&,
80 typename Superclass::WeightsType&,
81 typename Superclass::ParameterIndexArrayType&) const
82 {
83 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
84 }
85};
86
87//----------------------------------------------------------------------------
88template <typename TScalar = double, unsigned int NDimensions = 3, unsigned int VSplineOrder = 3>
89class InverseBSplineDeformableTransform : public BSplineDeformableTransform<TScalar, NDimensions, VSplineOrder>
90{
91public:
94 typedef BSplineDeformableTransform<TScalar, NDimensions, VSplineOrder> Superclass;
95 typedef SmartPointer<Self> Pointer;
96 typedef SmartPointer<const Self> ConstPointer;
97
99 itkTypeMacro(InverseBSplineDeformableTransform, BSplineDeformableTransform);
100
103
106 using Superclass::TransformPoint;
107 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
108 {
109 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
110 }
111 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
112 {
113 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
114 }
115 // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
116 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
117 {
118 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
119 }
120 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
121 {
122 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
123 }
124 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
125 {
126 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
127 }
128 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
129 {
130 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
131 }
132};
133
134//----------------------------------------------------------------------------
135template <class TScalar, unsigned int NDimensions>
136class InverseDisplacementFieldTransform : public DisplacementFieldTransform<TScalar, NDimensions>
137{
138public:
141 typedef DisplacementFieldTransform<TScalar, NDimensions> Superclass;
142 typedef SmartPointer<Self> Pointer;
143 typedef SmartPointer<const Self> ConstPointer;
144
147
150
153 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
154 {
155 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
156 }
157 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
158 {
159 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
160 }
161 void ComputeJacobianWithRespectToParameters(const typename Superclass::IndexType&, typename Superclass::JacobianType&) const override
162 {
163 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
164 }
165 // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
166 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
167 {
168 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
169 }
170 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
171 {
172 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
173 }
174 void ComputeJacobianWithRespectToPosition(const typename Superclass::IndexType&, typename Superclass::JacobianPositionType&) const override
175 {
176 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
177 }
178 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
179 {
180 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
181 }
182 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
183 {
184 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
185 }
186 void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::InputPointType&,
187 typename Superclass::JacobianPositionType&,
188 bool useSVD = false) const override
189 {
190 (void)useSVD; // unused
191 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
192 }
193 void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::IndexType&, typename Superclass::JacobianPositionType&, bool useSVD = false) const override
194 {
195 (void)useSVD; // unused
196 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
197 }
198};
199
200//----------------------------------------------------------------------------
201template <class TScalar, unsigned int NDimensions>
202class InverseThinPlateSplineKernelTransform : public ThinPlateSplineKernelTransform<TScalar, NDimensions>
203{
204public:
207 typedef ThinPlateSplineKernelTransform<TScalar, NDimensions> Superclass;
208 typedef SmartPointer<Self> Pointer;
209 typedef SmartPointer<const Self> ConstPointer;
210
212 itkTypeMacro(InverseThinPlateSplineKernelTransform, ThinPlateSplineKernelTransform);
213
216
219 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
220 {
221 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
222 }
223 void ComputeDeformationContribution(const typename Superclass::InputPointType&, typename Superclass::OutputPointType&) const override
224 {
225 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
226 }
227 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
228 {
229 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
230 }
231 // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
232 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
233 {
234 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
235 }
236 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
237 {
238 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
239 }
240 // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
241 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
242 {
243 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
244 }
245 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
246 {
247 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
248 }
249};
250
251} // namespace itk
252
257
260
263
264#endif
itkTypeMacro(InverseBSplineDeformableTransform, BSplineDeformableTransform)
InverseBSplineDeformableTransform Self
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder > Superclass
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
BSplineTransform< TScalar, NDimensions, VSplineOrder > Superclass
itkTypeMacro(InverseBSplineTransform, BSplineTransform)
SmartPointer< const Self > ConstPointer
void ComputeJacobianFromBSplineWeightsWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::WeightsType &, typename Superclass::ParameterIndexArrayType &) const
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::IndexType &, typename Superclass::JacobianType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::IndexType &, typename Superclass::JacobianPositionType &) const override
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &, bool useSVD=false) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
DisplacementFieldTransform< TScalar, NDimensions > Superclass
InverseDisplacementFieldTransform Self
void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::IndexType &, typename Superclass::JacobianPositionType &, bool useSVD=false) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
itkTypeMacro(InverseDisplacementFieldTransform, DisplacementFieldTransform)
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeDeformationContribution(const typename Superclass::InputPointType &, typename Superclass::OutputPointType &) const override
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
itkTypeMacro(InverseThinPlateSplineKernelTransform, ThinPlateSplineKernelTransform)
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
InverseThinPlateSplineKernelTransform Self
ThinPlateSplineKernelTransform< TScalar, NDimensions > Superclass
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
Simplified inverse ITK transforms.
#define itkExceptionMacro(x)
itk::InverseBSplineTransform< float, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformFloatITKv4Type
itk::InverseBSplineDeformableTransform< double, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformDoubleITKv3Type
itk::InverseDisplacementFieldTransform< float, 3 > InverseDisplacementFieldTransformFloatType
itk::InverseBSplineDeformableTransform< float, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformFloatITKv3Type
itk::InverseBSplineTransform< double, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformDoubleITKv4Type
itk::InverseThinPlateSplineKernelTransform< float, 3 > InverseThinPlateSplineTransformFloatType
itk::InverseDisplacementFieldTransform< double, 3 > InverseDisplacementFieldTransformDoubleType
itk::InverseThinPlateSplineKernelTransform< double, 3 > InverseThinPlateSplineTransformDoubleType