ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkThinPlateSplineKernelTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkThinPlateSplineKernelTransform_h
00019 #define __itkThinPlateSplineKernelTransform_h
00020 
00021 #include "itkKernelTransform.h"
00022 
00023 namespace itk
00024 {
00033 template< class TScalarType,         // Data type for scalars (float or double)
00034           unsigned int NDimensions = 3 >
00035 // Number of dimensions
00036 class ITK_EXPORT ThinPlateSplineKernelTransform:
00037   public KernelTransform<   TScalarType, NDimensions >
00038 {
00039 public:
00041   typedef ThinPlateSplineKernelTransform                 Self;
00042   typedef KernelTransform<    TScalarType, NDimensions > Superclass;
00043   typedef SmartPointer< Self >                           Pointer;
00044   typedef SmartPointer< const Self >                     ConstPointer;
00045 
00047   itkNewMacro(Self);
00048 
00050   itkTypeMacro(ThinPlateSplineKernelTransform, KernelTransform);
00051 
00053   typedef typename Superclass::ScalarType ScalarType;
00054 
00056   typedef typename Superclass::ParametersType ParametersType;
00057 
00059   typedef typename Superclass::JacobianType JacobianType;
00060 
00062   itkStaticConstMacro(SpaceDimension, unsigned int, Superclass::SpaceDimension);
00063 
00065   typedef typename Superclass::InputPointType            InputPointType;
00066   typedef typename Superclass::OutputPointType           OutputPointType;
00067   typedef typename Superclass::InputVectorType           InputVectorType;
00068   typedef typename Superclass::OutputVectorType          OutputVectorType;
00069   typedef typename Superclass::InputCovariantVectorType  InputCovariantVectorType;
00070   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00071   typedef typename Superclass::PointsIterator            PointsIterator;
00072 protected:
00073   ThinPlateSplineKernelTransform() {}
00074   virtual ~ThinPlateSplineKernelTransform() {}
00076 
00078   typedef typename Superclass::GMatrixType GMatrixType;
00079 
00088   virtual void ComputeG(const InputVectorType & landmarkVector, GMatrixType & gmatrix) const;
00089 
00092   virtual void ComputeDeformationContribution(const InputPointType & inputPoint,
00093                                               OutputPointType & result) const;
00094 
00095 private:
00096   ThinPlateSplineKernelTransform(const Self &); //purposely not implemented
00097   void operator=(const Self &);                 //purposely not implemented
00098 };
00099 } // namespace itk
00100 
00101 // Define instantiation macro for this template.
00102 #define ITK_TEMPLATE_ThinPlateSplineKernelTransform(_, EXPORT, TypeX, TypeY)     \
00103   namespace itk                                                                  \
00104   {                                                                              \
00105   _( 2 ( class EXPORT ThinPlateSplineKernelTransform< ITK_TEMPLATE_2 TypeX > ) ) \
00106   namespace Templates                                                            \
00107   {                                                                              \
00108   typedef ThinPlateSplineKernelTransform< ITK_TEMPLATE_2 TypeX >                 \
00109   ThinPlateSplineKernelTransform##TypeY;                                       \
00110   }                                                                              \
00111   }
00112 
00113 #if ITK_TEMPLATE_EXPLICIT
00114 #include "Templates/itkThinPlateSplineKernelTransform+-.h"
00115 #endif
00116 
00117 #if ITK_TEMPLATE_TXX
00118 #include "itkThinPlateSplineKernelTransform.hxx"
00119 #endif
00120 
00121 #endif // __itkThinPlateSplineKernelTransform_h
00122