go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkBSplineInterpolationWeightFunction2.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003 This file is part of the elastix software.
00004 
00005 Copyright (c) University Medical Center Utrecht. All rights reserved.
00006 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007 details.
00008 
00009 This software is distributed WITHOUT ANY WARRANTY; without even
00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011 PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 #ifndef __itkBSplineInterpolationWeightFunction2_h
00015 #define __itkBSplineInterpolationWeightFunction2_h
00016 
00017 #include "itkBSplineInterpolationWeightFunctionBase.h"
00018 
00019 namespace itk
00020 {
00021 
00038 template < class TCoordRep = float,
00039   unsigned int VSpaceDimension = 2,
00040   unsigned int VSplineOrder = 3 >
00041 class ITK_EXPORT BSplineInterpolationWeightFunction2 :
00042   public BSplineInterpolationWeightFunctionBase<
00043   TCoordRep, VSpaceDimension, VSplineOrder >
00044 {
00045 public:
00047   typedef BSplineInterpolationWeightFunction2        Self;
00048   typedef BSplineInterpolationWeightFunctionBase<
00049     TCoordRep, VSpaceDimension, VSplineOrder >      Superclass;
00050   typedef SmartPointer<Self>                        Pointer;
00051   typedef SmartPointer<const Self>                  ConstPointer;
00052 
00054   itkNewMacro( Self );
00055 
00057   itkTypeMacro( BSplineInterpolationWeightFunction2,
00058     BSplineInterpolationWeightFunctionBase );
00059 
00061   itkStaticConstMacro( SpaceDimension, unsigned int, VSpaceDimension );
00062 
00064   itkStaticConstMacro( SplineOrder, unsigned int, VSplineOrder );
00065 
00067   typedef typename Superclass::WeightsType          WeightsType;
00068   typedef typename Superclass::IndexType            IndexType;
00069   typedef typename Superclass::SizeType             SizeType;
00070   typedef typename Superclass::ContinuousIndexType  ContinuousIndexType;
00071 
00072 protected:
00073   BSplineInterpolationWeightFunction2();
00074   ~BSplineInterpolationWeightFunction2() {};
00075 
00077   typedef typename Superclass::KernelType           KernelType;
00078   typedef typename Superclass::DerivativeKernelType DerivativeKernelType;
00079   typedef typename Superclass
00080     ::SecondOrderDerivativeKernelType               SecondOrderDerivativeKernelType;
00081   typedef typename Superclass::TableType            TableType;
00082   typedef typename Superclass::OneDWeightsType      OneDWeightsType;
00083   typedef typename Superclass::WeightArrayType  WeightArrayType;
00084 
00085   /* Compute the 1D weights, which are:
00086    * [ \beta^3( x[i] - startIndex[i] ), \beta^3( x[i] - startIndex[i] - 1 ),
00087    * \beta^3( x[i] - startIndex[i] - 2 ), \beta^3( x[i] - startIndex[i] - 3 ) ]
00088    */
00089   virtual void Compute1DWeights(
00090     const ContinuousIndexType & index,
00091     const IndexType & startIndex,
00092     OneDWeightsType & weights1D ) const;
00093 
00094 private:
00095   BSplineInterpolationWeightFunction2(const Self&); //purposely not implemented
00096   void operator=(const Self&); //purposely not implemented
00097 
00098 };
00099 
00100 } // end namespace itk
00101 
00102 // Define instantiation macro for this template.
00103 #define ITK_TEMPLATE_BSplineInterpolationWeightFunction2(_, EXPORT, x, y) namespace itk { \
00104   _(3(class EXPORT BSplineInterpolationWeightFunction2< ITK_TEMPLATE_3 x >)) \
00105   namespace Templates { typedef BSplineInterpolationWeightFunction2< ITK_TEMPLATE_3 x > BSplineInterpolationWeightFunction2##y; } \
00106   }
00107 
00108 #if ITK_TEMPLATE_EXPLICIT
00109 # include "Templates/itkBSplineInterpolationWeightFunction2+-.h"
00110 #endif
00111 
00112 #if ITK_TEMPLATE_TXX
00113 # include "itkBSplineInterpolationWeightFunction2.txx"
00114 #endif
00115 
00116 
00117 #endif


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo