annotate Applications/Platforms/WebAssembly/WebAssemblyOracle.h @ 1774:95ece40bb298

DicomVolumeImageReslicer and DicomVolumeImageMPRSlicer behave identically on axial
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 May 2021 17:43:51 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1739
9ac2a65d4172 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1723
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
1596
4fb8fdf03314 removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1591
diff changeset
16 *
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1567
diff changeset
24 #include "../../../OrthancStone/Sources/OrthancStone.h"
1471
28c64c246312 working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1455
diff changeset
25
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
26 #if !defined(ORTHANC_ENABLE_WASM)
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27 # error The macro ORTHANC_ENABLE_WASM must be defined
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #endif
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 #if ORTHANC_ENABLE_WASM != 1
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 # error This file can only compiled for WebAssembly
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 #endif
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1567
diff changeset
34 #include "../../../OrthancStone/Sources/Messages/IObservable.h"
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1567
diff changeset
35 #include "../../../OrthancStone/Sources/Messages/IMessageEmitter.h"
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1567
diff changeset
36 #include "../../../OrthancStone/Sources/Oracle/IOracle.h"
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
37
1245
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
38 #if ORTHANC_ENABLE_DCMTK == 1
1591
5887a4f8594b moving platform-specific files out of the "OrthancStone" folder
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1567
diff changeset
39 # include "../../../OrthancStone/Sources/Toolbox/ParsedDicomCache.h"
1245
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
40 #endif
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
41
1567
37d90bd69f31 fix sdl build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
42 #include <Compatibility.h> // For ORTHANC_OVERRIDE
1455
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1299
diff changeset
43 #include <WebServiceParameters.h>
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
44
1488
7f16987131e1 Missing include + docs + public getter for volume geometry in multiframe loader
Benjamin Golinvaux <bgo@osimis.io>
parents: 1484
diff changeset
45 #include <Enumerations.h>
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 namespace OrthancStone
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
48 {
1484
121d01aa328e SeriesThumbnailsLoader working on raw dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
49 class GetOrthancImageCommand;
121d01aa328e SeriesThumbnailsLoader working on raw dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
50 class GetOrthancWebViewerJpegCommand;
121d01aa328e SeriesThumbnailsLoader working on raw dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
51 class HttpCommand;
121d01aa328e SeriesThumbnailsLoader working on raw dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
52 class OrthancRestApiCommand;
121d01aa328e SeriesThumbnailsLoader working on raw dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
53 class ParseDicomFromWadoCommand;
121d01aa328e SeriesThumbnailsLoader working on raw dicom files
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1471
diff changeset
54
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 class WebAssemblyOracle :
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
56 public IOracle,
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
57 public IMessageEmitter
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
58 {
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
59 private:
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
60 typedef std::map<std::string, std::string> HttpHeaders;
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
61
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 class TimeoutContext;
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 class FetchContext;
1242
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
64 class FetchCommand;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
65
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
66 void SetOrthancUrl(FetchCommand& command,
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
67 const std::string& uri) const;
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
68
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
69 void Execute(boost::weak_ptr<IObserver> receiver,
992
a9f5d0742e22 implementation of HttpCommand in WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 831
diff changeset
70 HttpCommand* command);
a9f5d0742e22 implementation of HttpCommand in WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 831
diff changeset
71
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
72 void Execute(boost::weak_ptr<IObserver> receiver,
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
73 OrthancRestApiCommand* command);
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
75 void Execute(boost::weak_ptr<IObserver> receiver,
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
76 GetOrthancImageCommand* command);
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
77
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
78 void Execute(boost::weak_ptr<IObserver> receiver,
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 GetOrthancWebViewerJpegCommand* command);
1243
608983cc2512 removing unused logs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1242
diff changeset
80
608983cc2512 removing unused logs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1242
diff changeset
81 void Execute(boost::weak_ptr<IObserver> receiver,
608983cc2512 removing unused logs
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1242
diff changeset
82 ParseDicomFromWadoCommand* command);
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
83
1242
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
84 IObservable oracleObservable_;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
85 bool isLocalOrthanc_;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
86 std::string localOrthancRoot_;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
87 Orthanc::WebServiceParameters remoteOrthanc_;
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
88
1245
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
89 #if ORTHANC_ENABLE_DCMTK == 1
1299
c38c89684d83 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1279
diff changeset
90 std::unique_ptr<ParsedDicomCache> dicomCache_;
1245
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
91 #endif
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
92
1723
81273beabc9f refactoring: WebAssemblyOracle::ProcessFetchResult()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1678
diff changeset
93 void ProcessFetchResult(boost::weak_ptr<IObserver>& receiver,
81273beabc9f refactoring: WebAssemblyOracle::ProcessFetchResult()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1678
diff changeset
94 const std::string& answer,
81273beabc9f refactoring: WebAssemblyOracle::ProcessFetchResult()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1678
diff changeset
95 const HttpHeaders& headers,
81273beabc9f refactoring: WebAssemblyOracle::ProcessFetchResult()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1678
diff changeset
96 const IOracleCommand& command);
81273beabc9f refactoring: WebAssemblyOracle::ProcessFetchResult()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1678
diff changeset
97
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
98 public:
1242
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
99 WebAssemblyOracle() :
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
100 isLocalOrthanc_(false)
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
101 {
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 }
1242
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
103
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
104 virtual void EmitMessage(boost::weak_ptr<IObserver> observer,
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
105 const IMessage& message) ORTHANC_OVERRIDE
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
106 {
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
107 oracleObservable_.EmitMessage(observer, message);
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
108 }
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109
1229
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
110 virtual bool Schedule(boost::shared_ptr<IObserver> receiver,
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
111 IOracleCommand* command) ORTHANC_OVERRIDE;
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
112
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
113 IObservable& GetOracleObservable()
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
114 {
b9f2a111c5b9 fix compilation of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1076
diff changeset
115 return oracleObservable_;
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 }
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
117
1242
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
118 void SetLocalOrthanc(const std::string& root)
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
119 {
1242
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
120 isLocalOrthanc_ = true;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
121 localOrthancRoot_ = root;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
122 }
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
123
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
124 void SetRemoteOrthanc(const Orthanc::WebServiceParameters& orthanc)
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
125 {
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
126 isLocalOrthanc_ = false;
b9b5d4378874 working of WebAssemblyOracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1229
diff changeset
127 remoteOrthanc_ = orthanc;
831
d71cf8504159 handling of GET arguments
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 825
diff changeset
128 }
1245
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
129
3d4dc87af04b ParseDicomFromWadoCommand working in wasm
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1243
diff changeset
130 void SetDicomCacheSize(size_t size);
1675
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
131
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
132 class CachedInstanceAccessor : public boost::noncopyable
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
133 {
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
134 private:
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
135 #if ORTHANC_ENABLE_DCMTK == 1
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
136 std::unique_ptr<ParsedDicomCache::Reader> reader_;
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
137 #endif
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
138
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
139 public:
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
140 CachedInstanceAccessor(WebAssemblyOracle& oracle,
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
141 const std::string& sopInstanceUid);
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
142
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
143 bool IsValid() const;
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
144
1678
1393e3393a0b fix mpr sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1675
diff changeset
145 #if ORTHANC_ENABLE_DCMTK == 1
1675
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
146 const Orthanc::ParsedDicomFile& GetDicom() const;
1678
1393e3393a0b fix mpr sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1675
diff changeset
147 #endif
1675
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
148
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
149 size_t GetFileSize() const;
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
150
6fa05252b085 don't load low-quality image if the parsed dicom file is cached by the oracle
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1596
diff changeset
151 bool HasPixelData() const;
1678
1393e3393a0b fix mpr sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1675
diff changeset
152 };
825
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
153 };
9a6c7a5dcb76 reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
154 }