1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
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
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.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
18 #ifndef CLITKIMAGECONVERT_CXX
19 #define CLITKIMAGECONVERT_CXX
21 -------------------------------------------------
22 * @file clitkImageConvert.cxx
23 * @author David Sarrut <david.sarrut@creatis.insa-lyon.fr>
24 * @date 03 Jul 2006 10:28:32
25 -------------------------------------------------*/
28 #include "clitkImageConvert_ggo.h"
30 #include "clitkImageCommon.h"
31 #include "clitkImageConvertGenericFilter.h"
33 //-------------------------------------------------------------------=
34 int main(int argc, char * argv[]) {
37 GGO(clitkImageConvert, args_info);
40 // Get list of filenames
41 std::vector<std::string> l;
42 for(unsigned int i=0; i<args_info.input_given; i++) {
43 l.push_back(args_info.input_arg[i]);
45 for(unsigned int i=0; i<args_info.inputs_num; i++) {
46 l.push_back(args_info.inputs[i]);
49 std::cerr << "Error, you should give at least one --input option or one image filename on the commande line." << std::endl;
54 clitk::ImageConvertGenericFilter::Pointer filter = clitk::ImageConvertGenericFilter::New();
55 filter->SetInputFilenames(l);
56 filter->SetIOVerbose(args_info.verbose_flag);
57 filter->SetOutputFilename(args_info.output_arg);
58 if (args_info.type_given) filter->SetOutputPixelType(args_info.type_arg);
63 // this is the end my friend
66 //-------------------------------------------------------------------=
68 #endif /* end #define CLITKIMAGECONVERT_CXX */