]> Creatis software - clitk.git/blob - filters/clitkImageResampleGenericFilter.h
added the new headers
[clitk.git] / filters / clitkImageResampleGenericFilter.h
1 /*=========================================================================
2   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
3
4   Authors belong to: 
5   - University of LYON              http://www.universite-lyon.fr/
6   - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
7   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
8
9   This software is distributed WITHOUT ANY WARRANTY; without even
10   the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11   PURPOSE.  See the copyright notices for more information.
12
13   It is distributed under dual licence
14
15   - BSD        See included LICENSE.txt file
16   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef CLITKIMAGERESAMPLEGENERICFILTER_H
19 #define CLITKIMAGERESAMPLEGENERICFILTER_H
20 /**
21  -------------------------------------------------------------------
22  * @file   clitkImageResampleGenericFilter.h
23  * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
24  * @date   23 Feb 2008 08:37:53
25
26  * @brief  
27  -------------------------------------------------------------------*/
28
29 // clitk include
30 #include "clitkImageToImageGenericFilter.h"
31
32 namespace clitk {
33   
34   //--------------------------------------------------------------------
35   class ImageResampleGenericFilter: 
36     public ImageToImageGenericFilter<ImageResampleGenericFilter> {
37     
38   public: 
39     // constructor
40     ImageResampleGenericFilter();
41
42     // Types
43     typedef ImageResampleGenericFilter    Self;
44     typedef itk::SmartPointer<Self>       Pointer;
45     typedef itk::SmartPointer<const Self> ConstPointer;
46
47     // New
48     itkNewMacro(Self);
49     
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; }
57
58     //--------------------------------------------------------------------
59     template<class InputImageType> void UpdateWithInputImageType();
60
61   protected:
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;
70     int mBSplineOrder;
71     std::vector<int> mSamplingFactors;
72
73     //--------------------------------------------------------------------
74     template<unsigned int Dim> void InitializeImageTypeWithDim();
75      
76   }; // end class ImageResampleGenericFilter
77   //--------------------------------------------------------------------
78     
79   //#include "clitkImageResampleGenericFilter.txx"
80
81 } // end namespace
82 //--------------------------------------------------------------------
83     
84 #endif /* end #define CLITKIMAGERESAMPLEGENERICFILTER_H */
85