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 
41 namespace itk
42 {
43 
82 template< class TScalarType,
83 unsigned int NInputDimensions = 3,
84 unsigned int NOutputDimensions = 3 >
86  public Transform< TScalarType, NInputDimensions, NOutputDimensions >
87 {
88 public:
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
241  {
242  itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
243  }
244 
245 
247  const InputPointType & itkNotUsed( p ), JacobianType & itkNotUsed( j ) ) const
248  {
249  itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
250  }
251 
252 
269  virtual void GetSpatialHessian(
270  const InputPointType & ipp,
271  SpatialHessianType & sh ) const = 0;
272 
280  const InputPointType & ipp,
282  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
283 
288  const InputPointType & ipp,
289  SpatialJacobianType & sj,
291  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
292 
300  const InputPointType & ipp,
302  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
303 
308  const InputPointType & ipp,
309  SpatialHessianType & sh,
311  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
312 
313 protected:
314 
317  virtual ~AdvancedTransform() {}
318 
321 
322 private:
323 
324  AdvancedTransform( const Self & ); // purposely not implemented
325  void operator=( const Self & ); // purposely not implemented
326 
327 };
328 
329 } // end namespace itk
330 
331 #ifndef ITK_MANUAL_INSTANTIATION
332 #include "itkAdvancedTransform.hxx"
333 #endif
334 
335 #endif
itk::AdvancedTransform::AdvancedTransform
AdvancedTransform(const Self &)
itk::AdvancedTransform::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedTransform.h:125
itk::AdvancedTransform::ComputeJacobianWithRespectToParameters
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const
Definition: itkAdvancedTransform.h:239
itk::AdvancedTransform::GetJacobianOfSpatialJacobian
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
itk::AdvancedTransform::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition: itkAdvancedTransform.h:143
itk::AdvancedTransform::MovingImageGradientType
OutputCovariantVectorType MovingImageGradientType
Definition: itkAdvancedTransform.h:158
itk::AdvancedTransform::InputCovariantVectorType
Superclass ::InputCovariantVectorType InputCovariantVectorType
Definition: itkAdvancedTransform.h:119
itk::AdvancedTransform::InputPointType
Superclass::InputPointType InputPointType
Definition: itkAdvancedTransform.h:124
SmartPointer< Self >
itk::AdvancedTransform::InputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkAdvancedTransform.h:122
itk::AdvancedTransform::GetSpatialHessian
virtual void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const =0
itk::AdvancedTransform::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Definition: itkAdvancedTransform.h:150
itk::AdvancedTransform::Pointer
SmartPointer< Self > Pointer
Definition: itkAdvancedTransform.h:95
itk::AdvancedTransform::GetJacobian
virtual void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
itk::AdvancedTransform::InverseTransformBasePointer
Superclass::InverseTransformBasePointer InverseTransformBasePointer
Definition: itkAdvancedTransform.h:128
itk::AdvancedTransform::Self
AdvancedTransform Self
Definition: itkAdvancedTransform.h:91
itk::AdvancedTransform::AdvancedTransform
AdvancedTransform(NumberOfParametersType numberOfParameters)
itk::AdvancedTransform::ScalarType
Superclass::ScalarType ScalarType
Definition: itkAdvancedTransform.h:109
itk::AdvancedTransform::TransformType
Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType
Definition: itkAdvancedTransform.h:133
itk::AdvancedTransform::Superclass
Transform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Definition: itkAdvancedTransform.h:94
itk::AdvancedTransform::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
itk::AdvancedTransform::GetJacobianOfSpatialHessian
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
itk::AdvancedTransform::GetNumberOfNonZeroJacobianIndices
virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices(void) const
itk::AdvancedTransform::JacobianType
Superclass::JacobianType JacobianType
Definition: itkAdvancedTransform.h:115
itk::AdvancedTransform
Transform maps points, vectors and covariant vectors from an input space to an output space.
Definition: itkAdvancedTransform.h:87
itk::AdvancedTransform::operator=
void operator=(const Self &)
itk::AdvancedTransform::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions)
itk::AdvancedTransform::GetJacobianOfSpatialJacobian
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
itk::AdvancedTransform::MovingImageGradientValueType
MovingImageGradientType::ValueType MovingImageGradientValueType
Definition: itkAdvancedTransform.h:159
itk::AdvancedTransform::InternalMatrixType
SpatialJacobianType::InternalMatrixType InternalMatrixType
Definition: itkAdvancedTransform.h:151
itk::AdvancedTransform::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Definition: itkAdvancedTransform.h:149
itk::AdvancedTransform::InputVectorType
Superclass::InputVectorType InputVectorType
Definition: itkAdvancedTransform.h:116
itk::AdvancedTransform::EvaluateJacobianWithImageGradientProduct
virtual void EvaluateJacobianWithImageGradientProduct(const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
itk::AdvancedTransform::GetSpatialJacobian
virtual void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const =0
itk::AdvancedTransform::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkAdvancedTransform.h:114
itk::AdvancedTransform::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Definition: itkAdvancedTransform.h:144
itk::AdvancedTransform::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition: itkAdvancedTransform.h:141
itk::AdvancedTransform::~AdvancedTransform
virtual ~AdvancedTransform()
Definition: itkAdvancedTransform.h:317
itk::AdvancedTransform::ComputeJacobianWithRespectToPosition
virtual void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianType &) const
Definition: itkAdvancedTransform.h:246
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::AdvancedTransform::OutputVectorType
Superclass::OutputVectorType OutputVectorType
Definition: itkAdvancedTransform.h:117
itk::AdvancedTransform::ParametersValueType
Superclass::ParametersValueType ParametersValueType
Definition: itkAdvancedTransform.h:112
itk::AdvancedTransform::NumberOfParametersType
Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkAdvancedTransform.h:113
itk::AdvancedTransform::InverseTransformBaseType
Superclass::InverseTransformBaseType InverseTransformBaseType
Definition: itkAdvancedTransform.h:127
itk::AdvancedTransform::TransformTypePointer
TransformType::Pointer TransformTypePointer
Definition: itkAdvancedTransform.h:134
itk::AdvancedTransform::m_HasNonZeroJacobianOfSpatialHessian
bool m_HasNonZeroJacobianOfSpatialHessian
Definition: itkAdvancedTransform.h:320
TScalarType
itk::AdvancedTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAdvancedTransform.h:96
itk::AdvancedTransform::GetJacobianOfSpatialHessian
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
itk::AdvancedTransform::ParametersType
Superclass::ParametersType ParametersType
Definition: itkAdvancedTransform.h:110
itk::AdvancedTransform::TransformTypeConstPointer
TransformType::ConstPointer TransformTypeConstPointer
Definition: itkAdvancedTransform.h:135
itk::AdvancedTransform::OutputVnlVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkAdvancedTransform.h:123
itk::AdvancedTransform::AdvancedTransform
AdvancedTransform()
itk::AdvancedTransform::OutputCovariantVectorType
Superclass ::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkAdvancedTransform.h:121
itk::AdvancedTransform::m_HasNonZeroSpatialHessian
bool m_HasNonZeroSpatialHessian
Definition: itkAdvancedTransform.h:319
itk::AdvancedTransform::FixedParametersType
Superclass::FixedParametersType FixedParametersType
Definition: itkAdvancedTransform.h:111


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo