X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestDict.cxx;h=aa6b1ffd5f57106521535e3c5dcd0d923497cd49;hb=6278320cc85da00d2d56ffbf07806e84966892c3;hp=d31510031ce6cbc8f2120b8ac0c6d56576285d6d;hpb=41559a6f2d66bcd4af4db17a0d9668df37d19f3b;p=gdcm.git diff --git a/Testing/TestDict.cxx b/Testing/TestDict.cxx index d3151003..aa6b1ffd 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/11/28 16:31:19 $ - Version: $Revision: 1.11 $ + Date: $Date: 2007/05/23 14:18:06 $ + 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 @@ -28,7 +28,7 @@ int TestDict(int , char *[]) std::cout << "----- Test Default Dicom Dictionary : ----------" << std::endl; // Just to improve test coverage: - gdcm::Dict *tempDict = gdcm::Dict::New("dummyFileNameThatDoesntExist"); + GDCM_NAME_SPACE::Dict *tempDict = GDCM_NAME_SPACE::Dict::New("dummyFileNameThatDoesntExist"); // Default dict is supposed to be used. tempDict->Print(); std::cout << "---- end Test Default Dicom Dictionary : -------" << std::endl; @@ -39,7 +39,7 @@ int TestDict(int , char *[]) // Print the DictSet std::cout<<"#######################################################\n"; - gdcm::DictSet *dicts=gdcm::Global::GetDicts(); + GDCM_NAME_SPACE::DictSet *dicts=GDCM_NAME_SPACE::Global::GetDicts(); if(!dicts) { std::cout<<"DictSet hasn't be found... Failed\n"; @@ -48,7 +48,7 @@ int TestDict(int , char *[]) std::cout<<"DictSet content :\n"; - gdcm::Dict *d = dicts->GetFirstDict(); + GDCM_NAME_SPACE::Dict *d = dicts->GetFirstDict(); if (!d) { std::cout << "Dictset is empty" << std::endl; @@ -68,7 +68,7 @@ int TestDict(int , char *[]) // Print the Dict (public) std::cout<<"#######################################################\n"; - gdcm::Dict *pubDict=dicts->GetDefaultPubDict(); + GDCM_NAME_SPACE::Dict *pubDict=dicts->GetDefaultPubDict(); if(!pubDict) { std::cout<<"The public Dict hasn't be found... Failed\n"; @@ -81,8 +81,8 @@ int TestDict(int , char *[]) std::cout<<"#######################################################\n"; const int ENTRY_GR = 0x10; const int ENTRY_EL = 0x20; - gdcm::TagKey key = gdcm::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); - gdcm::DictEntry *entry=pubDict->GetEntry(ENTRY_GR,ENTRY_EL); + GDCM_NAME_SPACE::TagKey key = GDCM_NAME_SPACE::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); + GDCM_NAME_SPACE::DictEntry *entry=pubDict->GetEntry(ENTRY_GR,ENTRY_EL); if(!entry) { std::cout<<"The DictEntry hasn't be found... Failed\n"; @@ -96,9 +96,9 @@ int TestDict(int , char *[]) entry=pubDict->GetFirstEntry(); while(entry) { - std::cout << entry->GetGroup() << "|" << entry->GetElement() - << " [" << entry->GetVR() << "] - M" << entry->GetVM() - << " : " << entry->GetName() << " ( " << entry->GetKey() << ")\n"; + std::cout << std::hex << entry->GetGroup() << "|" << entry->GetElement() + << " [" << entry->GetVR() << "] - VM [" << entry->GetVM() + << "] : " << entry->GetName() << " ( " << entry->GetKey() << ")\n"; entry=pubDict->GetNextEntry(); }