X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestDict.cxx;h=2a85a6c85e1d84e08172234501ded0ccec254132;hb=b4c2328075505f0a7e95763848fa57a0337fe8b4;hp=a883b4774a22f36910111e74a69d5114c72a29dd;hpb=f0022701102f3d16398d908a2b526fb36f334e31;p=gdcm.git diff --git a/Testing/TestDict.cxx b/Testing/TestDict.cxx index a883b477..2a85a6c8 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/07/11 14:53:15 $ - Version: $Revision: 1.8 $ + Date: $Date: 2005/11/29 17:08:54 $ + Version: $Revision: 1.12 $ 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) @@ -96,18 +96,17 @@ 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(); } - // 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); }