1 #ifndef CLITKIMAGERESAMPLEGENERICFILTER_H
2 #define CLITKIMAGERESAMPLEGENERICFILTER_H
5 -------------------------------------------------------------------
6 * @file clitkImageResampleGenericFilter.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 "itkImageFileReader.h"
21 #include "itkImageSeriesReader.h"
22 #include "itkImageFileWriter.h"
23 #include "itkRecursiveGaussianImageFilter.h"
24 #include "itkResampleImageFilter.h"
25 #include "itkAffineTransform.h"
26 #include "itkNearestNeighborInterpolateImageFunction.h"
27 #include "itkLinearInterpolateImageFunction.h"
28 #include "itkBSplineInterpolateImageFunction.h"
29 #include "itkBSplineInterpolateImageFunctionWithLUT.h"
30 #include "itkCommand.h"
34 //--------------------------------------------------------------------
35 class ImageResampleGenericFilter:
36 public ImageToImageGenericFilter<ImageResampleGenericFilter> {
40 ImageResampleGenericFilter();
43 typedef ImageResampleGenericFilter Self;
44 typedef itk::SmartPointer<Self> Pointer;
45 typedef itk::SmartPointer<const Self> ConstPointer;
50 void SetOutputSize(const std::vector<int> & size);
51 void SetOutputSpacing(const std::vector<double> & spacing);
52 void SetGaussianSigma(const std::vector<double> & sigma);
53 void SetInterpolationName(const std::string & inter);
54 void SetDefaultPixelValue(double dpv) { mDefaultPixelValue = dpv;}
55 void SetBSplineOrder(int o) { mBSplineOrder = o; }
56 void SetBLUTSampling(int b) { mSamplingFactors.resize(1); mSamplingFactors[0] = b; }
58 //--------------------------------------------------------------------
59 template<class InputImageType> void UpdateWithInputImageType();
62 //--------------------------------------------------------------------
63 std::string mInterpolatorName;
64 std::vector<int> mOutputSize;
65 std::vector<double> mOutputSpacing;
66 std::vector<double> mOutputOrigin;
67 double mDefaultPixelValue;
68 bool mApplyGaussianFilterBefore;
69 std::vector<double> mSigma;
71 std::vector<int> mSamplingFactors;
73 //--------------------------------------------------------------------
74 template<unsigned int Dim> void InitializeImageTypeWithDim();
76 }; // end class ImageResampleGenericFilter
77 //--------------------------------------------------------------------
79 #include "clitkImageResampleGenericFilter.txx"
82 //--------------------------------------------------------------------
84 #endif /* end #define CLITKIMAGERESAMPLEGENERICFILTER_H */