go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkDeformationFieldInterpolatingTransform.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 #ifndef __itkDeformationFieldInterpolatingTransform_h
19 #define __itkDeformationFieldInterpolatingTransform_h
20 
21 #include <iostream>
22 #include "itkAdvancedTransform.h"
23 #include "itkExceptionObject.h"
24 #include "itkImage.h"
25 #include "itkVectorInterpolateImageFunction.h"
26 #include "itkVectorNearestNeighborInterpolateImageFunction.h"
27 
28 namespace itk
29 {
30 
42 template<
43 class TScalarType = double, // Data type for scalars (float or double)
44 unsigned int NDimensions = 3, // Number of input dimensions
45 class TComponentType = double >
46 // ComponentType of the deformation field
48  public AdvancedTransform< TScalarType, NDimensions, NDimensions >
49 {
50 public:
51 
56  typedef SmartPointer< const Self > ConstPointer;
57 
59  itkNewMacro( Self );
60 
63 
65  itkStaticConstMacro( InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension );
66  itkStaticConstMacro( OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension );
67 
86 
88 
89  typedef TComponentType DeformationFieldComponentType;
90  typedef Vector< DeformationFieldComponentType,
91  itkGetStaticConstMacro( OutputSpaceDimension ) > DeformationFieldVectorType;
93  itkGetStaticConstMacro( InputSpaceDimension ) > DeformationFieldType;
94  typedef typename DeformationFieldType::Pointer DeformationFieldPointer;
95 
96  typedef VectorInterpolateImageFunction<
98  typedef typename DeformationFieldInterpolatorType::Pointer DeformationFieldInterpolatorPointer;
99  typedef VectorNearestNeighborInterpolateImageFunction<
101 
105  virtual void SetParameters( const ParametersType & )
106  {
107  itkExceptionMacro( << "ERROR: SetParameters() is not implemented "
108  << "for DeformationFieldInterpolatingTransform.\n"
109  << "Use SetDeformationField() instead.\n"
110  << "Note that this transform is NOT suited for image registration.\n"
111  << "Just use it as an (initial) fixed transform that is not optimized." );
112  }
113 
114 
116  virtual void SetFixedParameters( const ParametersType & )
117  {
118  // This transform has no fixed parameters.
119  }
120 
121 
123  virtual const ParametersType & GetFixedParameters( void ) const
124  {
125  // This transform has no fixed parameters.
126  return this->m_FixedParameters;
127  }
128 
129 
134 
137  {
138  itkExceptionMacro(
139  << "TransformVector(const InputVectorType &) is not implemented "
140  << "for DeformationFieldInterpolatingTransform" );
141  }
142 
143 
145  {
146  itkExceptionMacro(
147  << "TransformVector(const InputVnlVectorType &) is not implemented "
148  << "for DeformationFieldInterpolatingTransform" );
149  }
150 
151 
153  {
154  itkExceptionMacro(
155  << "TransformCovariantVector(const InputCovariantVectorType &) is not implemented "
156  << "for DeformationFieldInterpolatingTransform" );
157  }
158 
159 
162  void SetIdentity( void );
163 
166 
167  itkGetObjectMacro( DeformationField, DeformationFieldType );
168 
171 
172  itkGetObjectMacro( DeformationFieldInterpolator, DeformationFieldInterpolatorType );
173 
174  virtual bool IsLinear( void ) const { return false; }
175 
177  virtual void GetJacobian(
178  const InputPointType & ipp, JacobianType & j,
179  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
180  {
181  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
182  }
183 
184 
185  virtual void GetSpatialJacobian(
186  const InputPointType & ipp, SpatialJacobianType & sj ) const
187  {
188  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
189  }
190 
191 
192  virtual void GetSpatialHessian(
193  const InputPointType & ipp, SpatialHessianType & sh ) const
194  {
195  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
196  }
197 
198 
201  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
202  {
203  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
204  }
205 
206 
208  const InputPointType & ipp, SpatialJacobianType & sj,
210  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
211  {
212  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
213  }
214 
215 
217  const InputPointType & ipp, JacobianOfSpatialHessianType & jsh,
218  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
219  {
220  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
221  }
222 
223 
225  const InputPointType & ipp, SpatialHessianType & sh,
227  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const
228  {
229  itkExceptionMacro( << "Not implemented for DeformationFieldInterpolatingTransform" );
230  }
231 
232 
233 protected:
234 
237 
239  typedef typename DeformationFieldInterpolatorType::ContinuousIndexType
241  typedef typename DeformationFieldInterpolatorType::OutputType InterpolatorOutputType;
242 
244  void PrintSelf( std::ostream & os, Indent indent ) const;
245 
249 
250 private:
251 
252  DeformationFieldInterpolatingTransform( const Self & ); // purposely not implemented
253  void operator=( const Self & ); // purposely not implemented
254 
255 };
256 
257 } // namespace itk
258 
259 #ifndef ITK_MANUAL_INSTANTIATION
260 #include "itkDeformationFieldInterpolatingTransform.hxx"
261 #endif
262 
263 #endif /* __itkDeformationFieldInterpolatingTransform_h */
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedTransform.h:125
itk::DeformationFieldInterpolatingTransform::DeformationFieldVectorType
Vector< DeformationFieldComponentType, itkGetStaticConstMacro(OutputSpaceDimension) > DeformationFieldVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:91
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Definition: itkAdvancedTransform.h:143
itk::DeformationFieldInterpolatingTransform::SetIdentity
void SetIdentity(void)
itkAdvancedTransform.h
itk::DeformationFieldInterpolatingTransform::GetSpatialJacobian
virtual void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const
Definition: itkDeformationFieldInterpolatingTransform.h:185
itk::DeformationFieldInterpolatingTransform::DeformationFieldPointer
DeformationFieldType::Pointer DeformationFieldPointer
Definition: itkDeformationFieldInterpolatingTransform.h:94
itk::DeformationFieldInterpolatingTransform::m_DeformationField
DeformationFieldPointer m_DeformationField
Definition: itkDeformationFieldInterpolatingTransform.h:246
itk::DeformationFieldInterpolatingTransform::DeformationFieldInterpolatingTransform
DeformationFieldInterpolatingTransform(const Self &)
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::InputCovariantVectorType
Superclass ::InputCovariantVectorType InputCovariantVectorType
Definition: itkAdvancedTransform.h:119
itk::DeformationFieldInterpolatingTransform::TransformVector
virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const
Definition: itkDeformationFieldInterpolatingTransform.h:144
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::InputPointType
Superclass::InputPointType InputPointType
Definition: itkAdvancedTransform.h:124
SmartPointer< Self >
itk::DeformationFieldInterpolatingTransform::InterpolatorOutputType
DeformationFieldInterpolatorType::OutputType InterpolatorOutputType
Definition: itkDeformationFieldInterpolatingTransform.h:241
itk::DeformationFieldInterpolatingTransform::operator=
void operator=(const Self &)
itk::DeformationFieldInterpolatingTransform::JacobianType
Superclass::JacobianType JacobianType
Definition: itkDeformationFieldInterpolatingTransform.h:72
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::InputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkAdvancedTransform.h:122
itk::DeformationFieldInterpolatingTransform::DefaultDeformationFieldInterpolatorType
VectorNearestNeighborInterpolateImageFunction< DeformationFieldType, ScalarType > DefaultDeformationFieldInterpolatorType
Definition: itkDeformationFieldInterpolatingTransform.h:100
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialJacobian
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Definition: itkDeformationFieldInterpolatingTransform.h:207
itk::DeformationFieldInterpolatingTransform::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::DeformationFieldInterpolatingTransform::SetDeformationField
virtual void SetDeformationField(DeformationFieldType *_arg)
itk::DeformationFieldInterpolatingTransform::~DeformationFieldInterpolatingTransform
~DeformationFieldInterpolatingTransform()
itk::DeformationFieldInterpolatingTransform::itkStaticConstMacro
itkStaticConstMacro(OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension)
itk::DeformationFieldInterpolatingTransform::itkStaticConstMacro
itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension)
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::JacobianOfSpatialHessianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Definition: itkAdvancedTransform.h:150
itk::DeformationFieldInterpolatingTransform::Superclass
AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass
Definition: itkDeformationFieldInterpolatingTransform.h:54
itk::DeformationFieldInterpolatingTransform::SetParameters
virtual void SetParameters(const ParametersType &)
Definition: itkDeformationFieldInterpolatingTransform.h:105
itk::DeformationFieldInterpolatingTransform::OutputVnlVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:78
itk::DeformationFieldInterpolatingTransform::GetSpatialHessian
virtual void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const
Definition: itkDeformationFieldInterpolatingTransform.h:192
Image
itk::DeformationFieldInterpolatingTransform
Transform that interpolates a given deformation field.
Definition: itkDeformationFieldInterpolatingTransform.h:49
itk::DeformationFieldInterpolatingTransform::TransformPoint
OutputPointType TransformPoint(const InputPointType &point) const
itk::DeformationFieldInterpolatingTransform::GetFixedParameters
virtual const ParametersType & GetFixedParameters(void) const
Definition: itkDeformationFieldInterpolatingTransform.h:123
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::ScalarType
Superclass::ScalarType ScalarType
Definition: itkAdvancedTransform.h:109
itk::DeformationFieldInterpolatingTransform::TransformVector
virtual OutputVectorType TransformVector(const InputVectorType &) const
Definition: itkDeformationFieldInterpolatingTransform.h:136
itk::DeformationFieldInterpolatingTransform::DeformationFieldInterpolatorType
VectorInterpolateImageFunction< DeformationFieldType, ScalarType > DeformationFieldInterpolatorType
Definition: itkDeformationFieldInterpolatingTransform.h:97
itk::DeformationFieldInterpolatingTransform::SpatialJacobianType
Superclass::SpatialJacobianType SpatialJacobianType
Definition: itkDeformationFieldInterpolatingTransform.h:83
itk::DeformationFieldInterpolatingTransform::SetDeformationFieldInterpolator
virtual void SetDeformationFieldInterpolator(DeformationFieldInterpolatorType *_arg)
itk::DeformationFieldInterpolatingTransform::InputVectorType
Superclass::InputVectorType InputVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:73
itk::DeformationFieldInterpolatingTransform::InputVnlVectorType
Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:77
itk::DeformationFieldInterpolatingTransform::JacobianOfSpatialJacobianType
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
Definition: itkDeformationFieldInterpolatingTransform.h:85
itk::DeformationFieldInterpolatingTransform::InputCovariantVectorType
Superclass::InputCovariantVectorType InputCovariantVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:75
itk::DeformationFieldInterpolatingTransform::DeformationFieldInterpolatorPointer
DeformationFieldInterpolatorType::Pointer DeformationFieldInterpolatorPointer
Definition: itkDeformationFieldInterpolatingTransform.h:98
itk::DeformationFieldInterpolatingTransform::GetJacobian
virtual void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Definition: itkDeformationFieldInterpolatingTransform.h:177
double
itk::DeformationFieldInterpolatingTransform::DeformationFieldType
Image< DeformationFieldVectorType, itkGetStaticConstMacro(InputSpaceDimension) > DeformationFieldType
Definition: itkDeformationFieldInterpolatingTransform.h:93
itk::DeformationFieldInterpolatingTransform::InternalMatrixType
Superclass::InternalMatrixType InternalMatrixType
Definition: itkDeformationFieldInterpolatingTransform.h:87
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::JacobianType
Superclass::JacobianType JacobianType
Definition: itkAdvancedTransform.h:115
itk::DeformationFieldInterpolatingTransform::m_DeformationFieldInterpolator
DeformationFieldInterpolatorPointer m_DeformationFieldInterpolator
Definition: itkDeformationFieldInterpolatingTransform.h:248
itk::AdvancedTransform
Transform maps points, vectors and covariant vectors from an input space to an output space.
Definition: itkAdvancedTransform.h:87
itk::DeformationFieldInterpolatingTransform::DeformationFieldInterpolatingTransform
DeformationFieldInterpolatingTransform()
itk::DeformationFieldInterpolatingTransform::InputContinuousIndexType
DeformationFieldInterpolatorType::ContinuousIndexType InputContinuousIndexType
Definition: itkDeformationFieldInterpolatingTransform.h:240
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::InternalMatrixType
SpatialJacobianType::InternalMatrixType InternalMatrixType
Definition: itkAdvancedTransform.h:151
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::SpatialHessianType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Definition: itkAdvancedTransform.h:149
itk::DeformationFieldInterpolatingTransform::NumberOfParametersType
Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkDeformationFieldInterpolatingTransform.h:71
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::InputVectorType
Superclass::InputVectorType InputVectorType
Definition: itkAdvancedTransform.h:116
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialHessian
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Definition: itkDeformationFieldInterpolatingTransform.h:224
itk::DeformationFieldInterpolatingTransform::JacobianOfSpatialHessianType
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
Definition: itkDeformationFieldInterpolatingTransform.h:84
itk::DeformationFieldInterpolatingTransform::SpatialHessianType
Superclass::SpatialHessianType SpatialHessianType
Definition: itkDeformationFieldInterpolatingTransform.h:82
itk::DeformationFieldInterpolatingTransform::IsLinear
virtual bool IsLinear(void) const
Definition: itkDeformationFieldInterpolatingTransform.h:174
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialHessian
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Definition: itkDeformationFieldInterpolatingTransform.h:216
itk::DeformationFieldInterpolatingTransform::Pointer
SmartPointer< Self > Pointer
Definition: itkDeformationFieldInterpolatingTransform.h:55
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::JacobianOfSpatialJacobianType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
Definition: itkAdvancedTransform.h:144
itk::DeformationFieldInterpolatingTransform::NonZeroJacobianIndicesType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkDeformationFieldInterpolatingTransform.h:81
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::NonZeroJacobianIndicesType
std::vector< unsigned long > NonZeroJacobianIndicesType
Definition: itkAdvancedTransform.h:141
itk::DeformationFieldInterpolatingTransform::Self
DeformationFieldInterpolatingTransform Self
Definition: itkDeformationFieldInterpolatingTransform.h:53
itk::DeformationFieldInterpolatingTransform::m_ZeroDeformationField
DeformationFieldPointer m_ZeroDeformationField
Definition: itkDeformationFieldInterpolatingTransform.h:247
itk::DeformationFieldInterpolatingTransform::GetJacobianOfSpatialJacobian
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Definition: itkDeformationFieldInterpolatingTransform.h:199
itk::DeformationFieldInterpolatingTransform::OutputCovariantVectorType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:76
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::OutputVectorType
Superclass::OutputVectorType OutputVectorType
Definition: itkAdvancedTransform.h:117
itk::DeformationFieldInterpolatingTransform::InputPointType
Superclass::InputPointType InputPointType
Definition: itkDeformationFieldInterpolatingTransform.h:79
itk::DeformationFieldInterpolatingTransform::ScalarType
Superclass::ScalarType ScalarType
Definition: itkDeformationFieldInterpolatingTransform.h:69
itk::DeformationFieldInterpolatingTransform::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkDeformationFieldInterpolatingTransform.h:80
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::NumberOfParametersType
Superclass::NumberOfParametersType NumberOfParametersType
Definition: itkAdvancedTransform.h:113
itk::DeformationFieldInterpolatingTransform::ParametersType
Superclass::ParametersType ParametersType
Definition: itkDeformationFieldInterpolatingTransform.h:70
itk::DeformationFieldInterpolatingTransform::OutputVectorType
Superclass::OutputVectorType OutputVectorType
Definition: itkDeformationFieldInterpolatingTransform.h:74
TScalarType
itk::DeformationFieldInterpolatingTransform::DeformationFieldComponentType
TComponentType DeformationFieldComponentType
Definition: itkDeformationFieldInterpolatingTransform.h:89
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::ParametersType
Superclass::ParametersType ParametersType
Definition: itkAdvancedTransform.h:110
itk::DeformationFieldInterpolatingTransform::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkDeformationFieldInterpolatingTransform.h:56
itk::DeformationFieldInterpolatingTransform::TransformCovariantVector
virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const
Definition: itkDeformationFieldInterpolatingTransform.h:152
itk::DeformationFieldInterpolatingTransform::SetFixedParameters
virtual void SetFixedParameters(const ParametersType &)
Definition: itkDeformationFieldInterpolatingTransform.h:116
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::OutputVnlVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkAdvancedTransform.h:123
itk::AdvancedTransform< TScalarType, NDimensions, NDimensions >::OutputCovariantVectorType
Superclass ::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkAdvancedTransform.h:121


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo