1 /*-------------------------------------------------------------------------
6 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
7 l'Image). All rights reserved. See Doc/License.txt or
8 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notices for more information.
14 -------------------------------------------------------------------------*/
16 #ifndef CLITKIMAGECONVERT_CXX
17 #define CLITKIMAGECONVERT_CXX
20 -------------------------------------------------
21 * @file clitkImageConvert.cxx
22 * @author David Sarrut <david.sarrut@creatis.insa-lyon.fr>
23 * @date 03 Jul 2006 10:28:32
24 -------------------------------------------------*/
27 #include "clitkImageConvert_ggo.h"
29 #include "clitkImageCommon.h"
30 #include "clitkImageConvertGenericFilter.h"
32 //-------------------------------------------------------------------=
33 int main(int argc, char * argv[]) {
36 GGO(clitkImageConvert, args_info);
39 // Get list of filenames
40 std::vector<std::string> l;
41 for(unsigned int i=0; i<args_info.input_given; i++) {
42 l.push_back(args_info.input_arg[i]);
44 for(unsigned int i=0; i<args_info.inputs_num; i++) {
45 l.push_back(args_info.inputs[i]);
48 std::cerr << "Error, you should give at least one --input option or one image filename on the commande line." << std::endl;
53 clitk::ImageConvertGenericFilter::Pointer filter = clitk::ImageConvertGenericFilter::New();
54 filter->SetInputFilenames(l);
55 filter->SetIOVerbose(args_info.verbose_flag);
56 filter->SetOutputFilename(args_info.output_arg);
57 if (args_info.type_given) filter->SetOutputPixelType(args_info.type_arg);
62 // this is the end my friend
65 //-------------------------------------------------------------------=
67 #endif /* end #define CLITKIMAGECONVERT_CXX */