X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=Testing%2FTestDict.cxx;h=db151958f1c070bd188ea57bbd73d2fa9262e369;hb=4b66b19dfd3c15f96b843923ca587252bf988cde;hp=c85556867871211d25f79b0ec32341bcedae602d;hpb=2d904af67885813204df40d1eae7c3067784a9d5;p=gdcm.git diff --git a/Testing/TestDict.cxx b/Testing/TestDict.cxx index c8555686..db151958 100644 --- a/Testing/TestDict.cxx +++ b/Testing/TestDict.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDict.cxx,v $ Language: C++ - Date: $Date: 2005/01/17 14:18:48 $ - Version: $Revision: 1.3 $ + Date: $Date: 2005/01/24 14:14:09 $ + Version: $Revision: 1.5 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,8 +36,7 @@ int TestDict(int , char* []) std::cout<<"DictSet content :\n"; - dicts->InitTraversal(); - gdcm::Dict *d = dicts->GetNextEntry(); + gdcm::Dict *d = dicts->GetFirstEntry(); if (!d) { std::cout << "Dictset is empty" << std::endl; @@ -66,7 +65,7 @@ int TestDict(int , char* []) const int ENTRY_GR = 0x10; const int ENTRY_EL = 0x20; std::string key=gdcm::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); - gdcm::DictEntry *entry=pubDict->GetDictEntry(ENTRY_GR,ENTRY_EL); + gdcm::DictEntry *entry=pubDict->GetEntry(ENTRY_GR,ENTRY_EL); if(!entry) { std::cout<<"The DictEntry hasn't be found... Failed\n"; @@ -77,11 +76,12 @@ int TestDict(int , char* []) // Print all the DictEntry std::cout<<"#######################################################\n"; - pubDict->InitTraversal(); - entry=pubDict->GetNextEntry(); + entry=pubDict->GetFirstEntry(); while(entry) { - entry->Print(); + std::cout << entry->GetGroup() << "|" << entry->GetElement() + << " [" << entry->GetVR() << "] - M" << entry->GetVM() + << " : " << entry->GetName() << " ( " << entry->GetKey() << ")\n"; entry=pubDict->GetNextEntry(); }