# HG changeset patch # User Sebastien Jodogne # Date 1734344689 -3600 # Node ID a85c0dca48097086194fc4af65654049156ea356 # Parent 4b61fdced20d872c549c490e6c20a94e8ea2bcc5 simplification by removing MultipleTags and MultipleMetadata in protobuf diff -r 4b61fdced20d -r a85c0dca4809 OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp --- 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(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()); } } diff -r 4b61fdced20d -r a85c0dca4809 OrthancServer/Plugins/Include/orthanc/OrthancDatabasePlugin.proto --- 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; }