Mercurial > hg > orthanc
diff OrthancServer/Sources/OrthancInitialization.cpp @ 4944:f377d5643538 more-tags
new Warnings configuration + InstanceAvailability tag
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 17 Mar 2022 17:03:59 +0100 |
parents | 94a7b681b340 |
children | 877bc3b96476 |
line wrap: on
line diff
--- a/OrthancServer/Sources/OrthancInitialization.cpp Wed Mar 16 09:50:33 2022 +0100 +++ b/OrthancServer/Sources/OrthancInitialization.cpp Thu Mar 17 17:03:59 2022 +0100 @@ -252,8 +252,24 @@ { const std::string& tagName = content[t].asString(); DicomTag tag(FromDcmtkBridge::ParseTag(tagName)); - DicomMap::AddMainDicomTag(tag, tagName, level); - LOG(INFO) << " - " << tagName; + + if (DicomMap::IsComputedTag(tag)) + { + LOG(WARNING) << " - " << tagName << " can not be added in the Extra Main Dicom Tags since the value of this tag is computed when requested"; + } + else + { + ValueRepresentation vr = FromDcmtkBridge::LookupValueRepresentation(tag); + if (vr == ValueRepresentation_Sequence) + { + LOG(WARNING) << " - " << tagName << " can not be added in the Extra Main Dicom Tags since it is a sequence"; + } + else + { + DicomMap::AddMainDicomTag(tag, tagName, level); + LOG(INFO) << " - " << tagName; + } + } } } } @@ -357,6 +373,8 @@ LoadExternalDictionaries(lock.GetJson()); // New in Orthanc 1.9.4 LoadCustomDictionary(lock.GetJson()); + lock.GetConfiguration().LoadWarnings(); + LoadMainDicomTags(lock.GetJson()); // New in Orthanc 1.11.0 lock.GetConfiguration().RegisterFont(ServerResources::FONT_UBUNTU_MONO_BOLD_16);