Mercurial > hg > orthanc
diff OrthancServer/ServerToolbox.cpp @ 1711:5ebd6cbb3da8 db-changes
Backed out changeset 2ad22b2970a2
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 16 Oct 2015 17:36:07 +0200 |
parents | 2ad22b2970a2 |
children | 4db9200c7f46 |
line wrap: on
line diff
--- a/OrthancServer/ServerToolbox.cpp Tue Oct 13 17:48:30 2015 +0200 +++ b/OrthancServer/ServerToolbox.cpp Fri Oct 16 17:36:07 2015 +0200 @@ -307,19 +307,11 @@ break; case ResourceType_Study: - { Toolbox::SetMainDicomTags(database, resource, ResourceType_Study, dicomSummary, true); // Duplicate the patient tags at the study level (new in Orthanc 0.9.5 - db v6) Toolbox::SetMainDicomTags(database, resource, ResourceType_Patient, dicomSummary, false); - - DicomMap module; - Toolbox::ExtractModule(module, dicomSummary, DicomModule_Patient, true /* normalize */); - Toolbox::ExtractModule(module, dicomSummary, DicomModule_Study, true /* normalize */); - database.StoreStudyModule(resource, module); - break; - } case ResourceType_Series: Toolbox::SetMainDicomTags(database, resource, ResourceType_Series, dicomSummary, true); @@ -334,34 +326,5 @@ } } } - - - void ExtractModule(DicomMap& result, // WARNING: Will not be cleared! - const DicomMap& summary, - DicomModule module, - bool normalize) - { - typedef std::set<DicomTag> ModuleTags; - ModuleTags moduleTags; - DicomTag::AddTagsForModule(moduleTags, module); - - for (ModuleTags::const_iterator tag = moduleTags.begin(); tag != moduleTags.end(); ++tag) - { - const DicomValue* value = summary.TestAndGetValue(*tag); - if (value != NULL && - !value->IsNull()) - { - std::string t = value->AsString(); - - if (normalize) - { - t = StripSpaces(ConvertToAscii(t)); - ToUpperCase(t); - } - - result.SetValue(*tag, t); - } - } - } } }