00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkBSplineResampleImageFunction.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/02/19 19:06:53 $ 00007 Version: $Revision: 1.8 $ 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 Portions of this code are covered under the VTK copyright. 00013 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details. 00014 00015 This software is distributed WITHOUT ANY WARRANTY; without even 00016 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00017 PURPOSE. See the above copyright notices for more information. 00018 00019 =========================================================================*/ 00020 00021 #ifndef __itkBSplineResampleImageFunction_h 00022 #define __itkBSplineResampleImageFunction_h 00023 00024 #include "itkBSplineInterpolateImageFunction.h" 00025 00026 namespace itk 00027 { 00047 template <class TImageType, class TCoordRep = float> 00048 class ITK_EXPORT BSplineResampleImageFunction : 00049 public BSplineInterpolateImageFunction< 00050 TImageType,TCoordRep,ITK_TYPENAME TImageType::PixelType > 00051 { 00052 public: 00054 typedef BSplineResampleImageFunction Self; 00055 typedef BSplineInterpolateImageFunction< 00056 TImageType,TCoordRep, ITK_TYPENAME TImageType::PixelType > Superclass; 00057 typedef SmartPointer<Self> Pointer; 00058 typedef SmartPointer<const Self> ConstPointer; 00059 00061 itkTypeMacro(BSplineReconstructionImageFunction, 00062 BSplineInterpolateImageFunction); 00063 00065 itkNewMacro( Self ); 00066 00068 virtual void SetInputImage(const TImageType * inputData) 00069 { 00070 // bypass my superclass 00071 this->InterpolateImageFunction<TImageType,TCoordRep>::SetInputImage(inputData); 00072 this->m_Coefficients = inputData; 00073 if ( this->m_Coefficients.IsNotNull() ) 00074 { 00075 this->m_DataLength = this->m_Coefficients->GetBufferedRegion().GetSize(); 00076 } 00077 } 00078 00079 protected: 00080 BSplineResampleImageFunction() {}; 00081 virtual ~BSplineResampleImageFunction() {}; 00082 void PrintSelf(std::ostream& os, Indent indent) const 00083 { 00084 this->Superclass::PrintSelf( os, indent ); 00085 } 00086 00087 private: 00088 BSplineResampleImageFunction(const Self&);//purposely not implemented 00089 }; 00090 00091 } // namespace itk 00092 00093 00094 #endif 00095