X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestDict.cxx;h=d31510031ce6cbc8f2120b8ac0c6d56576285d6d;hb=6d79b5e185867ef00629f1ccb279c32daa6357d2;hp=8cf93f70b91684ee70b927cf3b92bea16071fe6e;hpb=3e82e8b67eddf5d4b95b6aa2a2e2615aced4c452;p=gdcm.git diff --git a/Testing/TestDict.cxx b/Testing/TestDict.cxx index 8cf93f70..d3151003 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/02/02 10:05:26 $ - Version: $Revision: 1.7 $ + Date: $Date: 2005/11/28 16:31:19 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -28,13 +28,13 @@ int TestDict(int , char *[]) std::cout << "----- Test Default Dicom Dictionary : ----------" << std::endl; // Just to improve test coverage: - gdcm::Dict *tempDict = new gdcm::Dict("dummyFileNameThatDoesntExist"); + gdcm::Dict *tempDict = gdcm::Dict::New("dummyFileNameThatDoesntExist"); // Default dict is supposed to be used. tempDict->Print(); std::cout << "---- end Test Default Dicom Dictionary : -------" << std::endl; // Lets delete it. - delete tempDict; + tempDict->Delete(); // Print the DictSet @@ -48,7 +48,7 @@ int TestDict(int , char *[]) std::cout<<"DictSet content :\n"; - gdcm::Dict *d = dicts->GetFirstEntry(); + gdcm::Dict *d = dicts->GetFirstDict(); if (!d) { std::cout << "Dictset is empty" << std::endl; @@ -63,7 +63,7 @@ int TestDict(int , char *[]) { std::cout << "------------- a Dict is found : ----------" << std::endl; d->Print(); - d = dicts->GetNextEntry(); + d = dicts->GetNextDict(); } // Print the Dict (public) @@ -81,7 +81,7 @@ int TestDict(int , char *[]) std::cout<<"#######################################################\n"; const int ENTRY_GR = 0x10; const int ENTRY_EL = 0x20; - std::string key=gdcm::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); + gdcm::TagKey key = gdcm::DictEntry::TranslateToKey(ENTRY_GR,ENTRY_EL); gdcm::DictEntry *entry=pubDict->GetEntry(ENTRY_GR,ENTRY_EL); if(!entry) { @@ -102,12 +102,11 @@ int TestDict(int , char *[]) entry=pubDict->GetNextEntry(); } - // Let's play with DicEntry stuff ! - +/* // Let's play with DicEntry stuff ! // First, we try to break an Entry. entry=pubDict->GetFirstEntry(); entry->SetVR("PN"); - // Should warn us ! + // Should warn us !*/ return(0); }