Mercurial > hg > orthanc
diff OrthancServer/ServerToolbox.cpp @ 2123:1cf093cbdad8
cleaning up
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 11:51:40 +0100 |
parents | 2ecc95a239f7 |
children | 0c09d1af22f3 |
line wrap: on
line diff
--- a/OrthancServer/ServerToolbox.cpp Mon Nov 07 11:33:18 2016 +0100 +++ b/OrthancServer/ServerToolbox.cpp Mon Nov 07 11:51:40 2016 +0100 @@ -237,6 +237,30 @@ } + static void StoreIdentifiers(IDatabaseWrapper& database, + int64_t resource, + ResourceType level, + const DicomMap& map) + { + const DicomTag* tags; + size_t size; + + LoadIdentifiers(tags, size, level); + + for (size_t i = 0; i < size; i++) + { + const DicomValue* value = map.TestAndGetValue(tags[i]); + if (value != NULL && + !value->IsNull() && + !value->IsBinary()) + { + std::string s = NormalizeIdentifier(value->GetContent()); + database.SetIdentifierTag(resource, tags[i], s); + } + } + } + + void StoreMainDicomTags(IDatabaseWrapper& database, int64_t resource, ResourceType level, @@ -466,29 +490,5 @@ return false; } - - - void StoreIdentifiers(IDatabaseWrapper& database, - int64_t resource, - ResourceType level, - const DicomMap& map) - { - const DicomTag* tags; - size_t size; - - LoadIdentifiers(tags, size, level); - - for (size_t i = 0; i < size; i++) - { - const DicomValue* value = map.TestAndGetValue(tags[i]); - if (value != NULL && - !value->IsNull() && - !value->IsBinary()) - { - std::string s = NormalizeIdentifier(value->GetContent()); - database.SetIdentifierTag(resource, tags[i], s); - } - } - } } }