go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedCombinationTransform.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 __itkAdvancedCombinationTransform_h
19 #define __itkAdvancedCombinationTransform_h
20 
21 #include "itkAdvancedTransform.h"
22 #include "itkMacro.h"
23 
24 namespace itk
25 {
26 
55 template< typename TScalarType, unsigned int NDimensions = 3 >
57  public AdvancedTransform< TScalarType, NDimensions, NDimensions >
58 {
59 public:
60 
63  typedef AdvancedTransform< TScalarType,
64  NDimensions, NDimensions > Superclass;
65  typedef SmartPointer< Self > Pointer;
66  typedef SmartPointer< const Self > ConstPointer;
67 
69  itkNewMacro( Self );
70 
73 
75  itkStaticConstMacro( SpaceDimension, unsigned int, NDimensions );
76 
101  typedef typename Superclass::TransformCategoryEnum TransformCategoryEnum;
104 
107  typedef typename TransformType::Pointer TransformTypePointer;
108  typedef typename TransformType::ConstPointer TransformTypeConstPointer;
109 
118 
127 
130 
132 
138 
140 
142  virtual SizeValueType GetNumberOfTransforms( void ) const;
143 
148  virtual const TransformTypePointer GetNthTransform( SizeValueType n ) const;
149 
151  virtual void SetUseComposition( bool _arg );
152 
153  itkGetConstMacro( UseComposition, bool );
154 
156  virtual void SetUseAddition( bool _arg );
157 
158  itkGetConstMacro( UseAddition, bool );
159 
161  OutputPointType TransformPoint( const InputPointType & point ) const override;
162 
168  {
169  itkExceptionMacro(
170  << "TransformVector(const InputVectorType &) is not implemented "
171  << "for AdvancedCombinationTransform" );
172  }
173 
174 
176  {
177  itkExceptionMacro(
178  << "TransformVector(const InputVnlVectorType &) is not implemented "
179  << "for AdvancedCombinationTransform" );
180  }
181 
182 
184  {
185  itkExceptionMacro(
186  << "TransformCovariantVector(const InputCovariantVectorType &) is not implemented "
187  << "for AdvancedCombinationTransform" );
188  }
189 
190 
193 
196 
198  const ParametersType & GetParameters( void ) const override;
199 
201  const FixedParametersType & GetFixedParameters( void ) const override;
202 
204  void SetParameters( const ParametersType & param ) override;
205 
209  void SetParametersByValue( const ParametersType & param ) override;
210 
212  void SetFixedParameters( const FixedParametersType & fixedParam ) override;
213 
224  virtual bool GetInverse( Self * inverse ) const;
225 
228  bool IsLinear( void ) const override;
229 
235 
237  bool GetHasNonZeroSpatialHessian( void ) const override;
238 
239  virtual bool HasNonZeroJacobianOfSpatialHessian( void ) const;
240 
243  const InputPointType & ipp,
244  JacobianType & j,
245  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override;
246 
249  const InputPointType & ipp,
250  const MovingImageGradientType & movingImageGradient,
251  DerivativeType & imageJacobian,
252  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override;
253 
256  const InputPointType & ipp,
257  SpatialJacobianType & sj ) const override;
258 
261  const InputPointType & ipp,
262  SpatialHessianType & sh ) const override;
263 
266  const InputPointType & ipp,
268  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override;
269 
274  const InputPointType & ipp,
275  SpatialJacobianType & sj,
277  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override;
278 
281  const InputPointType & ipp,
283  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override;
284 
289  const InputPointType & ipp,
290  SpatialHessianType & sh,
292  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const override;
293 
297  const InputPointType &,
298  JacobianType &,
299  NonZeroJacobianIndicesType & ) const;
301  const InputPointType &,
302  const MovingImageGradientType &,
303  DerivativeType &,
304  NonZeroJacobianIndicesType & ) const;
306  const InputPointType &,
307  SpatialJacobianType & ) const;
309  const InputPointType &,
310  SpatialHessianType & ) const;
312  const InputPointType &,
314  NonZeroJacobianIndicesType & ) const;
316  const InputPointType &,
319  NonZeroJacobianIndicesType & ) const;
321  const InputPointType &,
323  NonZeroJacobianIndicesType & ) const;
325  const InputPointType &,
328  NonZeroJacobianIndicesType & ) const;
329 
330 protected:
331 
334 
337 
341 
345  virtual void UpdateCombinationMethod( void );
346 
348  virtual void NoCurrentTransformSet( void ) const;
349 
357 
364  //GetJacobianFunctionPointer m_SelectedGetJacobianFunction;
365 
375 
382  const InputPointType & point ) const;
383 
388  const InputPointType & point ) const;
389 
392  const InputPointType & point ) const;
393 
396  const InputPointType & point ) const;
397 
404  const InputPointType &,
405  JacobianType &,
406  NonZeroJacobianIndicesType & ) const;
407 
412  const InputPointType &,
413  JacobianType &,
414  NonZeroJacobianIndicesType & ) const;
415 
418  const InputPointType &,
419  JacobianType &,
420  NonZeroJacobianIndicesType & ) const;
421 
424  const InputPointType &,
425  JacobianType &,
426  NonZeroJacobianIndicesType & ) const;
427 
434  const InputPointType &,
435  const MovingImageGradientType &,
436  DerivativeType &,
437  NonZeroJacobianIndicesType & ) const;
438 
443  const InputPointType &,
444  const MovingImageGradientType &,
445  DerivativeType &,
446  NonZeroJacobianIndicesType & ) const;
447 
450  const InputPointType &,
451  const MovingImageGradientType &,
452  DerivativeType &,
453  NonZeroJacobianIndicesType & ) const;
454 
457  const InputPointType &,
458  const MovingImageGradientType &,
459  DerivativeType &,
460  NonZeroJacobianIndicesType & ) const;
461 
468  const InputPointType & ipp,
469  SpatialJacobianType & sj ) const;
470 
475  const InputPointType & ipp,
476  SpatialJacobianType & sj ) const;
477 
480  const InputPointType & ipp,
481  SpatialJacobianType & sj ) const;
482 
485  const InputPointType & ipp,
486  SpatialJacobianType & sj ) const;
487 
494  const InputPointType & ipp,
495  SpatialHessianType & sh ) const;
496 
501  const InputPointType & ipp,
502  SpatialHessianType & sh ) const;
503 
506  const InputPointType & ipp,
507  SpatialHessianType & sh ) const;
508 
511  const InputPointType & ipp,
512  SpatialHessianType & sh ) const;
513 
520  const InputPointType & ipp,
522  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
523 
525  const InputPointType & ipp,
526  SpatialJacobianType & sj,
528  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
529 
534  const InputPointType & ipp,
536  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
537 
539  const InputPointType & ipp,
540  SpatialJacobianType & sj,
542  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
543 
546  const InputPointType & ipp,
548  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
549 
551  const InputPointType & ipp,
552  SpatialJacobianType & sj,
554  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
555 
558  const InputPointType & ipp,
560  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
561 
563  const InputPointType & ipp,
564  SpatialJacobianType & sj,
566  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
567 
574  const InputPointType & ipp,
576  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
577 
579  const InputPointType & ipp,
580  SpatialHessianType & sh,
582  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
583 
588  const InputPointType & ipp,
590  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
591 
593  const InputPointType & ipp,
594  SpatialHessianType & sh,
596  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
597 
600  const InputPointType & ipp,
602  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
603 
605  const InputPointType & ipp,
606  SpatialHessianType & sh,
608  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
609 
612  const InputPointType & ipp,
614  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
615 
617  const InputPointType & ipp,
618  SpatialHessianType & sh,
620  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
621 
625 
626 private:
627 
628  AdvancedCombinationTransform( const Self & ); // purposely not implemented
629  void operator=( const Self & ); // purposely not implemented
630 
631 };
632 
633 } // end namespace itk
634 
635 #ifndef ITK_MANUAL_INSTANTIATION
636 #include "itkAdvancedCombinationTransform.hxx"
637 #endif
638 
639 #endif // end #ifndef __itkAdvancedCombinationTransform_h
This class combines two transforms: an 'initial transform' with a 'current transform'.
GetSpatialHessianFunctionPointer m_SelectedGetSpatialHessianFunction
Superclass::InputCovariantVectorType InputCovariantVectorType
void GetJacobianOfSpatialJacobianNoCurrentTransform(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void(Self::* GetSpatialHessianFunctionPointer)(const InputPointType &, SpatialHessianType &) const
void EvaluateJacobianWithImageGradientProductUseAddition(const InputPointType &, const MovingImageGradientType &, DerivativeType &, NonZeroJacobianIndicesType &) const
virtual bool HasNonZeroJacobianOfSpatialHessian(void) const
void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const override
Superclass::MovingImageGradientValueType MovingImageGradientValueType
NumberOfParametersType GetNumberOfParameters(void) const override
void GetJacobianNoCurrentTransform(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const
void(Self::* GetJacobianOfSpatialJacobianFunctionPointer)(const InputPointType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const
void GetJacobianOfSpatialJacobianUseAddition(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
GetSpatialJacobianFunctionPointer m_SelectedGetSpatialJacobianFunction
Superclass::MovingImageGradientType MovingImageGradientType
Superclass::FixedParametersType FixedParametersType
void GetJacobianOfSpatialHessianNoInitialTransform(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
OutputPointType TransformPoint(const InputPointType &point) const override
Superclass::InverseTransformBasePointer InverseTransformBasePointer
void GetSpatialHessianUseComposition(const InputPointType &ipp, SpatialHessianType &sh) const
void EvaluateJacobianWithImageGradientProductNoCurrentTransform(const InputPointType &, const MovingImageGradientType &, DerivativeType &, NonZeroJacobianIndicesType &) const
GetJacobianOfSpatialHessianFunctionPointer m_SelectedGetJacobianOfSpatialHessianFunction
Superclass::OutputVnlVectorType OutputVnlVectorType
virtual void UpdateCombinationMethod(void)
Superclass::InternalMatrixType InternalMatrixType
CurrentTransformType::ConstPointer CurrentTransformConstPointer
void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const override
virtual void NoCurrentTransformSet(void) const
void GetSpatialHessianUseAddition(const InputPointType &ipp, SpatialHessianType &sh) const
void GetJacobianOfSpatialJacobianNoCurrentTransform(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
Superclass::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
OutputPointType TransformPointNoInitialTransform(const InputPointType &point) const
const FixedParametersType & GetFixedParameters(void) const override
void GetJacobianUseAddition(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const
void GetJacobianOfSpatialHessianUseComposition(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
virtual void GetJacobianOfSpatialHessianUseComposition(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void GetJacobianOfSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
InitialTransformType::InverseTransformBaseType InitialTransformInverseTransformBaseType
void GetJacobianOfSpatialHessianNoCurrentTransform(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
GetJacobianOfSpatialHessianFunctionPointer2 m_SelectedGetJacobianOfSpatialHessianFunction2
Superclass::SpatialJacobianType SpatialJacobianType
Superclass::TransformCategoryEnum TransformCategoryEnum
Superclass::ParametersValueType ParametersValueType
itkGetModifiableObjectMacro(InitialTransform, InitialTransformType)
void GetJacobianOfSpatialJacobianUseComposition(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void GetSpatialJacobianNoCurrentTransform(const InputPointType &ipp, SpatialJacobianType &sj) const
void EvaluateJacobianWithImageGradientProduct(const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
virtual void SetInitialTransform(InitialTransformType *_arg)
OutputPointType(Self::* TransformPointFunctionPointer)(const InputPointType &) const
Superclass::SpatialHessianType SpatialHessianType
virtual void SetUseComposition(bool _arg)
void SetParameters(const ParametersType &param) override
OutputVectorType TransformVector(const InputVectorType &) const override
const ParametersType & GetParameters(void) const override
void GetSpatialJacobianUseComposition(const InputPointType &ipp, SpatialJacobianType &sj) const
bool IsLinear(void) const override
TransformType::ConstPointer TransformTypeConstPointer
Superclass::OutputCovariantVectorType OutputCovariantVectorType
CurrentTransformType::InverseTransformBaseType CurrentTransformInverseTransformBaseType
AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass
bool GetHasNonZeroSpatialHessian(void) const override
InitialTransformType::Pointer InitialTransformPointer
void GetJacobianOfSpatialJacobianNoInitialTransform(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void EvaluateJacobianWithImageGradientProductNoInitialTransform(const InputPointType &, const MovingImageGradientType &, DerivativeType &, NonZeroJacobianIndicesType &) const
void EvaluateJacobianWithImageGradientProductUseComposition(const InputPointType &, const MovingImageGradientType &, DerivativeType &, NonZeroJacobianIndicesType &) const
void(Self::* EvaluateJacobianWithImageGradientProductFunctionPointer)(const InputPointType &, const MovingImageGradientType &, DerivativeType &, NonZeroJacobianIndicesType &) const
Superclass::InverseTransformBaseType InverseTransformBaseType
itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions)
GetJacobianOfSpatialJacobianFunctionPointer m_SelectedGetJacobianOfSpatialJacobianFunction
Superclass::JacobianOfSpatialHessianType JacobianOfSpatialHessianType
void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
OutputVnlVectorType TransformVector(const InputVnlVectorType &) const override
TransformCategoryEnum GetTransformCategory() const override
Superclass::NumberOfParametersType NumberOfParametersType
void SetFixedParameters(const FixedParametersType &fixedParam) override
void GetJacobianNoInitialTransform(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const
virtual SizeValueType GetNumberOfTransforms(void) const
CurrentTransformType::Pointer CurrentTransformPointer
void GetJacobianOfSpatialHessianNoInitialTransform(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void GetJacobianUseComposition(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const
void(Self::* GetSpatialJacobianFunctionPointer)(const InputPointType &, SpatialJacobianType &) const
Superclass::InputVnlVectorType InputVnlVectorType
GetJacobianOfSpatialJacobianFunctionPointer2 m_SelectedGetJacobianOfSpatialJacobianFunction2
NumberOfParametersType GetNumberOfNonZeroJacobianIndices(void) const override
EvaluateJacobianWithImageGradientProductFunctionPointer m_SelectedEvaluateJacobianWithImageGradientProductFunction
OutputPointType TransformPointNoCurrentTransform(const InputPointType &point) const
void GetJacobianOfSpatialJacobianUseAddition(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
InitialTransformType::InverseTransformBasePointer InitialTransformInverseTransformBasePointer
InitialTransformType::ConstPointer InitialTransformConstPointer
GetSparseJacobianFunctionPointer m_SelectedGetSparseJacobianFunction
void GetJacobianOfSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void GetSpatialJacobianUseAddition(const InputPointType &ipp, SpatialJacobianType &sj) const
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const override
void GetJacobianOfSpatialHessianUseAddition(const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
itkGetModifiableObjectMacro(CurrentTransform, CurrentTransformType)
TransformPointFunctionPointer m_SelectedTransformPointFunction
void(Self::* GetJacobianOfSpatialHessianFunctionPointer)(const InputPointType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const
void GetJacobianOfSpatialHessianNoCurrentTransform(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void GetJacobianOfSpatialJacobianNoInitialTransform(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
CurrentTransformType::InverseTransformBasePointer CurrentTransformInverseTransformBasePointer
void(Self::* GetJacobianOfSpatialHessianFunctionPointer2)(const InputPointType &, SpatialHessianType &, JacobianOfSpatialHessianType &, NonZeroJacobianIndicesType &) const
void(Self::* GetSparseJacobianFunctionPointer)(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const
void GetSpatialJacobianNoInitialTransform(const InputPointType &ipp, SpatialJacobianType &sj) const
virtual bool GetInverse(Self *inverse) const
void(Self::* GetJacobianOfSpatialJacobianFunctionPointer2)(const InputPointType &, SpatialJacobianType &, JacobianOfSpatialJacobianType &, NonZeroJacobianIndicesType &) const
virtual const TransformTypePointer GetNthTransform(SizeValueType n) const
void GetJacobianOfSpatialHessianUseAddition(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
void SetParametersByValue(const ParametersType &param) override
virtual void SetCurrentTransform(CurrentTransformType *_arg)
OutputPointType TransformPointUseComposition(const InputPointType &point) const
OutputPointType TransformPointUseAddition(const InputPointType &point) const
AdvancedCombinationTransform(const Self &)
void GetJacobianOfSpatialJacobianUseComposition(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const
virtual void SetUseAddition(bool _arg)
void GetSpatialHessianNoInitialTransform(const InputPointType &ipp, SpatialHessianType &sh) const
void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override
void GetSpatialHessianNoCurrentTransform(const InputPointType &ipp, SpatialHessianType &sh) const
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Transform maps points, vectors and covariant vectors from an input space to an output space.
Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType
Superclass::InverseTransformBasePointer InverseTransformBasePointer
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.9.1 elastix logo