From: jpr Date: Fri, 7 Jan 2005 08:50:13 +0000 (+0000) Subject: Removal of useless and dangerous methods : X-Git-Tag: Version1.0.bp~453 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=703f7c3e72891da8384ad765aa7f66c2ba4943c4;p=gdcm.git Removal of useless and dangerous methods : GetDocEntryByName, GetEntryByName, GetDictEntryByName --- diff --git a/src/gdcmDocEntrySet.cxx b/src/gdcmDocEntrySet.cxx index 25673de8..395491db 100644 --- a/src/gdcmDocEntrySet.cxx +++ b/src/gdcmDocEntrySet.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.cxx,v $ Language: C++ - Date: $Date: 2005/01/06 17:20:53 $ - Version: $Revision: 1.32 $ + Date: $Date: 2005/01/07 08:50:13 $ + Version: $Revision: 1.33 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -34,42 +34,7 @@ namespace gdcm //----------------------------------------------------------------------------- // Public -/** - * \brief Gets a Dicom Element inside a SQ Item Entry, by name - * @param name of the element to be found. - * @return - */ -DocEntry* DocEntrySet::GetDocEntryByName( TagName const & name ) -{ - Dict *pubDict = Global::GetDicts()->GetDefaultPubDict(); - DictEntry *dictEntry = pubDict->GetDictEntryByName(name); - if( !dictEntry ) - { - return 0; - } - - return GetDocEntryByNumber(dictEntry->GetGroup(),dictEntry->GetElement()); -} - -/** - * \brief Get the value of a Dicom Element inside a SQ Item Entry, by name - * @param name : name of the searched element. - * @return - */ - -std::string DocEntrySet::GetEntryByName(TagName const & name) -{ - Dict *pubDict = Global::GetDicts()->GetDefaultPubDict(); - DictEntry *dictEntry = pubDict->GetDictEntryByName(name); - - if( !dictEntry ) - { - return GDCM_UNFOUND; - } - - return GetEntryByNumber(dictEntry->GetGroup(), dictEntry->GetElement()); -} /** * \brief Request a new virtual dict entry to the dict set @@ -160,29 +125,6 @@ SeqEntry* DocEntrySet::NewSeqEntryByNumber(uint16_t group,uint16_t elem) return newEntry; } -/** - * \brief Searches both the public and the shadow dictionary (when they - * exist) for the presence of the DictEntry with given name. - * The public dictionary has precedence on the shadow one. - * @param name Name of the searched DictEntry - * @return Corresponding DictEntry when it exists, NULL otherwise. - */ -DictEntry *DocEntrySet::GetDictEntryByName(TagName const & name) -{ - DictEntry *found = 0; - Dict *pubDict = Global::GetDicts()->GetDefaultPubDict(); - if (!pubDict) - { - dbg.Verbose(0, "Document::GetDictEntry", - "we SHOULD have a default dictionary"); - } - else - { - found = pubDict->GetDictEntryByName(name); - } - return found; -} - /** * \brief Searches both the public and the shadow dictionary (when they * exist) for the presence of the DictEntry with given diff --git a/src/gdcmDocEntrySet.h b/src/gdcmDocEntrySet.h index f554901a..173d514d 100644 --- a/src/gdcmDocEntrySet.h +++ b/src/gdcmDocEntrySet.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocEntrySet.h,v $ Language: C++ - Date: $Date: 2005/01/06 20:03:27 $ - Version: $Revision: 1.33 $ + Date: $Date: 2005/01/07 08:50:13 $ + Version: $Revision: 1.34 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -72,9 +72,7 @@ public: virtual DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t elem) = 0; - DocEntry *GetDocEntryByName(TagName const &name); virtual std::string GetEntryByNumber(uint16_t group, uint16_t elem) = 0; - std::string GetEntryByName(TagName const &name); DictEntry *NewVirtualDictEntry(uint16_t group, uint16_t element, @@ -92,7 +90,6 @@ protected: SeqEntry *NewSeqEntryByNumber(uint16_t group,uint16_t elem); // DictEntry related utilities - DictEntry *GetDictEntryByName (TagName const &name); DictEntry *GetDictEntryByNumber(uint16_t group, uint16_t elem); DictEntry *GetDictEntryByNumber(uint16_t group, uint16_t elem, TagName const &vr);