comparison 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
comparison
equal deleted inserted replaced
5042:120945ce48b6 5043:ec5c203a97ea
2081 resource.tags_.ExtractResourceInformation(mainDicomTags, resource.type_); 2081 resource.tags_.ExtractResourceInformation(mainDicomTags, resource.type_);
2082 2082
2083 target[MAIN_DICOM_TAGS] = Json::objectValue; 2083 target[MAIN_DICOM_TAGS] = Json::objectValue;
2084 FromDcmtkBridge::ToJson(target[MAIN_DICOM_TAGS], mainDicomTags, format); 2084 FromDcmtkBridge::ToJson(target[MAIN_DICOM_TAGS], mainDicomTags, format);
2085 2085
2086 {// TODO add the sequences to the main dicom tags 2086 {// add the main DICOM sequences to the main dicom tags
2087 // const std::set<DicomTag>& mainDicomTags = DicomMap::MainDicomTagsConfiguration::GetInstance().GetMainDicomTagsByLevel(resource.type_); 2087 const std::set<DicomTag>& mainDicomTags = DicomMap::GetMainDicomTags(resource.type_);
2088 // mainDicomTags. 2088 std::set<DicomTag> mainDicomSequences;
2089 // resource.sequences_.ToJson(target[MAIN_DICOM_TAGS], format); 2089 DicomMap::ExtractSequences(mainDicomSequences, mainDicomTags);
2090 resource.sequences_.ToJson(target[MAIN_DICOM_TAGS], format, mainDicomSequences);
2090 } 2091 }
2091 2092
2092 if (resource.type_ == ResourceType_Study) 2093 if (resource.type_ == ResourceType_Study)
2093 { 2094 {
2094 DicomMap patientMainDicomTags; 2095 DicomMap patientMainDicomTags;
2106 resource.tags_.ExtractTags(tags, requestedTags); 2107 resource.tags_.ExtractTags(tags, requestedTags);
2107 2108
2108 target[REQUESTED_TAGS] = Json::objectValue; 2109 target[REQUESTED_TAGS] = Json::objectValue;
2109 FromDcmtkBridge::ToJson(target[REQUESTED_TAGS], tags, format); 2110 FromDcmtkBridge::ToJson(target[REQUESTED_TAGS], tags, format);
2110 2111
2111 // add the sequences to the requested tags 2112 {// add the requested sequences to the requested tags
2112 resource.sequences_.ToJson(target[REQUESTED_TAGS], format); 2113 std::set<DicomTag> requestedDicomSequences;
2114 DicomMap::ExtractSequences(requestedDicomSequences, requestedTags);
2115 resource.sequences_.ToJson(target[REQUESTED_TAGS], format, requestedDicomSequences);
2116 }
2117
2113 } 2118 }
2114 2119
2115 } 2120 }
2116 2121
2117 2122