Mercurial > hg > orthanc-stl
changeset 51:40a093f90be6 nexus
optimization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 18 May 2024 11:14:24 +0200 |
parents | bf4c4e4e7198 |
children | f9e49dc63817 |
files | Sources/Plugin.cpp |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/Sources/Plugin.cpp Fri May 17 17:16:07 2024 +0200 +++ b/Sources/Plugin.cpp Sat May 18 11:14:24 2024 +0200 @@ -943,12 +943,6 @@ "POST body missing string field \"" + std::string(KEY_CONTENT) + "\""); } - std::string nexus; - Orthanc::Toolbox::DecodeBase64(nexus, body[KEY_CONTENT].asString()); - - std::string raw; - Orthanc::Toolbox::EncodeDataUriScheme(raw, "application/octet-stream", nexus); - Json::Value creationBody = Json::objectValue; creationBody[KEY_TAGS] = body[KEY_TAGS]; @@ -957,7 +951,8 @@ creationBody[KEY_TAGS][Orthanc::DICOM_TAG_MODALITY.Format()] = "OT"; creationBody[KEY_TAGS][DICOM_TAG_CREATOR_VERSION_UID.Format()] = GetCreatorVersionUid(ORTHANC_STL_VERSION); creationBody[KEY_TAGS][Orthanc::DicomTag(ORTHANC_STL_PRIVATE_GROUP, ORTHANC_STL_CREATOR_ELEMENT).Format()] = ORTHANC_STL_PRIVATE_CREATOR; - creationBody[KEY_TAGS][Orthanc::DicomTag(ORTHANC_STL_PRIVATE_GROUP, ORTHANC_STL_NEXUS_ELEMENT).Format()] = raw; + creationBody[KEY_TAGS][Orthanc::DicomTag(ORTHANC_STL_PRIVATE_GROUP, ORTHANC_STL_NEXUS_ELEMENT).Format()] = + "data:application/octet-stream;base64," + body[KEY_CONTENT].asString(); creationBody[KEY_PRIVATE_CREATOR] = ORTHANC_STL_PRIVATE_CREATOR; if (body.isMember(KEY_PARENT))