Slicer 5.11
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#if !defined(ITK_LEGACY_REMOVE)
62 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
63 {
64 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
65 }
66#endif
67 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
68 {
69 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
70 }
71#if !defined(ITK_LEGACY_REMOVE)
72 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
73 {
74 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
75 }
76#endif
77 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
78 {
79 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
80 }
81 void ComputeJacobianFromBSplineWeightsWithRespectToPosition(const typename Superclass::InputPointType&,
82 typename Superclass::WeightsType&,
83 typename Superclass::ParameterIndexArrayType&) const
84 {
85 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
86 }
87};
88
89//----------------------------------------------------------------------------
90template <typename TScalar = double, unsigned int NDimensions = 3, unsigned int VSplineOrder = 3>
91class InverseBSplineDeformableTransform : public BSplineDeformableTransform<TScalar, NDimensions, VSplineOrder>
92{
93public:
96 typedef BSplineDeformableTransform<TScalar, NDimensions, VSplineOrder> Superclass;
97 typedef SmartPointer<Self> Pointer;
98 typedef SmartPointer<const Self> ConstPointer;
99
102
105
108 using Superclass::TransformPoint;
109 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
110 {
111 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
112 }
113 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
114 {
115 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
116 }
117#if !defined(ITK_LEGACY_REMOVE)
118 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
119 {
120 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
121 }
122#endif
123 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
124 {
125 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
126 }
127#if !defined(ITK_LEGACY_REMOVE)
128 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
129 {
130 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
131 }
132#endif
133 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
134 {
135 itkExceptionMacro("Only storage methods are implemented for InverseBSplineTransform");
136 }
137};
138
139//----------------------------------------------------------------------------
140template <class TScalar, unsigned int NDimensions>
141class InverseDisplacementFieldTransform : public DisplacementFieldTransform<TScalar, NDimensions>
142{
143public:
146 typedef DisplacementFieldTransform<TScalar, NDimensions> Superclass;
147 typedef SmartPointer<Self> Pointer;
148 typedef SmartPointer<const Self> ConstPointer;
149
152
155
158 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
159 {
160 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
161 }
162 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
163 {
164 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
165 }
166 void ComputeJacobianWithRespectToParameters(const typename Superclass::IndexType&, typename Superclass::JacobianType&) const override
167 {
168 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
169 }
170#if !defined(ITK_LEGACY_REMOVE)
171 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
172 {
173 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
174 }
175#endif
176 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
177 {
178 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
179 }
180 void ComputeJacobianWithRespectToPosition(const typename Superclass::IndexType&, typename Superclass::JacobianPositionType&) const override
181 {
182 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
183 }
184#if !defined(ITK_LEGACY_REMOVE)
185 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
186 {
187 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
188 }
189#endif
190 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
191 {
192 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
193 }
194 void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::InputPointType&,
195 typename Superclass::JacobianPositionType&,
196 bool useSVD = false) const override
197 {
198 (void)useSVD; // unused
199 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
200 }
201 void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::IndexType&, typename Superclass::JacobianPositionType&, bool useSVD = false) const override
202 {
203 (void)useSVD; // unused
204 itkExceptionMacro("Only storage methods are implemented for InverseDisplacementFieldTransform");
205 }
206};
207
208//----------------------------------------------------------------------------
209template <class TScalar, unsigned int NDimensions>
210class InverseThinPlateSplineKernelTransform : public ThinPlateSplineKernelTransform<TScalar, NDimensions>
211{
212public:
215 typedef ThinPlateSplineKernelTransform<TScalar, NDimensions> Superclass;
216 typedef SmartPointer<Self> Pointer;
217 typedef SmartPointer<const Self> ConstPointer;
218
220 itkTypeMacro(InverseThinPlateSplineKernelTransform, ThinPlateSplineKernelTransform);
221
224
227 typename Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType&) const override
228 {
229 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
230 }
231 void ComputeDeformationContribution(const typename Superclass::InputPointType&, typename Superclass::OutputPointType&) const override
232 {
233 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
234 }
235 void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
236 {
237 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
238 }
239#if !defined(ITK_LEGACY_REMOVE)
240 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
241 {
242 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
243 }
244#endif
245 void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianPositionType&) const override
246 {
247 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
248 }
249#if !defined(ITK_LEGACY_REMOVE)
250 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::JacobianType&) const override
251 {
252 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
253 }
254#endif
255 void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType&, typename Superclass::InverseJacobianPositionType&) const override
256 {
257 itkExceptionMacro("Only storage methods are implemented for InverseThinPlateSplineKernelTransform");
258 }
259};
260
261} // namespace itk
262
267
270
273
274#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