#ifndef CLITKIMAGERESAMPLEGENERICFILTER_H #define CLITKIMAGERESAMPLEGENERICFILTER_H /** ------------------------------------------------------------------- * @file clitkVFResampleGenericFilter.h * @author David Sarrut * @date 23 Feb 2008 08:37:53 * @brief -------------------------------------------------------------------*/ // clitk include #include "clitkCommon.h" #include "clitkImageCommon.h" #include "clitkImageToImageGenericFilter.h" // itk include #include "itkImage.h" #include "itkVectorImage.h" #include "itkFixedArray.h" #include "itkImageFileReader.h" #include "itkImageSeriesReader.h" #include "itkImageFileWriter.h" #include "itkRecursiveGaussianImageFilter.h" #include "itkVectorResampleImageFilter.h" #include "itkAffineTransform.h" #include "itkVectorNearestNeighborInterpolateImageFunction.h" #include "itkVectorLinearInterpolateImageFunction.h" #include "itkBSplineInterpolateImageFunction.h" #include "itkBSplineInterpolateImageFunctionWithLUT.h" #include "itkCommand.h" namespace clitk { //-------------------------------------------------------------------- class VFResampleGenericFilter: public clitk::ImageToImageGenericFilter { public: // constructor VFResampleGenericFilter(); // Types typedef VFResampleGenericFilter Self; typedef itk::SmartPointer Pointer; typedef itk::SmartPointer ConstPointer; // New itkNewMacro(Self); void SetOutputSize(const std::vector & size); void SetOutputSpacing(const std::vector & spacing); void SetGaussianSigma(const std::vector & sigma); void SetInterpolationName(const std::string & inter); void SetDefaultPixelValue(double dpv) { mDefaultPixelValue = dpv;} void SetBSplineOrder(int o) { mBSplineOrder = o; } void SetBLUTSampling(int b) { mSamplingFactors.resize(1); mSamplingFactors[0] = b; } //-------------------------------------------------------------------- // Main function called each time the filter is updated template void UpdateWithInputImageType(); protected: template void InitializeImageType(); //-------------------------------------------------------------------- std::string mInterpolatorName; std::vector mOutputSize; std::vector mOutputSpacing; std::vector mOutputOrigin; double mDefaultPixelValue; bool mApplyGaussianFilterBefore; std::vector mSigma; int mBSplineOrder; std::vector mSamplingFactors; //-------------------------------------------------------------------- template void Update_WithDimAndPixelTypeAndComponent(); template typename ImageType::Pointer ComputeImage(typename ImageType::Pointer inputImage); }; // end class VFResampleGenericFilter //-------------------------------------------------------------------- #include "clitkVFResampleGenericFilter.txx" } // end namespace //-------------------------------------------------------------------- #endif /* end #define CLITKIMAGERESAMPLEGENERICFILTER_H */