ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkVolumeSplineKernelTransform.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 __itkVolumeSplineKernelTransform_h
00019 #define __itkVolumeSplineKernelTransform_h
00020 
00021 #include "itkKernelTransform.h"
00022 
00023 namespace itk
00024 {
00033 template< class TScalarType, // Data type for scalars (float or
00034                              // double)
00035           unsigned int NDimensions = 3 >
00036 // Number of dimensions
00037 class ITK_EXPORT VolumeSplineKernelTransform:
00038   public KernelTransform<   TScalarType, NDimensions >
00039 {
00040 public:
00042   typedef VolumeSplineKernelTransform                 Self;
00043   typedef KernelTransform< TScalarType, NDimensions > Superclass;
00044   typedef SmartPointer< Self >                        Pointer;
00045   typedef SmartPointer< const Self >                  ConstPointer;
00046 
00048   itkNewMacro(Self);
00049 
00051   itkTypeMacro(VolumeSplineKernelTransform, KernelTransform);
00052 
00054   typedef typename Superclass::ScalarType ScalarType;
00055 
00057   typedef typename Superclass::ParametersType ParametersType;
00058 
00060   typedef typename Superclass::JacobianType JacobianType;
00061 
00063   itkStaticConstMacro(SpaceDimension, unsigned int,
00064                       Superclass::SpaceDimension);
00065 
00067   typedef typename Superclass::InputPointType            InputPointType;
00068   typedef typename Superclass::OutputPointType           OutputPointType;
00069   typedef typename Superclass::InputVectorType           InputVectorType;
00070   typedef typename Superclass::OutputVectorType          OutputVectorType;
00071   typedef typename Superclass::InputCovariantVectorType  InputCovariantVectorType;
00072   typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00073   typedef typename Superclass::PointsIterator            PointsIterator;
00074 protected:
00075   VolumeSplineKernelTransform() {}
00076   virtual ~VolumeSplineKernelTransform() {}
00078 
00080   typedef typename Superclass::GMatrixType GMatrixType;
00081 
00090   virtual void ComputeG(const InputVectorType & landmarkVector,
00091                         GMatrixType & gmatrix) const;
00092 
00095   virtual void ComputeDeformationContribution(
00096     const InputPointType & inputPoint,
00097     OutputPointType & result) const;
00098 
00099 private:
00100   VolumeSplineKernelTransform(const Self &); //purposely not implemented
00101   void operator=(const Self &);              //purposely not implemented
00102 };
00103 } // namespace itk
00104 
00105 // Define instantiation macro for this template.
00106 #define ITK_TEMPLATE_VolumeSplineKernelTransform(_, EXPORT, TypeX, TypeY)     \
00107   namespace itk                                                               \
00108   {                                                                           \
00109   _( 2 ( class EXPORT VolumeSplineKernelTransform< ITK_TEMPLATE_2 TypeX > ) ) \
00110   namespace Templates                                                         \
00111   {                                                                           \
00112   typedef                                                                     \
00113   VolumeSplineKernelTransform< ITK_TEMPLATE_2 TypeX >                         \
00114   VolumeSplineKernelTransform##TypeY;                                       \
00115   }                                                                           \
00116   }
00117 
00118 #if ITK_TEMPLATE_EXPLICIT
00119 #include "Templates/itkVolumeSplineKernelTransform+-.h"
00120 #endif
00121 
00122 #if ITK_TEMPLATE_TXX
00123 #include "itkVolumeSplineKernelTransform.hxx"
00124 #endif
00125 
00126 #endif // __itkVolumeSplineKernelTransform_h
00127