1 /*=========================================================================
4 Module: $RCSfile: PrintHeader.cxx,v $
6 Date: $Date: 2004/12/03 20:16:55 $
7 Version: $Revision: 1.12 $
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 =========================================================================*/
18 #include "gdcmHeader.h"
21 int main(int argc, char* argv[])
27 std::cout << argv[0] << " fileName" << std::endl;
36 fileName += GDCM_DATA_ROOT;
37 fileName += "/test.acr";
40 gdcm::Header *e1 = new gdcm::Header( fileName.c_str() );
44 int level = atoi(argv[2]);
45 e1->SetPrintLevel(level);
50 std::cout << "\n\n" << std::endl;
52 if ( e1->GetEntryByNumber(0x0002,0x0010) == gdcm::GDCM_NOTLOADED )
54 std::cout << "Transfert Syntax not loaded. " << std::endl
55 << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE"
60 std::string transferSyntaxName = e1->GetTransfertSyntaxName();
61 std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" << std::endl;
64 std::cout <<std::endl<<fileName<<" is Readable"<<std::endl;
66 std::cout <<std::endl<<fileName<<" is NOT Readable"<<std::endl;
67 std::cout<<std::flush;