Mercurial > hg > orthanc
comparison OrthancFramework/Sources/DicomParsing/ParsedDicomFile.cpp @ 4508:8f9090b137f1
Optimization in C-STORE SCP by avoiding an unnecessary DICOM parsing
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 11 Feb 2021 11:00:05 +0100 |
parents | b4c58795f3a8 |
children | 11bfea08341a |
comparison
equal
deleted
inserted
replaced
4507:b4c58795f3a8 | 4508:8f9090b137f1 |
---|---|
968 } | 968 } |
969 | 969 |
970 | 970 |
971 void ParsedDicomFile::SaveToMemoryBuffer(std::string& buffer) | 971 void ParsedDicomFile::SaveToMemoryBuffer(std::string& buffer) |
972 { | 972 { |
973 FromDcmtkBridge::SaveToMemoryBuffer(buffer, *GetDcmtkObject().getDataset()); | 973 if (!FromDcmtkBridge::SaveToMemoryBuffer(buffer, *GetDcmtkObject().getDataset())) |
974 { | |
975 throw OrthancException(ErrorCode_InternalError, "Cannot write DICOM file to memory"); | |
976 } | |
974 } | 977 } |
975 | 978 |
976 | 979 |
977 #if ORTHANC_SANDBOXED == 0 | 980 #if ORTHANC_SANDBOXED == 0 |
978 void ParsedDicomFile::SaveToFile(const std::string& path) | 981 void ParsedDicomFile::SaveToFile(const std::string& path) |