Mercurial > hg > orthanc
changeset 5923:a85c0dca4809 find-refactoring
simplification by removing MultipleTags and MultipleMetadata in protobuf
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 16 Dec 2024 11:24:49 +0100 |
parents | 4b61fdced20d |
children | 79cd099a2e8d |
files | OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto |
diffstat | 2 files changed, 4 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp Fri Dec 13 08:48:47 2024 +0100 +++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp Mon Dec 16 11:24:49 2024 +0100 @@ -339,21 +339,13 @@ for (int i = 0; i < source.main_dicom_tags().size(); i++) { const DicomTag tag(source.main_dicom_tags(i).group(), source.main_dicom_tags(i).element()); - - for (int j = 0; j < source.main_dicom_tags(i).values().size(); j++) - { - target.AddChildrenMainDicomTagValue(level, tag, source.main_dicom_tags(i).values(j)); - } + target.AddChildrenMainDicomTagValue(level, tag, source.main_dicom_tags(i).value()); } for (int i = 0; i < source.metadata().size(); i++) { MetadataType key = static_cast<MetadataType>(source.metadata(i).key()); - - for (int j = 0; j < source.metadata(i).values().size(); j++) - { - target.AddChildrenMetadataValue(level, key, source.metadata(i).values(j)); - } + target.AddChildrenMetadataValue(level, key, source.metadata(i).value()); } }
--- a/OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto Fri Dec 13 08:48:47 2024 +0100 +++ b/OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto Mon Dec 16 11:24:49 2024 +0100 @@ -929,23 +929,14 @@ string value = 2; int64 revision = 3; } - message MultipleTags { - uint32 group = 1; - uint32 element = 2; - repeated string values = 3; - } - message MultipleMetadata { - int32 key = 1; - repeated string values = 2; - } message ResourceContent { repeated Tag main_dicom_tags = 1; repeated Metadata metadata = 2; } message ChildrenContent { repeated string identifiers = 1; - repeated MultipleTags main_dicom_tags = 2; - repeated MultipleMetadata metadata = 3; + repeated Tag main_dicom_tags = 2; + repeated Metadata metadata = 3; // As of Orthanc 1.12.5, the "revision" field is unused in this case uint64 count = 4; }