From b99fc00d0f4df0ddcee535b792e7ea6826fd0397 Mon Sep 17 00:00:00 2001 From: jpr Date: Mon, 25 Apr 2005 14:07:05 +0000 Subject: [PATCH] Remove useless PrintHeader (replaced by PrintDocument) --- Example/CMakeLists.txt | 3 +- Example/PrintDocument.cxx | 14 +++++-- Example/PrintHeader.cxx | 78 --------------------------------------- 3 files changed, 13 insertions(+), 82 deletions(-) delete mode 100644 Example/PrintHeader.cxx diff --git a/Example/CMakeLists.txt b/Example/CMakeLists.txt index b9c601cc..58ec6c0a 100644 --- a/Example/CMakeLists.txt +++ b/Example/CMakeLists.txt @@ -20,13 +20,14 @@ SET(EXAMPLE_SOURCES PrintDicomDir PrintDocument PrintFile - PrintHeader FindTags MakeDicomDir AnonymizeDicomDir # without loading it as a gdcm::DicomDir #the following will be transformed into 'examples', or 'utilities' # or will be removed +# +# Better you don't use them (not fully checked ...) #test FlatHashTablePrint diff --git a/Example/PrintDocument.cxx b/Example/PrintDocument.cxx index 4d3a2e38..d94d8112 100644 --- a/Example/PrintDocument.cxx +++ b/Example/PrintDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: PrintDocument.cxx,v $ Language: C++ - Date: $Date: 2005/04/05 10:28:59 $ - Version: $Revision: 1.12 $ + Date: $Date: 2005/04/25 14:07:05 $ + Version: $Revision: 1.13 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -59,7 +59,15 @@ int main(int argc, char *argv[]) e1->Print(); - std::cout << "\n\n" << std::endl; + std::cout << "\n\n" << std::endl; + + if ( e1->GetEntryValue(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) + { + std::cout << "Transfer Syntax not loaded. " << std::endl + << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE" + << std::endl; + return 0; + } if(e1->IsReadable()) std::cout < - -int main(int argc, char* argv[]) -{ - std::string fileName; - - if (argc == 1) - { - std::cout << argv[0] << " fileName printLevel debug" << std::endl; - } - - if (argc > 1) - { - fileName=argv[1]; - } - else - { - fileName += GDCM_DATA_ROOT; - fileName += "/test.acr"; - } - - if (argc > 3) - gdcm::Debug::DebugOn(); - - gdcm::File *e1 = new gdcm::File( fileName.c_str() ); - - if (argc > 2) - { - int level = atoi(argv[2]); - e1->SetPrintLevel(level); - } - - e1->Print(); - - std::cout << "\n\n" << std::endl; - - if ( e1->GetEntryValue(0x0002,0x0010) == gdcm::GDCM_NOTLOADED ) - { - std::cout << "Transfer Syntax not loaded. " << std::endl - << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE" - << std::endl; - return 0; - } - - std::string transferSyntaxName = e1->GetTransferSyntaxName(); - std::cout << " TransferSyntaxName= [" << transferSyntaxName << "]" - << std::endl; - std::cout << " SwapCode= " << e1->GetSwapCode() << std::endl; - - if(e1->IsReadable()) - std::cout <