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 This file is part of the elastix software.
4 
5 Copyright (c) University Medical Center Utrecht. All rights reserved.
6 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7 details.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 /*=========================================================================
16 
17  Program: Insight Segmentation & Registration Toolkit
18  Module: $RCSfile: itkTransform.h,v $
19  Language: C++
20  Date: $Date: 2008-06-29 12:58:58 $
21  Version: $Revision: 1.64 $
22 
23  Copyright (c) Insight Software Consortium. All rights reserved.
24  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
25 
26  This software is distributed WITHOUT ANY WARRANTY; without even
27  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
28  PURPOSE. See the above copyright notices for more information.
29 
30 =========================================================================*/
31 #ifndef __itkAdvancedTransform_h
32 #define __itkAdvancedTransform_h
33 
34 #include "itkTransform.h"
35 #include "itkMatrix.h"
36 #include "itkFixedArray.h"
37 
38 namespace itk
39 {
40 
79 template <class TScalarType,
80  unsigned int NInputDimensions = 3,
81  unsigned int NOutputDimensions = 3>
82 class ITK_EXPORT AdvancedTransform
83  : public Transform< TScalarType, NInputDimensions, NOutputDimensions >
84 {
85 public:
88  typedef Transform< TScalarType,
89  NInputDimensions,
90  NOutputDimensions > Superclass;
91  typedef SmartPointer< Self > Pointer;
92  typedef SmartPointer< const Self > ConstPointer;
93 
95  //itkNewMacro( Self );
96 
98  itkTypeMacro( AdvancedTransform, Transform );
99 
101  itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
102  itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
103 
105  typedef typename Superclass::ScalarType ScalarType;
106  typedef typename Superclass::ParametersType ParametersType;
107  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
108  typedef typename Superclass::JacobianType JacobianType;
109  typedef typename Superclass::InputVectorType InputVectorType;
110  typedef typename Superclass::OutputVectorType OutputVectorType;
111  typedef typename Superclass
112  ::InputCovariantVectorType InputCovariantVectorType;
113  typedef typename Superclass
114  ::OutputCovariantVectorType OutputCovariantVectorType;
115  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
116  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
117  typedef typename Superclass::InputPointType InputPointType;
118  typedef typename Superclass::OutputPointType OutputPointType;
119 
120  typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
121  typedef typename Superclass::InverseTransformBasePointer InverseTransformBasePointer;
122 
127  typedef std::vector< unsigned long > NonZeroJacobianIndicesType;
128  typedef Matrix< ScalarType,
129  OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType;
130  typedef std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType;
131  // \todo: think about the SpatialHessian type, should be a 3D native type
132  typedef FixedArray<
133  Matrix< ScalarType,
134  InputSpaceDimension, InputSpaceDimension >,
135  OutputSpaceDimension > SpatialHessianType;
136  typedef std::vector< SpatialHessianType > JacobianOfSpatialHessianType;
137  typedef typename SpatialJacobianType::InternalMatrixType InternalMatrixType;
138 
140  virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices( void ) const;
141 
143  itkGetConstMacro( HasNonZeroSpatialHessian, bool );
144  itkGetConstMacro( HasNonZeroJacobianOfSpatialHessian, bool );
145 
172  virtual void GetJacobian(
173  const InputPointType & ipp,
174  JacobianType & j,
175  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
176 
203  virtual void GetSpatialJacobian(
204  const InputPointType & ipp,
205  SpatialJacobianType & sj ) const = 0;
206 
209  const InputPointType & itkNotUsed( p ), JacobianType & itkNotUsed( j ) ) const
210  {
211  itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
212  }
214  const InputPointType & itkNotUsed( p ), JacobianType & itkNotUsed( j ) ) const
215  {
216  itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
217  }
218 
235  virtual void GetSpatialHessian(
236  const InputPointType & ipp,
237  SpatialHessianType & sh ) const = 0;
238 
245  virtual void GetJacobianOfSpatialJacobian(
246  const InputPointType & ipp,
247  JacobianOfSpatialJacobianType & jsj,
248  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
249 
253  virtual void GetJacobianOfSpatialJacobian(
254  const InputPointType & ipp,
255  SpatialJacobianType & sj,
256  JacobianOfSpatialJacobianType & jsj,
257  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
258 
265  virtual void GetJacobianOfSpatialHessian(
266  const InputPointType & ipp,
267  JacobianOfSpatialHessianType & jsh,
268  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
269 
273  virtual void GetJacobianOfSpatialHessian(
274  const InputPointType & ipp,
275  SpatialHessianType & sh,
276  JacobianOfSpatialHessianType & jsh,
277  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
278 
279 protected:
281  AdvancedTransform( NumberOfParametersType numberOfParameters );
282  virtual ~AdvancedTransform() {};
283 
284  bool m_HasNonZeroSpatialHessian;
286 
287 private:
288 
289  AdvancedTransform(const Self&); // purposely not implemented
290  void operator=(const Self&); // purposely not implemented
291 
292 }; // end class AdvancedTransform
293 
294 } // end namespace itk
295 
296 // Define instantiation macro for this template.
297 #define ITK_TEMPLATE_AdvancedTransform(_, EXPORT, x, y) namespace itk { \
298  _(3(class EXPORT AdvancedTransform< ITK_TEMPLATE_3 x >)) \
299  namespace Templates { typedef AdvancedTransform< ITK_TEMPLATE_3 x > AdvancedTransform##y; } \
300  }
301 
302 #if ITK_TEMPLATE_EXPLICIT
303 # include "Templates/itkAdvancedTransform+-.h"
304 #endif
305 
306 #if ITK_TEMPLATE_TXX
307 # include "itkAdvancedTransform.txx"
308 #endif
309 
310 #endif
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Superclass::InverseTransformBaseType InverseTransformBaseType
std::vector< unsigned long > NonZeroJacobianIndicesType
Superclass::ScalarType ScalarType
SmartPointer< const Self > ConstPointer
SpatialJacobianType::InternalMatrixType InternalMatrixType
Superclass::InverseTransformBasePointer InverseTransformBasePointer
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
SmartPointer< Self > Pointer
Superclass::ParametersType ParametersType
Transform maps points, vectors and covariant vectors from an input space to an output space...
Superclass::InputVnlVectorType InputVnlVectorType
Transform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Superclass::OutputVectorType OutputVectorType
Superclass::NumberOfParametersType NumberOfParametersType
Superclass::JacobianType JacobianType
Superclass::InputPointType InputPointType
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const
Superclass::InputVectorType InputVectorType
Superclass::OutputPointType OutputPointType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
Superclass::InputCovariantVectorType InputCovariantVectorType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
virtual void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianType &) const


Generated on 05-01-2014 for elastix by doxygen 1.8.5 elastix logo