go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedTransform.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/*=========================================================================
19
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkTransform.h,v $
22 Language: C++
23 Date: $Date: 2008-06-29 12:58:58 $
24 Version: $Revision: 1.64 $
25
26 Copyright (c) Insight Software Consortium. All rights reserved.
27 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28
29 This software is distributed WITHOUT ANY WARRANTY; without even
30 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31 PURPOSE. See the above copyright notices for more information.
32
33=========================================================================*/
34#ifndef __itkAdvancedTransform_h
35#define __itkAdvancedTransform_h
36
37#include "itkTransform.h"
38#include "itkMatrix.h"
39#include "itkFixedArray.h"
40
41namespace itk
42{
43
82template< class TScalarType,
83unsigned int NInputDimensions = 3,
84unsigned int NOutputDimensions = 3 >
86 public Transform< TScalarType, NInputDimensions, NOutputDimensions >
87{
88public:
89
92 typedef Transform< TScalarType,
93 NInputDimensions,
94 NOutputDimensions > Superclass;
96 typedef SmartPointer< const Self > ConstPointer;
97
99 //itkNewMacro( Self );
100
102 itkTypeMacro( AdvancedTransform, Transform );
103
105 itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
106 itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
107
109 typedef typename Superclass::ScalarType ScalarType;
110 typedef typename Superclass::ParametersType ParametersType;
111 typedef typename Superclass::FixedParametersType FixedParametersType;
112 typedef typename Superclass::ParametersValueType ParametersValueType;
113 typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
114 typedef typename Superclass::DerivativeType DerivativeType;
115 typedef typename Superclass::JacobianType JacobianType;
116 typedef typename Superclass::InputVectorType InputVectorType;
117 typedef typename Superclass::OutputVectorType OutputVectorType;
118 typedef typename Superclass
119 ::InputCovariantVectorType InputCovariantVectorType;
120 typedef typename Superclass
121 ::OutputCovariantVectorType OutputCovariantVectorType;
122 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
123 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
124 typedef typename Superclass::InputPointType InputPointType;
125 typedef typename Superclass::OutputPointType OutputPointType;
126
127 typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
128 typedef typename Superclass::InverseTransformBasePointer InverseTransformBasePointer;
129
131 typedef Transform< TScalarType,
132 NInputDimensions,
133 NOutputDimensions > TransformType;
134 typedef typename TransformType::Pointer TransformTypePointer;
135 typedef typename TransformType::ConstPointer TransformTypeConstPointer;
136
141 typedef std::vector< unsigned long > NonZeroJacobianIndicesType;
142 typedef Matrix< ScalarType,
143 OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType;
144 typedef std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType;
145 // \todo: think about the SpatialHessian type, should be a 3D native type
146 typedef FixedArray<
147 Matrix< ScalarType,
148 InputSpaceDimension, InputSpaceDimension >,
149 OutputSpaceDimension > SpatialHessianType;
150 typedef std::vector< SpatialHessianType > JacobianOfSpatialHessianType;
151 typedef typename SpatialJacobianType::InternalMatrixType InternalMatrixType;
152
159 typedef typename MovingImageGradientType::ValueType MovingImageGradientValueType;
160
163
165 itkGetConstMacro( HasNonZeroSpatialHessian, bool );
166 itkGetConstMacro( HasNonZeroJacobianOfSpatialHessian, bool );
167
194 virtual void GetJacobian(
195 const InputPointType & ipp,
196 JacobianType & j,
197 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
198
203 const InputPointType & ipp,
204 const MovingImageGradientType & movingImageGradient,
205 DerivativeType & imageJacobian,
206 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
207
234 virtual void GetSpatialJacobian(
235 const InputPointType & ipp,
236 SpatialJacobianType & sj ) const = 0;
237
240 const InputPointType & itkNotUsed( p ), JacobianType & itkNotUsed( j ) ) const override
241 {
242 itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
243 }
244
245
262 virtual void GetSpatialHessian(
263 const InputPointType & ipp,
264 SpatialHessianType & sh ) const = 0;
265
273 const InputPointType & ipp,
275 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
276
281 const InputPointType & ipp,
284 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
285
293 const InputPointType & ipp,
295 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
296
301 const InputPointType & ipp,
304 NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
305
306protected:
307
310 ~AdvancedTransform() override {}
311
314
315private:
316
317 AdvancedTransform( const Self & ); // purposely not implemented
318 void operator=( const Self & ); // purposely not implemented
319
320};
321
322} // end namespace itk
323
324#ifndef ITK_MANUAL_INSTANTIATION
325#include "itkAdvancedTransform.hxx"
326#endif
327
328#endif
Transform maps points, vectors and covariant vectors from an input space to an output space.
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::ParametersValueType ParametersValueType
Superclass::OutputVectorType OutputVectorType
MovingImageGradientType::ValueType MovingImageGradientValueType
Superclass::ParametersType ParametersType
SpatialJacobianType::InternalMatrixType InternalMatrixType
virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices(void) const
SmartPointer< Self > Pointer
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::DerivativeType DerivativeType
virtual void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const =0
SmartPointer< const Self > ConstPointer
void operator=(const Self &)
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
Superclass::OutputVnlVectorType OutputVnlVectorType
AdvancedTransform(NumberOfParametersType numberOfParameters)
Superclass::NumberOfParametersType NumberOfParametersType
Superclass::InputVectorType InputVectorType
void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const override
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Superclass::FixedParametersType FixedParametersType
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
TransformType::Pointer TransformTypePointer
Superclass::OutputPointType OutputPointType
Superclass::JacobianType JacobianType
virtual void EvaluateJacobianWithImageGradientProduct(const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Transform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
virtual void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const =0
Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType
Superclass::InverseTransformBasePointer InverseTransformBasePointer
AdvancedTransform(const Self &)
OutputCovariantVectorType MovingImageGradientType
TransformType::ConstPointer TransformTypeConstPointer
Superclass::InverseTransformBaseType InverseTransformBaseType
Superclass::InputPointType InputPointType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
virtual void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions)
Superclass::ScalarType ScalarType
Superclass::InputVnlVectorType InputVnlVectorType
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
std::vector< unsigned long > NonZeroJacobianIndicesType


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo