X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Example%2FPrintFile.cxx;h=6135c783aa29c9efe929b31f5c9c012aee98e439;hb=1e8074191600434684069ea9fad2931507fcdb2f;hp=bb9789abff2b92bf1acaa4258f6bc73a0a957d27;hpb=964607da17055748464e4fdacd807d7e60a9c322;p=gdcm.git diff --git a/Example/PrintFile.cxx b/Example/PrintFile.cxx index bb9789ab..6135c783 100644 --- a/Example/PrintFile.cxx +++ b/Example/PrintFile.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintFile.cxx,v $ Language: C++ - Date: $Date: 2005/02/01 11:13:08 $ - Version: $Revision: 1.28 $ + Date: $Date: 2005/04/05 10:28:59 $ + Version: $Revision: 1.31 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,35 +21,38 @@ #include -int main(int argc, char* argv[]) +int main(int argc, char *argv[]) { gdcm::File *e1; gdcm::FileHelper *f1; - std::string fileName; - if (argc != 2) + std::string fileName; + + if (argc == 1) { - std::cout << " usage : PrintDocument fileName printLevel debug" + std::cout << " usage : PrintFile fileName printLevel debug " + << "short (=NOSEQ + NOSHADOW)" << std::endl; + return 0; } + e1 = new gdcm::File(); + if (argc > 1) { fileName=argv[1]; } - else - { - fileName += GDCM_DATA_ROOT; - fileName += "/test.acr"; - } - if (argc > 3) gdcm::Debug::DebugOn(); + + if (argc > 4) + e1->SetLoadMode(NO_SEQ | NO_SHADOW); - e1 = new gdcm::File( fileName.c_str() ); + e1->Load( fileName.c_str() ); + f1 = new gdcm::FileHelper(e1); - if (argc > 2) + if (argc > 2) // keep it here (f1 needs to be constructed !) { int level = atoi(argv[2]); f1->SetPrintLevel(level); @@ -106,6 +109,7 @@ int main(int argc, char* argv[]) std::cout <