comparison OrthancServer/DicomInstanceToStore.h @ 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 0c16051dfd56
children 281045a1e6db
comparison
equal deleted inserted replaced
3840:e7003b2203a7 3841:be7df7fe3d80
57 DicomInstanceToStore(); 57 DicomInstanceToStore();
58 58
59 void SetOrigin(const DicomInstanceOrigin& origin); 59 void SetOrigin(const DicomInstanceOrigin& origin);
60 60
61 const DicomInstanceOrigin& GetOrigin() const; 61 const DicomInstanceOrigin& GetOrigin() const;
62 62
63 void SetBuffer(const std::string& dicom); 63 // WARNING: The buffer is not copied, it must not be removed as
64 // long as the "DicomInstanceToStore" object is alive
65 void SetBuffer(const void* dicom,
66 size_t size);
64 67
65 void SetParsedDicomFile(ParsedDicomFile& parsed); 68 void SetParsedDicomFile(ParsedDicomFile& parsed);
66 69
67 void SetSummary(const DicomMap& summary); 70 void SetSummary(const DicomMap& summary);
68 71
74 77
75 void AddMetadata(ResourceType level, 78 void AddMetadata(ResourceType level,
76 MetadataType metadata, 79 MetadataType metadata,
77 const std::string& value); 80 const std::string& value);
78 81
79 const char* GetBufferData(); 82 const void* GetBufferData();
80 83
81 size_t GetBufferSize(); 84 size_t GetBufferSize();
82 85
83 const DicomMap& GetSummary(); 86 const DicomMap& GetSummary();
84 87