1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ======================================================================-====*/
19 =================================================
20 * @file clitkImageInfo.cxx
21 * @author David Sarrut <david.sarrut@creatis.insa-lyon.fr>
23 =================================================*/
26 #include "itkImageIOBase.h"
29 #include "clitkImageInfo_ggo.h"
31 #include "clitkImageCommon.h"
33 //====================================================================
34 int main(int argc, char * argv[])
38 GGO(clitkImageInfo, args_info);
42 if (args_info.inputs_num == 0) return 0;
45 for(unsigned int i=0; i<args_info.inputs_num; i++) {
46 itk::ImageIOBase::Pointer header = clitk::readImageHeader(args_info.inputs[i]);
48 if (args_info.name_flag) std::cout << "[" << args_info.inputs[i] << "]\t ";
49 if (args_info.long_given) {
50 // std::cout << std::endl;
51 clitk::printImageHeader(header, std::cout, args_info.long_arg);
53 if (args_info.verbose_flag) clitk::printImageHeader(header, std::cout, 1);
55 clitk::printImageHeader(header, std::cout, 0);
56 std::cout << std::endl;
59 } // heade null ; non fatal error
61 std::cerr << "*** Warning : I could not read '" << args_info.inputs[i] << "' ***" << std::endl;
65 // this is the end my friend
68 //====================================================================