Mercurial > hg > orthanc
comparison OrthancServer/main.cpp @ 3841:be7df7fe3d80
avoid one memcpy of the DICOM buffer on "POST /instances"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 Apr 2020 16:58:37 +0200 |
parents | 9fe1d64a748c |
children | bdbe12aba99f |
comparison
equal
deleted
inserted
replaced
3840:e7003b2203a7 | 3841:be7df7fe3d80 |
---|---|
80 if (dicomFile.size() > 0) | 80 if (dicomFile.size() > 0) |
81 { | 81 { |
82 DicomInstanceToStore toStore; | 82 DicomInstanceToStore toStore; |
83 toStore.SetOrigin(DicomInstanceOrigin::FromDicomProtocol | 83 toStore.SetOrigin(DicomInstanceOrigin::FromDicomProtocol |
84 (remoteIp.c_str(), remoteAet.c_str(), calledAet.c_str())); | 84 (remoteIp.c_str(), remoteAet.c_str(), calledAet.c_str())); |
85 toStore.SetBuffer(dicomFile); | 85 toStore.SetBuffer(dicomFile.c_str(), dicomFile.size()); |
86 toStore.SetSummary(dicomSummary); | 86 toStore.SetSummary(dicomSummary); |
87 toStore.SetJson(dicomJson); | 87 toStore.SetJson(dicomJson); |
88 | 88 |
89 std::string id; | 89 std::string id; |
90 context_.Store(id, toStore); | 90 context_.Store(id, toStore); |