KWStyle - itkThinPlateR2LogRSplineKernelTransform.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkThinPlateR2LogRSplineKernelTransform.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:48 $
7   Version:   $Revision: 1.4 $
8
9   Copyright (c) Insight Software Consortium. All rights reserved.
10   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11
12      This software is distributed WITHOUT ANY WARRANTY; without even 
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14      PURPOSE.  See the above copyright notices for more information.
15
16 =========================================================================*/
17 #ifndef __itkThinPlateR2LogRSplineKernelTransform_h
18 #define __itkThinPlateR2LogRSplineKernelTransform_h
19
20 #include "itkKernelTransform.h"
21
22 namespace itk
23 {
24 /** \class ThinPlateR2LogRSplineKernelTransform
25  * This class defines the thin plate spline (TPS) transformation.
26  * It is implemented in as straightforward a manner as possible from
27  * the IEEE TMI paper by Davis, Khotanzad, Flamig, and Harms,
28  * Vol. 16 No. 3 June 1997.
29  *
30  * The kernel used in this variant of TPS is \f$ R^2 log(R) \f$
31  *
32  * \ingroup Transforms
33  */
34 template <class TScalarType,         // Data type for scalars (float or double)
35           unsigned int NDimensions = 3>          // Number of dimensions
36 class ITK_EXPORT ThinPlateR2LogRSplineKernelTransform : 
37 IND ****************public KernelTransform<   TScalarType, NDimensions>
38 {
39 public:
40   /** Standard class typedefs. */
41   typedef ThinPlateR2LogRSplineKernelTransform Self;
42 TDA   typedef KernelTransform<    TScalarType, NDimensions>   Superclass;
43 TDA   typedef SmartPointer<Self>        Pointer;
44 TDA   typedef SmartPointer<const Self>  ConstPointer;
45   
46   /** New macro for creation of through a Smart Pointer */
47   itkNewMacro( Self );
48
49   /** Run-time type information (and related methods). */
50   itkTypeMacro( ThinPlateR2LogRSplineKernelTransform, KernelTransform );
51
52   /** Scalar type. */
53   typedef typename Superclass::ScalarType  ScalarType;
54
55   /** Parameters type. */
56   typedef typename Superclass::ParametersType  ParametersType;
57
58   /** Jacobian Type */
59   typedef typename Superclass::JacobianType  JacobianType;
60
61   /** Dimension of the domain space. */
62   itkStaticConstMacro(SpaceDimension, unsigned int,Superclass::SpaceDimension);
63                               
64   /** These (rather redundant) typedefs are needed because on SGI, typedefs
65    * are not inherited */
66   typedef typename Superclass::InputPointType  InputPointType;
67 TDA   typedef typename Superclass::OutputPointType  OutputPointType;
68   typedef typename Superclass::InputVectorType InputVectorType;
69 TDA   typedef typename Superclass::OutputVectorType OutputVectorType;
70 LEN,TDA   typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
71 LEN,TDA   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
72 TDA   typedef typename Superclass::PointsIterator PointsIterator;
73     
74
75 protected:
76   ThinPlateR2LogRSplineKernelTransform() {};
77   virtual ~ThinPlateR2LogRSplineKernelTransform() {}
78   
79   /** These (rather redundant) typedefs are needed because on SGI, typedefs
80    * are not inherited. */
81   typedef typename Superclass::GMatrixType GMatrixType;
82   
83   /** Compute G(x)
84    * For the thin plate spline, this is:
85    * G(x) = r(x)*I
86    * \f$ G(x) = r(x)^2 log( r(x) ) *I \f$
87    * where
88    * r(x) = Euclidean norm = sqrt[x1^2 + x2^2 + x3^2]
89    * \f[ r(x) = \sqrt{ x_1^2 + x_2^2 + x_3^2 }  \f]
90    * I = identity matrix. */
91   const GMatrixType & ComputeG(const InputVectorType & x) const;
92
93
94   /** Compute the contribution of the landmarks weighted by the kernel funcion
95 IND ******to the global deformation of the space  */
96 LEN   virtual void ComputeDeformationContribution( const InputPointType & inputPoint,
97 LEN                                                      OutputPointType & result ) const;
98
99 IND *private:
100   ThinPlateR2LogRSplineKernelTransform(const Self&); //purposely not implemented
101   void operator=(const Self&); //purposely not implemented
102
103 };
104
105 // namespace itk
106
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "itkThinPlateR2LogRSplineKernelTransform.txx"
109 #endif
110
111 #endif // __itkThinPlateR2LogRSplineKernelTransform_h
112

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:49PM
© Kitware Inc.