Shapeworks Studio  2.1
Shape analysis software suite
itkCompactlySupportedRBFSparseKernelTransform.h
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkCompactlySupportedRBFSparseKernelTransform.h,v $
5  Language: C++
6  Date: $Date: 2014-1-28 14:22:18 $
7  Version: $Revision: 1.1 $
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 __itkCompactlySupportedRBFSparseKernelTransform_h
18 #define __itkCompactlySupportedRBFSparseKernelTransform_h
19 
20 #include "itkSparseKernelTransform.h"
21 
22 namespace itk
23 {
27 template <class TScalarType, // Data type for scalars (float or double)
28  unsigned int NDimensions = 3> // Number of dimensions
30  public SparseKernelTransform< TScalarType, NDimensions>
31 {
32 public:
36  typedef SmartPointer<Self> Pointer;
37  typedef SmartPointer<const Self> ConstPointer;
38 
40  itkNewMacro( Self );
41 
44 
47 
50 
53 
55  itkStaticConstMacro(SpaceDimension, unsigned int,Superclass::SpaceDimension);
56 
60  typedef typename Superclass::OutputPointType OutputPointType;
61  typedef typename Superclass::InputVectorType InputVectorType;
62  typedef typename Superclass::OutputVectorType OutputVectorType;
63  typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
64  typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
65  typedef typename Superclass::PointsIterator PointsIterator;
66  // void SetParameters( const ParametersType & parameters );
67 
68  void SetSigma(double sigma){this->Sigma = sigma;}
69 
70  virtual void ComputeJacobianWithRespectToParameters(
71  const InputPointType &in, JacobianType &jacobian) const;
72 
73 
74 protected:
75  CompactlySupportedRBFSparseKernelTransform() {this->Sigma = 1; }
77 
81 
82  const GMatrixType & ComputeG(const InputVectorType & x) const;
83 
86  virtual void ComputeDeformationContribution( const InputPointType & inputPoint,
87  OutputPointType & result ) const;
88 
89 private:
90  CompactlySupportedRBFSparseKernelTransform(const Self&); //purposely not implemented
91  void operator=(const Self&); //purposely not implemented
92 
93  // basis support
94  double Sigma;
95 
96 };
97 
98 
99 } // namespace itk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 #include "itkCompactlySupportedRBFSparseKernelTransform.hxx"
103 #endif
104 
105 #endif // __itkCompactlySupportedRBFSparseKernelTransform_h
Superclass::JacobianType JacobianType
Superclass::ParametersType ParametersType
Superclass::InputVectorType InputVectorType
Superclass::InputPointType InputPointType
Superclass::ScalarType ScalarType