1 #ifndef CLITKIMAGERESAMPLEGENERICFILTER_H
2 #define CLITKIMAGERESAMPLEGENERICFILTER_H
5 -------------------------------------------------------------------
6 * @file clitkVFResampleGenericFilter.h
7 * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
8 * @date 23 Feb 2008 08:37:53
11 -------------------------------------------------------------------*/
14 #include "clitkCommon.h"
15 #include "clitkImageCommon.h"
16 #include "clitkImageToImageGenericFilter.h"
20 #include "itkVectorImage.h"
21 #include "itkFixedArray.h"
22 #include "itkImageFileReader.h"
23 #include "itkImageSeriesReader.h"
24 #include "itkImageFileWriter.h"
25 #include "itkRecursiveGaussianImageFilter.h"
26 #include "itkVectorResampleImageFilter.h"
27 #include "itkAffineTransform.h"
28 #include "itkVectorNearestNeighborInterpolateImageFunction.h"
29 #include "itkVectorLinearInterpolateImageFunction.h"
30 #include "itkBSplineInterpolateImageFunction.h"
31 #include "itkBSplineInterpolateImageFunctionWithLUT.h"
32 #include "itkCommand.h"
36 //--------------------------------------------------------------------
37 class VFResampleGenericFilter: public clitk::ImageToImageGenericFilter {
41 VFResampleGenericFilter();
44 typedef VFResampleGenericFilter Self;
45 typedef ImageToImageGenericFilter Superclass;
46 typedef itk::SmartPointer<Self> Pointer;
47 typedef itk::SmartPointer<const Self> ConstPointer;
52 void SetOutputSize(const std::vector<int> & size);
53 void SetOutputSpacing(const std::vector<double> & spacing);
54 void SetGaussianSigma(const std::vector<double> & sigma);
55 void SetInterpolationName(const std::string & inter);
56 void SetDefaultPixelValue(double dpv) { mDefaultPixelValue = dpv;}
57 void SetBSplineOrder(int o) { mBSplineOrder = o; }
58 void SetBLUTSampling(int b) { mSamplingFactors.resize(1); mSamplingFactors[0] = b; }
63 //--------------------------------------------------------------------
64 std::string mInterpolatorName;
65 std::vector<int> mOutputSize;
66 std::vector<double> mOutputSpacing;
67 std::vector<double> mOutputOrigin;
68 double mDefaultPixelValue;
69 bool mApplyGaussianFilterBefore;
70 std::vector<double> mSigma;
72 std::vector<int> mSamplingFactors;
74 //--------------------------------------------------------------------
75 template<unsigned int Dim> void Update_WithDim();
76 template<unsigned int Dim, class PixelType> void Update_WithDimAndPixelType();
77 template<unsigned int Dim, class PixelType, unsigned int DimCompo>
78 void Update_WithDimAndPixelTypeAndComponent();
80 //--------------------------------------------------------------------
81 template<class ImageType>
82 typename ImageType::Pointer ComputeImage(typename ImageType::Pointer inputImage);
84 }; // end class VFResampleGenericFilter
85 //--------------------------------------------------------------------
87 #include "clitkVFResampleGenericFilter.txx"
90 //--------------------------------------------------------------------
92 #endif /* end #define CLITKIMAGERESAMPLEGENERICFILTER_H */