KWStyle - itkElasticBodyReciprocalSplineKernelTransform.h
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkElasticBodyReciprocalSplineKernelTransform.h.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:35 $
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 __itkElasticBodyReciprocalSplineKernelTransform_h
18 #define __itkElasticBodyReciprocalSplineKernelTransform_h
19
20 #include "itkKernelTransform.h"
21
22
23 namespace itk
24 {
25
26 /** \class ElasticBodyReciprocalSplineKernelTransform
27  * This class defines the elastic body spline (EBS) transformation.
28  * It is implemented in as straightforward a manner as possible from
29  * the IEEE TMI paper by Davis, Khotanzad, Flamig, and Harms,
30  * Vol. 16 No. 3 June 1997
31  * Taken from the paper:
32  * The EBS "is based on a physical model of a homogeneous, isotropic,
33  * three-dimensional elastic body. The model can approximate the way
34  * that some physical objects deform".
35  *
36  * \ingroup Transforms
37  */
38 LEN template <class TScalarType = double,   // Data type for scalars (float or double)
39           unsigned int NDimensions = 3>          // Number of dimensions
40 class ITK_EXPORT ElasticBodyReciprocalSplineKernelTransform : 
41 IND **********public KernelTransform<  TScalarType, NDimensions>
42 {
43 public:
44   /** Standard class typedefs. */
45   typedef ElasticBodyReciprocalSplineKernelTransform   Self;
46   typedef KernelTransform<  TScalarType, 
47 TDA                             NDimensions> Superclass;
48
49   typedef SmartPointer<Self>        Pointer;
50   typedef SmartPointer<const Self>  ConstPointer;
51     
52   /** Run-time type information (and related methods). */
53   itkTypeMacro( ThinPlateSplineKernelTransform, KernelTransform );
54
55   /** New macro for creation of through a Smart Pointer */
56   itkNewMacro( Self );
57
58   /** Scalar type. */
59   typedef typename Superclass::ScalarType  ScalarType;
60
61   /** Parameters type. */
62   typedef typename Superclass::ParametersType  ParametersType;
63
64   /** Jacobian type. */
65   typedef typename Superclass::JacobianType  JacobianType;
66
67   /** Dimension of the domain space. */
68   itkStaticConstMacro(SpaceDimension, unsigned int,Superclass::SpaceDimension);
69
70   /** Set alpha.  Alpha is related to Poisson's Ratio (\f$\nu\f$) as
71    * \f$\alpha = 8 ( 1 - \nu ) - 1\f$
72    */
73   itkSetMacro( Alpha, TScalarType );
74   
75   /** Get alpha */
76   itkGetMacro( Alpha, TScalarType );
77   
78   /** These (rather redundant) typedefs are needed because on SGI, typedefs
79    * are not inherited */
80   typedef typename Superclass::InputPointType  InputPointType;
81 TDA   typedef typename Superclass::OutputPointType  OutputPointType;
82   typedef typename Superclass::InputVectorType InputVectorType;
83 TDA   typedef typename Superclass::OutputVectorType OutputVectorType;
84 LEN,TDA   typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
85 LEN,TDA   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
86     
87
88 protected:
89   ElasticBodyReciprocalSplineKernelTransform();
90   virtual ~ElasticBodyReciprocalSplineKernelTransform();
91   void PrintSelf(std::ostream& os, Indent indent) const;
92   
93   /** These (rather redundant) typedefs are needed because on SGI, typedefs
94    * are not inherited */
95   typedef typename Superclass::GMatrixType GMatrixType;
96
97   /** Compute G(x)
98    * For the elastic body spline, this is:
99    * G(x) = [alpha*r(x)*I - 3*x*x'/r(x)]
100    * \f$ G(x) = [\alpha*r(x)*I - 3*x*x'/r(x) ]\f$
101    * where
102    * \f$\alpha = 8 ( 1 - \nu ) - 1\f$
103    * \f$\nu\f$ is Poisson's Ratio
104    * r(x) = Euclidean norm = sqrt[x1^2 + x2^2 + x3^2]
105    * \f[ r(x) = \sqrt{ x_1^2 + x_2^2 + x_3^2 }  \f]
106    * I = identity matrix */
107   const GMatrixType & ComputeG(const InputVectorType& x) const;
108
109   /** alpha, Poisson's ratio */
110   TScalarType m_Alpha;
111
112 IND **private:
113 LEN   ElasticBodyReciprocalSplineKernelTransform(const Self&); //purposely not implemented
114   void operator=(const Self&); //purposely not implemented
115
116 };
117
118 // namespace itk
119
120 #ifndef ITK_MANUAL_INSTANTIATION
121 #include "itkElasticBodyReciprocalSplineKernelTransform.txx"
122 #endif
123
124 #endif // __itkElasticBodyReciprocalSplineKernelTransform_h
125

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