Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkBSplineInterpolationWeightFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkBSplineInterpolationWeightFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:23:59 $
00007   Version:   $Revision: 1.10 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkBSplineInterpolationWeightFunction_h
00018 #define __itkBSplineInterpolationWeightFunction_h
00019 
00020 #include "itkFunctionBase.h"
00021 #include "itkContinuousIndex.h"
00022 #include "itkBSplineKernelFunction.h"
00023 #include "itkArray.h"
00024 #include "itkArray2D.h"
00025 
00026 namespace itk
00027 {
00028 
00045 template <
00046 class TCoordRep = float, 
00047 unsigned int VSpaceDimension = 2,
00048 unsigned int VSplineOrder = 3 
00049 >
00050 class ITK_EXPORT BSplineInterpolationWeightFunction : 
00051   public FunctionBase< ContinuousIndex<TCoordRep,VSpaceDimension>, 
00052                        Array<double> > 
00053 {
00054 public:
00056   typedef BSplineInterpolationWeightFunction Self;
00057   typedef FunctionBase< ContinuousIndex<TCoordRep,VSpaceDimension>,
00058             Array<double> >                  Superclass;
00059   typedef SmartPointer<Self>                 Pointer;
00060   typedef SmartPointer<const Self>           ConstPointer;
00061 
00063   itkNewMacro( Self );
00064 
00066   itkTypeMacro(BSplineInterpolationWeightFunction, FunctionBase);
00067 
00069   itkStaticConstMacro(SpaceDimension, unsigned int, VSpaceDimension);
00070 
00072   itkStaticConstMacro(SplineOrder, unsigned int, VSplineOrder);
00073 
00075   typedef Array<double> WeightsType;
00076 
00078   typedef Index<VSpaceDimension> IndexType;
00079   typedef Size<VSpaceDimension>  SizeType;
00080 
00082   typedef ContinuousIndex<TCoordRep,VSpaceDimension> ContinuousIndexType;
00083 
00086   virtual WeightsType Evaluate( const ContinuousIndexType & index ) const;
00087 
00096   virtual void Evaluate( const ContinuousIndexType & index,
00097     WeightsType & weights, IndexType & startIndex ) const;
00098 
00100   itkGetConstMacro( SupportSize, SizeType );
00101 
00103   itkGetConstMacro( NumberOfWeights, unsigned long );
00104 
00105 protected:
00106   BSplineInterpolationWeightFunction();
00107   ~BSplineInterpolationWeightFunction() {}
00108   void PrintSelf(std::ostream& os, Indent indent) const;
00109 
00110 private:
00111   BSplineInterpolationWeightFunction(const Self&); //purposely not implemented
00112   void operator=(const Self&); //purposely not implemented
00113 
00115   unsigned long  m_NumberOfWeights; 
00116 
00118   SizeType m_SupportSize;
00119 
00121   typedef Array2D<unsigned long> TableType;
00122 
00124   TableType m_OffsetToIndexTable;
00125 
00127   typedef BSplineKernelFunction<itkGetStaticConstMacro(SplineOrder)> KernelType;
00128 
00130   typename KernelType::Pointer m_Kernel;
00131 
00132 };
00133 
00134 } // end namespace itk
00135 
00136 // Define instantiation macro for this template.
00137 #define ITK_TEMPLATE_BSplineInterpolationWeightFunction(_, EXPORT, x, y) namespace itk { \
00138   _(3(class EXPORT BSplineInterpolationWeightFunction< ITK_TEMPLATE_3 x >)) \
00139   namespace Templates { typedef BSplineInterpolationWeightFunction< ITK_TEMPLATE_3 x > BSplineInterpolationWeightFunction##y; } \
00140   }
00141 
00142 #if ITK_TEMPLATE_EXPLICIT
00143 # include "Templates/itkBSplineInterpolationWeightFunction+-.h"
00144 #endif
00145 
00146 #if ITK_TEMPLATE_TXX
00147 # include "itkBSplineInterpolationWeightFunction.txx"
00148 #endif
00149 
00150 
00151 #endif
00152 

Generated at Mon Jul 12 2010 17:59:08 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000