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