Mercurial > hg > orthanc
diff OrthancServer/Sources/ServerContext.cpp @ 5043:ec5c203a97ea
returning sequences in MainDicomTags and RequestedTags
author | Alain Mazy <am@osimis.io> |
---|---|
date | Mon, 27 Jun 2022 15:22:19 +0200 |
parents | 1c08cd68250a |
children | 6fed78e13233 |
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp Mon Jun 27 14:09:17 2022 +0200 +++ b/OrthancServer/Sources/ServerContext.cpp Mon Jun 27 15:22:19 2022 +0200 @@ -2083,10 +2083,11 @@ target[MAIN_DICOM_TAGS] = Json::objectValue; FromDcmtkBridge::ToJson(target[MAIN_DICOM_TAGS], mainDicomTags, format); - {// TODO add the sequences to the main dicom tags - // const std::set<DicomTag>& mainDicomTags = DicomMap::MainDicomTagsConfiguration::GetInstance().GetMainDicomTagsByLevel(resource.type_); - // mainDicomTags. - // resource.sequences_.ToJson(target[MAIN_DICOM_TAGS], format); + {// add the main DICOM sequences to the main dicom tags + const std::set<DicomTag>& mainDicomTags = DicomMap::GetMainDicomTags(resource.type_); + std::set<DicomTag> mainDicomSequences; + DicomMap::ExtractSequences(mainDicomSequences, mainDicomTags); + resource.sequences_.ToJson(target[MAIN_DICOM_TAGS], format, mainDicomSequences); } if (resource.type_ == ResourceType_Study) @@ -2108,8 +2109,12 @@ target[REQUESTED_TAGS] = Json::objectValue; FromDcmtkBridge::ToJson(target[REQUESTED_TAGS], tags, format); - // add the sequences to the requested tags - resource.sequences_.ToJson(target[REQUESTED_TAGS], format); + {// add the requested sequences to the requested tags + std::set<DicomTag> requestedDicomSequences; + DicomMap::ExtractSequences(requestedDicomSequences, requestedTags); + resource.sequences_.ToJson(target[REQUESTED_TAGS], format, requestedDicomSequences); + } + } }