]> Creatis software - clitk.git/blob - filters/clitkImageResampleGenericFilter.h
- essai pour compiler plus vite
[clitk.git] / filters / clitkImageResampleGenericFilter.h
1 #ifndef CLITKIMAGERESAMPLEGENERICFILTER_H
2 #define CLITKIMAGERESAMPLEGENERICFILTER_H
3
4 /**
5  -------------------------------------------------------------------
6  * @file   clitkImageResampleGenericFilter.h
7  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
8  * @date   23 Feb 2008 08:37:53
9
10  * @brief  
11  -------------------------------------------------------------------*/
12
13 // clitk include
14 #include "clitkImageToImageGenericFilter.h"
15
16 namespace clitk {
17   
18   //--------------------------------------------------------------------
19   class ImageResampleGenericFilter: 
20     public ImageToImageGenericFilter<ImageResampleGenericFilter> {
21     
22   public: 
23     // constructor
24     ImageResampleGenericFilter();
25
26     // Types
27     typedef ImageResampleGenericFilter    Self;
28     typedef itk::SmartPointer<Self>       Pointer;
29     typedef itk::SmartPointer<const Self> ConstPointer;
30
31     // New
32     itkNewMacro(Self);
33     
34     void SetOutputSize(const std::vector<int> & size);
35     void SetOutputSpacing(const std::vector<double> & spacing);
36     void SetGaussianSigma(const std::vector<double> & sigma);
37     void SetInterpolationName(const std::string & inter);
38     void SetDefaultPixelValue(double dpv) { mDefaultPixelValue = dpv;}
39     void SetBSplineOrder(int o) { mBSplineOrder = o; }
40     void SetBLUTSampling(int b) { mSamplingFactors.resize(1); mSamplingFactors[0] = b; }
41
42     //--------------------------------------------------------------------
43     template<class InputImageType> void UpdateWithInputImageType();
44
45   protected:
46     //--------------------------------------------------------------------
47     std::string mInterpolatorName;
48     std::vector<int> mOutputSize;
49     std::vector<double> mOutputSpacing;
50     std::vector<double> mOutputOrigin;
51     double mDefaultPixelValue;
52     bool mApplyGaussianFilterBefore;
53     std::vector<double> mSigma;
54     int mBSplineOrder;
55     std::vector<int> mSamplingFactors;
56
57     //--------------------------------------------------------------------
58     template<unsigned int Dim> void InitializeImageTypeWithDim();
59      
60   }; // end class ImageResampleGenericFilter
61   //--------------------------------------------------------------------
62     
63   //#include "clitkImageResampleGenericFilter.txx"
64
65 } // end namespace
66 //--------------------------------------------------------------------
67     
68 #endif /* end #define CLITKIMAGERESAMPLEGENERICFILTER_H */
69