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