comparison Framework/Oracle/WebAssemblyOracle.cpp @ 1484:121d01aa328e

SeriesThumbnailsLoader working on raw dicom files
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 22 Jun 2020 17:46:40 +0200
parents 323bf6040f5d
children
comparison
equal deleted inserted replaced
1483:6abd819aa534 1484:121d01aa328e
27 #if ORTHANC_ENABLE_DCMTK == 1 27 #if ORTHANC_ENABLE_DCMTK == 1
28 # include "ParseDicomSuccessMessage.h" 28 # include "ParseDicomSuccessMessage.h"
29 static unsigned int BUCKET_SOP = 1; 29 static unsigned int BUCKET_SOP = 1;
30 #endif 30 #endif
31 31
32 #include "GetOrthancImageCommand.h"
33 #include "GetOrthancWebViewerJpegCommand.h"
34 #include "HttpCommand.h"
35 #include "OrthancRestApiCommand.h"
36 #include "ParseDicomFromWadoCommand.h"
37
32 #include <OrthancException.h> 38 #include <OrthancException.h>
33 #include <Toolbox.h> 39 #include <Toolbox.h>
34 40
35 #include <emscripten.h> 41 #include <emscripten.h>
36 #include <emscripten/html5.h> 42 #include <emscripten/html5.h>
303 size_t fileSize; 309 size_t fileSize;
304 std::unique_ptr<Orthanc::ParsedDicomFile> dicom 310 std::unique_ptr<Orthanc::ParsedDicomFile> dicom
305 (ParseDicomSuccessMessage::ParseWadoAnswer(fileSize, answer, headers)); 311 (ParseDicomSuccessMessage::ParseWadoAnswer(fileSize, answer, headers));
306 312
307 { 313 {
308 ParseDicomSuccessMessage message(command, *dicom, fileSize, true); 314 ParseDicomSuccessMessage message(command, command.GetSource(), *dicom, fileSize, true);
309 context->EmitMessage(message); 315 context->EmitMessage(message);
310 } 316 }
311 317
312 context->StoreInCache(command.GetSopInstanceUid(), dicom, fileSize); 318 context->StoreInCache(command.GetSopInstanceUid(), dicom, fileSize);
313 #else 319 #else
672 ParsedDicomCache::Reader reader(*dicomCache_, BUCKET_SOP, protection->GetSopInstanceUid()); 678 ParsedDicomCache::Reader reader(*dicomCache_, BUCKET_SOP, protection->GetSopInstanceUid());
673 if (reader.IsValid() && 679 if (reader.IsValid() &&
674 reader.HasPixelData()) 680 reader.HasPixelData())
675 { 681 {
676 // Reuse the DICOM file from the cache 682 // Reuse the DICOM file from the cache
677 ParseDicomSuccessMessage message(*protection, reader.GetDicom(), 683 ParseDicomSuccessMessage message(*protection, protection->GetSource(), reader.GetDicom(),
678 reader.GetFileSize(), reader.HasPixelData()); 684 reader.GetFileSize(), reader.HasPixelData());
679 EmitMessage(receiver, message); 685 EmitMessage(receiver, message);
680 return; 686 return;
681 } 687 }
682 } 688 }