]> Creatis software - clitk.git/blob - tools/clitkResampleImageGenericFilter.cxx
b33e63e8ebadce91f82f7ebb197e2b0808f30f2e
[clitk.git] / tools / clitkResampleImageGenericFilter.cxx
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://www.centreleonberard.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
19 // clitk
20 #include "clitkResampleImageGenericFilter.h"
21 #include "clitkResampleImageWithOptionsFilter.h"
22
23 //--------------------------------------------------------------------
24 clitk::ResampleImageGenericFilter::ResampleImageGenericFilter():
25   ImageToImageGenericFilter<Self>("Resample") 
26 {
27   InitializeImageType<2>();
28   InitializeImageType<3>();
29   InitializeImageType<4>();
30 }
31 //--------------------------------------------------------------------
32
33
34 //--------------------------------------------------------------------
35 template<unsigned int Dim>
36 void clitk::ResampleImageGenericFilter::InitializeImageType() 
37 {      
38   ADD_DEFAULT_IMAGE_TYPES(Dim);
39   ADD_IMAGE_TYPE(Dim, short);
40 }
41 //--------------------------------------------------------------------
42   
43
44 //--------------------------------------------------------------------
45 void clitk::ResampleImageGenericFilter::SetArgsInfo(const ArgsInfoType & a) 
46 {
47   mArgsInfo=a;
48   if (mArgsInfo.imagetypes_flag) this->PrintAvailableImageTypes();
49   SetIOVerbose(mArgsInfo.verbose_flag);
50   if (mArgsInfo.input_given) {
51     SetInputFilename(mArgsInfo.input_arg);
52   }
53   if (mArgsInfo.output_given) {
54     SetOutputFilename(mArgsInfo.output_arg);
55   }
56 }
57 //--------------------------------------------------------------------
58