Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
30 namespace itk
31 {
32 
33  //----------------------------------------------------------------------------
34  template <typename TScalar = double, unsigned int NDimensions = 3, unsigned int VSplineOrder = 3>
36  public BSplineTransform<TScalar, NDimensions, VSplineOrder>
37  {
38  public:
41  typedef BSplineTransform<TScalar,NDimensions,VSplineOrder> Superclass;
42  typedef SmartPointer<Self> Pointer;
43  typedef SmartPointer<const Self> ConstPointer;
44 
46  itkTypeMacro( InverseBSplineTransform, BSplineTransform );
47 
49  itkNewMacro( Self );
50 
53  using Superclass::TransformPoint;
54  typename Superclass::OutputPointType TransformPoint(
55  const typename Superclass::InputPointType&) const override
56  {
57  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
58  }
60  const typename Superclass::InputPointType &,
61  typename Superclass::JacobianType &) const override
62  {
63  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
64  }
65  // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
67  const typename Superclass::InputPointType &,
68  typename Superclass::JacobianType &) const override
69  {
70  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
71  }
73  const typename Superclass::InputPointType &,
74  typename Superclass::JacobianPositionType &) const override
75  {
76  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
77  }
78  // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
80  const typename Superclass::InputPointType &,
81  typename Superclass::JacobianType &) const override
82  {
83  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
84  }
86  const typename Superclass::InputPointType &,
87  typename Superclass::InverseJacobianPositionType &) const override
88  {
89  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
90  }
92  const typename Superclass::InputPointType &,
93  typename Superclass::WeightsType &,
94  typename Superclass::ParameterIndexArrayType &) const
95  {
96  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
97  }
98  };
99 
100  //----------------------------------------------------------------------------
101  template <typename TScalar = double, unsigned int NDimensions = 3, unsigned int VSplineOrder = 3>
103  public BSplineDeformableTransform<TScalar, NDimensions, VSplineOrder>
104  {
105  public:
108  typedef BSplineDeformableTransform<TScalar,NDimensions,VSplineOrder> Superclass;
109  typedef SmartPointer<Self> Pointer;
110  typedef SmartPointer<const Self> ConstPointer;
111 
113  itkTypeMacro( InverseBSplineDeformableTransform, BSplineDeformableTransform );
114 
116  itkNewMacro( Self );
117 
120  using Superclass::TransformPoint;
121  typename Superclass::OutputPointType TransformPoint(
122  const typename Superclass::InputPointType&) const override
123  {
124  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
125  }
127  const typename Superclass::InputPointType &,
128  typename Superclass::JacobianType &) const override
129  {
130  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
131  }
132  // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
134  const typename Superclass::InputPointType &,
135  typename Superclass::JacobianType &) const override
136  {
137  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
138  }
140  const typename Superclass::InputPointType &,
141  typename Superclass::JacobianPositionType &) const override
142  {
143  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
144  }
146  const typename Superclass::InputPointType &,
147  typename Superclass::JacobianType &) const override
148  {
149  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
150  }
152  const typename Superclass::InputPointType &,
153  typename Superclass::InverseJacobianPositionType &) const override
154  {
155  itkExceptionMacro( "Only storage methods are implemented for InverseBSplineTransform" );
156  }
157 
158  };
159 
160  //----------------------------------------------------------------------------
161  template <class TScalar, unsigned int NDimensions>
163  public DisplacementFieldTransform<TScalar, NDimensions>
164  {
165  public:
168  typedef DisplacementFieldTransform<TScalar, NDimensions> Superclass;
169  typedef SmartPointer<Self> Pointer;
170  typedef SmartPointer<const Self> ConstPointer;
171 
173  itkTypeMacro( InverseDisplacementFieldTransform, DisplacementFieldTransform );
174 
176  itkNewMacro( Self );
177 
180  typename Superclass::OutputPointType TransformPoint(
181  const typename Superclass::InputPointType&) const override
182  {
183  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
184  }
186  const typename Superclass::InputPointType &,
187  typename Superclass::JacobianType &) const override
188  {
189  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
190  }
192  const typename Superclass::IndexType &,
193  typename Superclass::JacobianType &) const override
194  {
195  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
196  }
197  // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
199  const typename Superclass::InputPointType &,
200  typename Superclass::JacobianType &) const override
201  {
202  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
203  }
205  const typename Superclass::InputPointType &,
206  typename Superclass::JacobianPositionType &) const override
207  {
208  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
209  }
211  const typename Superclass::IndexType &,
212  typename Superclass::JacobianPositionType &) const override
213  {
214  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
215  }
217  const typename Superclass::InputPointType &,
218  typename Superclass::JacobianType &) const override
219  {
220  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
221  }
223  const typename Superclass::InputPointType &,
224  typename Superclass::InverseJacobianPositionType &) const override
225  {
226  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
227  }
229  const typename Superclass::InputPointType &,
230  typename Superclass::JacobianPositionType &,
231  bool useSVD = false ) const override
232  {
233  (void)useSVD; // unused
234  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
235  }
237  const typename Superclass::IndexType &,
238  typename Superclass::JacobianPositionType &,
239  bool useSVD = false ) const override
240  {
241  (void)useSVD; // unused
242  itkExceptionMacro( "Only storage methods are implemented for InverseDisplacementFieldTransform" );
243  }
244  };
245 
246  //----------------------------------------------------------------------------
247  template <class TScalar, unsigned int NDimensions>
249  public ThinPlateSplineKernelTransform<TScalar, NDimensions>
250  {
251  public:
254  typedef ThinPlateSplineKernelTransform<TScalar, NDimensions> Superclass;
255  typedef SmartPointer<Self> Pointer;
256  typedef SmartPointer<const Self> ConstPointer;
257 
259  itkTypeMacro( InverseThinPlateSplineKernelTransform, ThinPlateSplineKernelTransform );
260 
262  itkNewMacro( Self );
263 
266  typename Superclass::OutputPointType TransformPoint(
267  const typename Superclass::InputPointType&) const override
268  {
269  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
270  }
271  void ComputeDeformationContribution(const typename Superclass::InputPointType &,
272  typename Superclass::OutputPointType &) const override
273  {
274  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
275  }
277  const typename Superclass::InputPointType &,
278  typename Superclass::JacobianType &) const override
279  {
280  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
281  }
282  // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
284  const typename Superclass::InputPointType &,
285  typename Superclass::JacobianType &) const override
286  {
287  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
288  }
290  const typename Superclass::InputPointType &,
291  typename Superclass::JacobianPositionType &) const override
292  {
293  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
294  }
295  // Deprecated in ITKv5. It should be removed when ITK_LEGACY_REMOVE is set to ON.
297  const typename Superclass::InputPointType &,
298  typename Superclass::JacobianType &) const override
299  {
300  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
301  }
303  const typename Superclass::InputPointType &,
304  typename Superclass::InverseJacobianPositionType &) const override
305  {
306  itkExceptionMacro( "Only storage methods are implemented for InverseThinPlateSplineKernelTransform" );
307  }
308  };
309 
310 } // end of ITK namespace
311 
316 
319 
322 
323 #endif // __vtkITKTransformInverse_h
SmartPointer< const Self > ConstPointer
#define itkExceptionMacro(x)
itk::InverseBSplineTransform< float, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformFloatITKv4Type
void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &, bool useSVD=false) const override
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
itk::InverseBSplineDeformableTransform< double, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformDoubleITKv3Type
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
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::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
Simplified inverse ITK transforms.
void GetInverseJacobianOfForwardFieldWithRespectToPosition(const typename Superclass::IndexType &, typename Superclass::JacobianPositionType &, bool useSVD=false) const override
itk::InverseThinPlateSplineKernelTransform< float, 3 > InverseThinPlateSplineTransformFloatType
itkTypeMacro(InverseDisplacementFieldTransform, DisplacementFieldTransform)
InverseBSplineDeformableTransform Self
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
BSplineTransform< TScalar, NDimensions, VSplineOrder > Superclass
void ComputeDeformationContribution(const typename Superclass::InputPointType &, typename Superclass::OutputPointType &) const override
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
itkTypeMacro(InverseBSplineDeformableTransform, BSplineDeformableTransform)
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
ThinPlateSplineKernelTransform< TScalar, NDimensions > Superclass
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
itk::InverseDisplacementFieldTransform< float, 3 > InverseDisplacementFieldTransformFloatType
itkTypeMacro(InverseBSplineTransform, BSplineTransform)
void ComputeJacobianWithRespectToPosition(const typename Superclass::IndexType &, typename Superclass::JacobianPositionType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
InverseThinPlateSplineKernelTransform Self
itkTypeMacro(InverseThinPlateSplineKernelTransform, ThinPlateSplineKernelTransform)
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder > Superclass
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianPositionType &) const override
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::IndexType &, typename Superclass::JacobianType &) const override
itk::InverseBSplineTransform< double, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformDoubleITKv4Type
itk::InverseDisplacementFieldTransform< double, 3 > InverseDisplacementFieldTransformDoubleType
InverseDisplacementFieldTransform Self
Superclass::OutputPointType TransformPoint(const typename Superclass::InputPointType &) const override
void ComputeJacobianWithRespectToParameters(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
itk::InverseBSplineDeformableTransform< float, VTKDimension, BSPLINE_TRANSFORM_ORDER > InverseBSplineTransformFloatITKv3Type
void ComputeInverseJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::InverseJacobianPositionType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
void ComputeJacobianWithRespectToPosition(const typename Superclass::InputPointType &, typename Superclass::JacobianType &) const override
DisplacementFieldTransform< TScalar, NDimensions > Superclass
itk::InverseThinPlateSplineKernelTransform< double, 3 > InverseThinPlateSplineTransformDoubleType