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 "itkImageIOBase.h"
27 #include "clitkImageInfo_ggo.h"
29 #include "clitkImageCommon.h"
31 //====================================================================
32 int main(int argc, char * argv[]) {
35 GGO(clitkImageInfo, args_info);
39 if (args_info.inputs_num == 0) return 0;
42 for(unsigned int i=0; i<args_info.inputs_num; i++) {
43 itk::ImageIOBase::Pointer header = clitk::readImageHeader(args_info.inputs[i]);
45 if (args_info.name_flag) std::cout << "[" << args_info.inputs[i] << "]\t ";
46 if (args_info.long_given) {
47 // std::cout << std::endl;
48 clitk::printImageHeader(header, std::cout, args_info.long_arg);
51 if (args_info.verbose_flag) clitk::printImageHeader(header, std::cout, 1);
53 clitk::printImageHeader(header, std::cout, 0);
54 std::cout << std::endl;
57 } // heade null ; non fatal error
59 std::cerr << "*** Warning : I could not read '" << args_info.inputs[i] << "' ***" << std::endl;
63 // this is the end my friend
66 //====================================================================