comparison OrthancServer/Sources/ServerContext.h @ 4511:1ec156a0da38

ServerContext::ReadDicomUntilPixelData()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Feb 2021 19:06:29 +0100
parents 98b7b9d21d83
children 1f455b86b054
comparison
equal deleted inserted replaced
4510:a3635a01a945 4511:1ec156a0da38
157 unsigned int sleepDelay); 157 unsigned int sleepDelay);
158 158
159 static void SaveJobsThread(ServerContext* that, 159 static void SaveJobsThread(ServerContext* that,
160 unsigned int sleepDelay); 160 unsigned int sleepDelay);
161 161
162 void ReadDicomAsJsonInternal(std::string& result,
163 const std::string& instancePublicId);
164
165 void SaveJobsEngine(); 162 void SaveJobsEngine();
166 163
167 virtual void SignalJobSubmitted(const std::string& jobId) ORTHANC_OVERRIDE; 164 virtual void SignalJobSubmitted(const std::string& jobId) ORTHANC_OVERRIDE;
168 165
169 virtual void SignalJobSuccess(const std::string& jobId) ORTHANC_OVERRIDE; 166 virtual void SignalJobSuccess(const std::string& jobId) ORTHANC_OVERRIDE;
314 void ChangeAttachmentCompression(const std::string& resourceId, 311 void ChangeAttachmentCompression(const std::string& resourceId,
315 FileContentType attachmentType, 312 FileContentType attachmentType,
316 CompressionType compression); 313 CompressionType compression);
317 314
318 void ReadDicomAsJson(std::string& result, 315 void ReadDicomAsJson(std::string& result,
319 const std::string& instancePublicId, 316 const std::string& instancePublicId);
320 const std::set<DicomTag>& ignoreTagLength);
321 317
322 void ReadDicomAsJson(Json::Value& result, 318 void ReadDicomAsJson(Json::Value& result,
323 const std::string& instancePublicId, 319 const std::string& instancePublicId,
324 const std::set<DicomTag>& ignoreTagLength); 320 const std::set<DicomTag>& ignoreTagLength);
325 321
326 void ReadDicomAsJson(std::string& result,
327 const std::string& instancePublicId)
328 {
329 std::set<DicomTag> ignoreTagLength;
330 ReadDicomAsJson(result, instancePublicId, ignoreTagLength);
331 }
332
333 void ReadDicomAsJson(Json::Value& result, 322 void ReadDicomAsJson(Json::Value& result,
334 const std::string& instancePublicId) 323 const std::string& instancePublicId);
335 {
336 std::set<DicomTag> ignoreTagLength;
337 ReadDicomAsJson(result, instancePublicId, ignoreTagLength);
338 }
339 324
340 void ReadDicom(std::string& dicom, 325 void ReadDicom(std::string& dicom,
341 const std::string& instancePublicId); 326 const std::string& instancePublicId);
342 327
343 // TODO CACHING MECHANISM AT THIS POINT 328 bool ReadDicomUntilPixelData(std::string& dicom,
329 const std::string& instancePublicId);
330
331 // This method is for low-level operations on "/instances/.../attachments/..."
344 void ReadAttachment(std::string& result, 332 void ReadAttachment(std::string& result,
345 const std::string& instancePublicId, 333 const std::string& instancePublicId,
346 FileContentType content, 334 FileContentType content,
347 bool uncompressIfNeeded); 335 bool uncompressIfNeeded);
348 336
349 void SetStoreMD5ForAttachments(bool storeMD5); 337 void SetStoreMD5ForAttachments(bool storeMD5);
350 338
351 bool IsStoreMD5ForAttachments() const 339 bool IsStoreMD5ForAttachments() const
352 { 340 {
353 return storeMD5_; 341 return storeMD5_;