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 =========================================================================*/
17 =================================================
18 * @file clitkImageInfo.cxx
19 * @author David Sarrut <david.sarrut@creatis.insa-lyon.fr>
21 =================================================*/
24 #include "clitkImageInfo_ggo.h"
27 //====================================================================
28 int main(int argc, char * argv[]) {
31 GGO(clitkImageInfo, args_info);
35 if (args_info.inputs_num == 0) return 0;
38 for(unsigned int i=0; i<args_info.inputs_num; i++) {
39 itk::ImageIOBase::Pointer header = clitk::readImageHeader(args_info.inputs[i]);
41 if (args_info.name_flag) std::cout << "[" << args_info.inputs[i] << "]\t ";
42 if (args_info.long_given) {
43 // std::cout << std::endl;
44 clitk::printImageHeader(header, std::cout, args_info.long_arg);
47 if (args_info.verbose_flag) clitk::printImageHeader(header, std::cout, 1);
49 clitk::printImageHeader(header, std::cout, 0);
50 std::cout << std::endl;
53 } // heade null ; non fatal error
55 std::cerr << "*** Warning : I could not read '" << args_info.inputs[i] << "' ***" << std::endl;
59 // this is the end my friend
62 //====================================================================