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::JacobianType JacobianType;
108  typedef typename Superclass::InputVectorType InputVectorType;
109  typedef typename Superclass::OutputVectorType OutputVectorType;
110  typedef typename Superclass
111  ::InputCovariantVectorType InputCovariantVectorType;
112  typedef typename Superclass
113  ::OutputCovariantVectorType OutputCovariantVectorType;
114  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
115  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
116  typedef typename Superclass::InputPointType InputPointType;
117  typedef typename Superclass::OutputPointType OutputPointType;
118 
123  typedef std::vector< unsigned long > NonZeroJacobianIndicesType;
124  typedef Matrix< ScalarType,
125  OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType;
126  typedef std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType;
127  // \todo: think about the SpatialHessian type, should be a 3D native type
128  typedef FixedArray<
129  Matrix< ScalarType,
130  InputSpaceDimension, InputSpaceDimension >,
131  OutputSpaceDimension > SpatialHessianType;
132  typedef std::vector< SpatialHessianType > JacobianOfSpatialHessianType;
133  typedef typename SpatialJacobianType::InternalMatrixType InternalMatrixType;
134 
136  virtual unsigned long GetNumberOfNonZeroJacobianIndices( void ) const;
137 
139  itkGetConstMacro( HasNonZeroSpatialHessian, bool );
140  itkGetConstMacro( HasNonZeroJacobianOfSpatialHessian, bool );
141 
168  virtual void GetJacobian(
169  const InputPointType & ipp,
170  JacobianType & j,
171  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
172 
177  virtual const JacobianType & GetJacobian( const InputPointType & ) const;
178 
205  virtual void GetSpatialJacobian(
206  const InputPointType & ipp,
207  SpatialJacobianType & sj ) const;
208 
225  virtual void GetSpatialHessian(
226  const InputPointType & ipp,
227  SpatialHessianType & sh ) const;
228 
235  virtual void GetJacobianOfSpatialJacobian(
236  const InputPointType & ipp,
238  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
239 
243  virtual void GetJacobianOfSpatialJacobian(
244  const InputPointType & ipp,
245  SpatialJacobianType & sj,
247  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
248 
255  virtual void GetJacobianOfSpatialHessian(
256  const InputPointType & ipp,
258  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
259 
263  virtual void GetJacobianOfSpatialHessian(
264  const InputPointType & ipp,
265  SpatialHessianType & sh,
267  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const;
268 
269 protected:
271  AdvancedTransform( unsigned int Dimension, unsigned int NumberOfParameters );
272  virtual ~AdvancedTransform() {};
273 
274  bool m_HasNonZeroSpatialHessian;
276 
277 private:
278 
279  AdvancedTransform(const Self&); // purposely not implemented
280  void operator=(const Self&); // purposely not implemented
281 
282 }; // end class AdvancedTransform
283 
284 } // end namespace itk
285 
286 // Define instantiation macro for this template.
287 #define ITK_TEMPLATE_AdvancedTransform(_, EXPORT, x, y) namespace itk { \
288  _(3(class EXPORT AdvancedTransform< ITK_TEMPLATE_3 x >)) \
289  namespace Templates { typedef AdvancedTransform< ITK_TEMPLATE_3 x > AdvancedTransform##y; } \
290  }
291 
292 #if ITK_TEMPLATE_EXPLICIT
293 # include "Templates/itkAdvancedTransform+-.h"
294 #endif
295 
296 #if ITK_TEMPLATE_TXX
297 # include "itkAdvancedTransform.txx"
298 #endif
299 
300 #endif


Generated on 27-06-2013 for elastix by doxygen 1.8.3.1 elastix logo