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 >
83  public Transform< TScalarType, NInputDimensions, NOutputDimensions >
84 {
85 public:
86 
89  typedef Transform< TScalarType,
90  NInputDimensions,
91  NOutputDimensions > Superclass;
92  typedef SmartPointer< Self > Pointer;
93  typedef SmartPointer< const Self > ConstPointer;
94 
96  //itkNewMacro( Self );
97 
99  itkTypeMacro( AdvancedTransform, Transform );
100 
102  itkStaticConstMacro( InputSpaceDimension, unsigned int, NInputDimensions );
103  itkStaticConstMacro( OutputSpaceDimension, unsigned int, NOutputDimensions );
104 
106  typedef typename Superclass::ScalarType ScalarType;
107  typedef typename Superclass::ParametersType ParametersType;
108  typedef typename Superclass::ParametersValueType ParametersValueType;
109  typedef typename Superclass::NumberOfParametersType NumberOfParametersType;
110  typedef typename Superclass::JacobianType JacobianType;
111  typedef typename Superclass::InputVectorType InputVectorType;
112  typedef typename Superclass::OutputVectorType OutputVectorType;
113  typedef typename Superclass
114  ::InputCovariantVectorType InputCovariantVectorType;
115  typedef typename Superclass
116  ::OutputCovariantVectorType OutputCovariantVectorType;
117  typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
118  typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
119  typedef typename Superclass::InputPointType InputPointType;
120  typedef typename Superclass::OutputPointType OutputPointType;
121 
122  typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
123  typedef typename Superclass::InverseTransformBasePointer InverseTransformBasePointer;
124 
126  typedef Transform< TScalarType,
127  NInputDimensions,
128  NOutputDimensions > TransformType;
129  typedef typename TransformType::Pointer TransformTypePointer;
130  typedef typename TransformType::ConstPointer TransformTypeConstPointer;
131 
136  typedef std::vector< unsigned long > NonZeroJacobianIndicesType;
137  typedef Matrix< ScalarType,
138  OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType;
139  typedef std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType;
140  // \todo: think about the SpatialHessian type, should be a 3D native type
141  typedef FixedArray<
142  Matrix< ScalarType,
143  InputSpaceDimension, InputSpaceDimension >,
144  OutputSpaceDimension > SpatialHessianType;
145  typedef std::vector< SpatialHessianType > JacobianOfSpatialHessianType;
146  typedef typename SpatialJacobianType::InternalMatrixType InternalMatrixType;
147 
150 
152  itkGetConstMacro( HasNonZeroSpatialHessian, bool );
153  itkGetConstMacro( HasNonZeroJacobianOfSpatialHessian, bool );
154 
181  virtual void GetJacobian(
182  const InputPointType & ipp,
183  JacobianType & j,
184  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
185 
212  virtual void GetSpatialJacobian(
213  const InputPointType & ipp,
214  SpatialJacobianType & sj ) const = 0;
215 
218  const InputPointType & itkNotUsed( p ), JacobianType & itkNotUsed( j ) ) const
219  {
220  itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
221  }
222 
223 
225  const InputPointType & itkNotUsed( p ), JacobianType & itkNotUsed( j ) ) const
226  {
227  itkExceptionMacro( << "This ITK4 function is currently not used in elastix." );
228  }
229 
230 
247  virtual void GetSpatialHessian(
248  const InputPointType & ipp,
249  SpatialHessianType & sh ) const = 0;
250 
257  virtual void GetJacobianOfSpatialJacobian(
258  const InputPointType & ipp,
260  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
261 
265  virtual void GetJacobianOfSpatialJacobian(
266  const InputPointType & ipp,
267  SpatialJacobianType & sj,
269  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
270 
277  virtual void GetJacobianOfSpatialHessian(
278  const InputPointType & ipp,
280  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
281 
285  virtual void GetJacobianOfSpatialHessian(
286  const InputPointType & ipp,
287  SpatialHessianType & sh,
289  NonZeroJacobianIndicesType & nonZeroJacobianIndices ) const = 0;
290 
291 protected:
292 
294  AdvancedTransform( NumberOfParametersType numberOfParameters );
295  virtual ~AdvancedTransform() {}
296 
299 
300 private:
301 
302  AdvancedTransform( const Self & ); // purposely not implemented
303  void operator=( const Self & ); // purposely not implemented
304 
305 };
306 
307 } // end namespace itk
308 
309 #ifndef ITK_MANUAL_INSTANTIATION
310 #include "itkAdvancedTransform.hxx"
311 #endif
312 
313 #endif
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions)
Superclass::InverseTransformBaseType InverseTransformBaseType
std::vector< unsigned long > NonZeroJacobianIndicesType
virtual void GetJacobianOfSpatialJacobian(const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
Superclass::ScalarType ScalarType
SmartPointer< const Self > ConstPointer
virtual void GetSpatialHessian(const InputPointType &ipp, SpatialHessianType &sh) const =0
SpatialJacobianType::InternalMatrixType InternalMatrixType
Superclass::InverseTransformBasePointer InverseTransformBasePointer
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
SmartPointer< Self > Pointer
virtual void GetSpatialJacobian(const InputPointType &ipp, SpatialJacobianType &sj) const =0
Superclass::ParametersType ParametersType
Transform maps points, vectors and covariant vectors from an input space to an output space...
virtual void GetJacobianOfSpatialHessian(const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
Superclass::InputVnlVectorType InputVnlVectorType
Transform< TScalarType, NInputDimensions, NOutputDimensions > Superclass
Superclass::ParametersValueType ParametersValueType
Superclass::OutputVectorType OutputVectorType
Superclass::NumberOfParametersType NumberOfParametersType
Superclass::JacobianType JacobianType
virtual NumberOfParametersType GetNumberOfNonZeroJacobianIndices(void) const
Superclass::InputPointType InputPointType
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &, JacobianType &) const
void operator=(const Self &)
Superclass::InputVectorType InputVectorType
Transform< TScalarType, NInputDimensions, NOutputDimensions > TransformType
TransformType::Pointer TransformTypePointer
TransformType::ConstPointer TransformTypeConstPointer
Superclass::OutputPointType OutputPointType
std::vector< SpatialJacobianType > JacobianOfSpatialJacobianType
std::vector< SpatialHessianType > JacobianOfSpatialHessianType
virtual void GetJacobian(const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0
Superclass::InputCovariantVectorType InputCovariantVectorType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
virtual void ComputeJacobianWithRespectToPosition(const InputPointType &, JacobianType &) const


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo