Mercurial > hg > orthanc
annotate OrthancServer/Sources/ServerContext.h @ 5320:e4c3950345e9
remove NEWS from reverted commits 5306:155637655710 and 5308:1e23bfb0f732
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Sat, 24 Jun 2023 12:21:26 +0200 |
parents | 3a61fd50f804 |
children | c04230962098 566e8d32bd3a |
rev | line source |
---|---|
224 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1285
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
5185
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5183
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
0ea402b4d901
upgrade to year 2023
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5183
diff
changeset
|
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
224 | 7 * |
8 * This program is free software: you can redistribute it and/or | |
9 * modify it under the terms of the GNU General Public License as | |
10 * published by the Free Software Foundation, either version 3 of the | |
11 * License, or (at your option) any later version. | |
12 * | |
13 * This program is distributed in the hope that it will be useful, but | |
14 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 * General Public License for more details. | |
17 * | |
18 * You should have received a copy of the GNU General Public License | |
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 #pragma once | |
24 | |
2610
3ff4c50647ea
moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2570
diff
changeset
|
25 #include "IServerListener.h" |
3ff4c50647ea
moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2570
diff
changeset
|
26 #include "LuaScripting.h" |
3ff4c50647ea
moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2570
diff
changeset
|
27 #include "OrthancHttpHandler.h" |
3ff4c50647ea
moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2570
diff
changeset
|
28 #include "ServerIndex.h" |
3660
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
29 #include "ServerJobs/IStorageCommitmentFactory.h" |
2610
3ff4c50647ea
moving the old scheduler to the graveyard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2570
diff
changeset
|
30 |
4375
208029732d51
New config option "DeidentifyDimseQueryLogs"
Mark Poscablo <Mark.Poscablo@varian.com>
parents:
4205
diff
changeset
|
31 #include "../../OrthancFramework/Sources/DicomFormat/DicomElement.h" |
208029732d51
New config option "DeidentifyDimseQueryLogs"
Mark Poscablo <Mark.Poscablo@varian.com>
parents:
4205
diff
changeset
|
32 #include "../../OrthancFramework/Sources/DicomParsing/DicomModification.h" |
4045 | 33 #include "../../OrthancFramework/Sources/DicomParsing/IDicomTranscoder.h" |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
34 #include "../../OrthancFramework/Sources/DicomParsing/ParsedDicomCache.h" |
4792
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
35 #include "../../OrthancFramework/Sources/FileStorage/StorageCache.h" |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
36 #include "../../OrthancFramework/Sources/MultiThreading/Semaphore.h" |
1436
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
37 |
5111
7547c7dfd017
/tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s
Alain Mazy <am@osimis.io>
parents:
5058
diff
changeset
|
38 #include <boost/date_time/posix_time/posix_time.hpp> |
1124
790ff7a5b3bf
IStorageArea abstraction
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1123
diff
changeset
|
39 |
224 | 40 namespace Orthanc |
41 { | |
3097 | 42 class DicomInstanceToStore; |
43 class IStorageArea; | |
44 class JobsEngine; | |
3174
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
45 class MetricsRegistry; |
3085 | 46 class OrthancPlugins; |
3095
beeeb6096f27
removing dependencies upon ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3085
diff
changeset
|
47 class ParsedDicomFile; |
3097 | 48 class RestApiOutput; |
49 class SetOfInstancesJob; | |
3095
beeeb6096f27
removing dependencies upon ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3085
diff
changeset
|
50 class SharedArchive; |
3097 | 51 class SharedMessageQueue; |
3736
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
52 class StorageCommitmentReports; |
3097 | 53 |
3085 | 54 |
227
209ca3f6db62
dicom-scu from rest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
55 /** |
209ca3f6db62
dicom-scu from rest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
56 * This class is responsible for maintaining the storage area on the |
209ca3f6db62
dicom-scu from rest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
57 * filesystem (including compression), as well as the index of the |
209ca3f6db62
dicom-scu from rest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
58 * DICOM store. It implements the required locking mechanisms. |
209ca3f6db62
dicom-scu from rest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
59 **/ |
3660
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
60 class ServerContext : |
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
61 public IStorageCommitmentFactory, |
3930
b99acc213937
transcoder plugins and GDCM transcoding are working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3928
diff
changeset
|
62 public IDicomTranscoder, |
3660
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
63 private JobsRegistry::IObserver |
224 | 64 { |
4498
7b99e8bb8246
IStorageArea::HasReadRange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4473
diff
changeset
|
65 friend class ServerIndex; // To access "RemoveFile()" |
7b99e8bb8246
IStorageArea::HasReadRange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4473
diff
changeset
|
66 |
3021
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
67 public: |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
68 class ILookupVisitor : public boost::noncopyable |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
69 { |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
70 public: |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
71 virtual ~ILookupVisitor() |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
72 { |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
73 } |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
74 |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
75 virtual bool IsDicomAsJsonNeeded() const = 0; |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
76 |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
77 virtual void MarkAsComplete() = 0; |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
78 |
4196
37310bb1cd30
Fix handling of "ModalitiesInStudy" (0008,0061) in C-FIND and "/tools/find"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
79 // NB: "dicomAsJson" must *not* be deleted, and can be NULL if |
37310bb1cd30
Fix handling of "ModalitiesInStudy" (0008,0061) in C-FIND and "/tools/find"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4045
diff
changeset
|
80 // "!IsDicomAsJsonNeeded()" |
3021
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
81 virtual void Visit(const std::string& publicId, |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
82 const std::string& instanceId, |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
83 const DicomMap& mainDicomTags, |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
84 const Json::Value* dicomAsJson) = 0; |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
85 }; |
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
86 |
4796
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
87 struct StoreResult |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
88 { |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
89 private: |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
90 StoreStatus status_; |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
91 uint16_t cstoreStatusCode_; |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
92 // uint16_t httpStatusCode_; // for future use |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
93 |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
94 public: |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
95 StoreResult(); |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
96 |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
97 void SetStatus(StoreStatus status) |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
98 { |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
99 status_ = status; |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
100 } |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
101 |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
102 StoreStatus GetStatus() |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
103 { |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
104 return status_; |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
105 } |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
106 |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
107 void SetCStoreStatusCode(uint16_t statusCode) |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
108 { |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
109 cstoreStatusCode_ = statusCode; |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
110 } |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
111 |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
112 uint16_t GetCStoreStatusCode() |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
113 { |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
114 return cstoreStatusCode_; |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
115 } |
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
116 }; |
3021
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
117 |
224 | 118 private: |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
119 class LuaServerListener : public IServerListener |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
120 { |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
121 private: |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
122 ServerContext& context_; |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
123 |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
124 public: |
4204 | 125 explicit LuaServerListener(ServerContext& context) : |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
126 context_(context) |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
127 { |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
128 } |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
129 |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
130 virtual void SignalStoredInstance(const std::string& publicId, |
3916
0e3849268a55
new plugin SDK primitives related to OrthancPluginDicomInstance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3913
diff
changeset
|
131 const DicomInstanceToStore& instance, |
4205 | 132 const Json::Value& simplifiedTags) ORTHANC_OVERRIDE |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
133 { |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
134 context_.mainLua_.SignalStoredInstance(publicId, instance, simplifiedTags); |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
135 } |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
136 |
4205 | 137 virtual void SignalChange(const ServerIndexChange& change) ORTHANC_OVERRIDE |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
138 { |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
139 context_.mainLua_.SignalChange(change); |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
140 } |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
141 |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
142 virtual bool FilterIncomingInstance(const DicomInstanceToStore& instance, |
4205 | 143 const Json::Value& simplified) ORTHANC_OVERRIDE |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
144 { |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
145 return context_.filterLua_.FilterIncomingInstance(instance, simplified); |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
146 } |
4796
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
147 |
4921
309fb4f02704
fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
148 virtual bool FilterIncomingCStoreInstance(uint16_t& dimseStatus, |
309fb4f02704
fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
149 const DicomInstanceToStore& instance, |
309fb4f02704
fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
150 const Json::Value& simplified) ORTHANC_OVERRIDE |
4796
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
151 { |
4921
309fb4f02704
fix signature of OrthancPluginIncomingCStoreInstanceFilter
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4892
diff
changeset
|
152 return context_.filterLua_.FilterIncomingCStoreInstance(dimseStatus, instance, simplified); |
4796
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
153 } |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
154 }; |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
155 |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
156 class ServerListener |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
157 { |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
158 private: |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
159 IServerListener *listener_; |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
160 std::string description_; |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
161 |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
162 public: |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
163 ServerListener(IServerListener& listener, |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
164 const std::string& description) : |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
165 listener_(&listener), |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
166 description_(description) |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
167 { |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
168 } |
996
cf52f3bcb2b3
clarification of Lua classes wrt multithreading
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
946
diff
changeset
|
169 |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
170 IServerListener& GetListener() |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
171 { |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
172 return *listener_; |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
173 } |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
174 |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
175 const std::string& GetDescription() |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
176 { |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
177 return description_; |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
178 } |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
179 }; |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
180 |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
181 typedef std::list<ServerListener> ServerListeners; |
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
182 |
998
4136fab6a639
callback on stored instance
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
996
diff
changeset
|
183 |
2668
d26dd081df97
saving jobs engine on exit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2665
diff
changeset
|
184 static void ChangeThread(ServerContext* that, |
d26dd081df97
saving jobs engine on exit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2665
diff
changeset
|
185 unsigned int sleepDelay); |
1436
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
186 |
2672
3efc44fac209
periodically saving jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2671
diff
changeset
|
187 static void SaveJobsThread(ServerContext* that, |
3efc44fac209
periodically saving jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2671
diff
changeset
|
188 unsigned int sleepDelay); |
3efc44fac209
periodically saving jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2671
diff
changeset
|
189 |
5182 | 190 #if HAVE_MALLOC_TRIM == 1 |
5183
5ec3dcdf78b9
renamed HousekeeperThread as MemoryTrimmingThread to avoid confusion with Housekeeper plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5182
diff
changeset
|
191 static void MemoryTrimmingThread(ServerContext* that, |
5ec3dcdf78b9
renamed HousekeeperThread as MemoryTrimmingThread to avoid confusion with Housekeeper plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5182
diff
changeset
|
192 unsigned int sleepDelay); |
5182 | 193 #endif |
5152
c81f363d3aa3
housekeeper thread to call malloc_trim and give back memory to the system
Alain Mazy <am@osimis.io>
parents:
5111
diff
changeset
|
194 |
2668
d26dd081df97
saving jobs engine on exit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2665
diff
changeset
|
195 void SaveJobsEngine(); |
d26dd081df97
saving jobs engine on exit
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2665
diff
changeset
|
196 |
3762
1a346a4dc1b4
adding missing ORTHANC_OVERRIDE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3736
diff
changeset
|
197 virtual void SignalJobSubmitted(const std::string& jobId) ORTHANC_OVERRIDE; |
2673
8e0bc055d18c
JobsRegistry::IObserver
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2672
diff
changeset
|
198 |
3762
1a346a4dc1b4
adding missing ORTHANC_OVERRIDE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3736
diff
changeset
|
199 virtual void SignalJobSuccess(const std::string& jobId) ORTHANC_OVERRIDE; |
2673
8e0bc055d18c
JobsRegistry::IObserver
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2672
diff
changeset
|
200 |
3762
1a346a4dc1b4
adding missing ORTHANC_OVERRIDE
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3736
diff
changeset
|
201 virtual void SignalJobFailure(const std::string& jobId) ORTHANC_OVERRIDE; |
2673
8e0bc055d18c
JobsRegistry::IObserver
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2672
diff
changeset
|
202 |
224 | 203 ServerIndex index_; |
1549
e5e975e9b738
refactoring and simplification of StorageAccessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1456
diff
changeset
|
204 IStorageArea& area_; |
4792
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
205 StorageCache storageCache_; |
1549
e5e975e9b738
refactoring and simplification of StorageAccessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1456
diff
changeset
|
206 |
236 | 207 bool compressionEnabled_; |
1549
e5e975e9b738
refactoring and simplification of StorageAccessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1456
diff
changeset
|
208 bool storeMD5_; |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
209 |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
210 Semaphore largeDicomThrottler_; // New in Orthanc 1.9.0 (notably for very large DICOM files in WSI) |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
211 ParsedDicomCache dicomCache_; |
224 | 212 |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
213 LuaScripting mainLua_; |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
214 LuaScripting filterLua_; |
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
215 LuaServerListener luaListener_; |
3712
2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3677
diff
changeset
|
216 std::unique_ptr<SharedArchive> mediaArchive_; |
2976
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2965
diff
changeset
|
217 |
2950
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
218 // The "JobsEngine" must be *after* "LuaScripting", as |
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
219 // "LuaScripting" embeds "LuaJobManager" that registers as an |
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
220 // observer to "SequenceOfOperationsJob", whose lifetime |
2976
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2965
diff
changeset
|
221 // corresponds to that of "JobsEngine". It must also be after |
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2965
diff
changeset
|
222 // "mediaArchive_", as jobs might access this archive. |
2950
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
223 JobsEngine jobsEngine_; |
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
224 |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2128
diff
changeset
|
225 #if ORTHANC_ENABLE_PLUGINS == 1 |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
226 OrthancPlugins* plugins_; |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1549
diff
changeset
|
227 #endif |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1549
diff
changeset
|
228 |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
229 ServerListeners listeners_; |
3947
cf6eb4fc6841
fix issue 179: use a shared mutex to avoid deadlock in python plugins
Alain Mazy <alain@mazy.be>
parents:
3945
diff
changeset
|
230 boost::shared_mutex listenersMutex_; |
388
466c992a9a42
testing filters inside orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
376
diff
changeset
|
231 |
1436
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
232 bool done_; |
2673
8e0bc055d18c
JobsRegistry::IObserver
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2672
diff
changeset
|
233 bool haveJobsChanged_; |
2815
925d8dc03a23
unserialization of jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2738
diff
changeset
|
234 bool isJobsEngineUnserialized_; |
1436
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
235 SharedMessageQueue pendingChanges_; |
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
236 boost::thread changeThread_; |
2672
3efc44fac209
periodically saving jobs
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2671
diff
changeset
|
237 boost::thread saveJobsThread_; |
5183
5ec3dcdf78b9
renamed HousekeeperThread as MemoryTrimmingThread to avoid confusion with Housekeeper plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5182
diff
changeset
|
238 boost::thread memoryTrimmingThread_; |
1436
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
239 |
3712
2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3677
diff
changeset
|
240 std::unique_ptr<SharedArchive> queryRetrieveArchive_; |
1427
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
241 std::string defaultLocalAet_; |
1444
b2b09a3dbd8e
refactoring: OrthancHttpHandler inside OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1436
diff
changeset
|
242 OrthancHttpHandler httpHandler_; |
3165
1fe524e211af
New configuration option: "SaveJobs" to specify whether jobs are stored in the database
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3097
diff
changeset
|
243 bool saveJobs_; |
3677
4182cde57afb
refactoring FindStorageAccessMode
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
244 FindStorageAccessMode findStorageAccessMode_; |
4182cde57afb
refactoring FindStorageAccessMode
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
245 unsigned int limitFindInstances_; |
4182cde57afb
refactoring FindStorageAccessMode
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
246 unsigned int limitFindResults_; |
1368 | 247 |
3712
2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3677
diff
changeset
|
248 std::unique_ptr<MetricsRegistry> metricsRegistry_; |
3534
cac8ffcb9cef
forcing AuthenticationEnabled to false is considered as insecure if remote access is allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3533
diff
changeset
|
249 bool isHttpServerSecure_; |
3535
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
250 bool isExecuteLuaEnabled_; |
5200
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
251 bool isRestApiWriteToFileSystemEnabled_; |
3813
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
252 bool overwriteInstances_; |
3174
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
253 |
3736
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
254 std::unique_ptr<StorageCommitmentReports> storageCommitmentReports_; |
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
255 |
3911
0ef7f4528be2
renamed option TranscodingEnabled to TranscodeDicomProtocol
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3910
diff
changeset
|
256 bool transcodeDicomProtocol_; |
3894
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
257 std::unique_ptr<IDicomTranscoder> dcmtkTranscoder_; |
3931
e6606d3ec892
new configuration option: BuiltinDecoderTranscoderOrder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3930
diff
changeset
|
258 BuiltinDecoderTranscoderOrder builtinDecoderTranscoderOrder_; |
3939
c205f670098e
new configuration options: BuiltinDecoderTranscoderOrder and IngestTranscoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3931
diff
changeset
|
259 bool isIngestTranscoding_; |
c205f670098e
new configuration options: BuiltinDecoderTranscoderOrder and IngestTranscoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3931
diff
changeset
|
260 DicomTransferSyntax ingestTransferSyntax_; |
4384
7e0d015ad109
new configuration options IngestTranscodingOfUncompressed and IngestTranscodingOfCompressed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4376
diff
changeset
|
261 bool ingestTranscodingOfUncompressed_; |
7e0d015ad109
new configuration options IngestTranscodingOfUncompressed and IngestTranscodingOfCompressed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4376
diff
changeset
|
262 bool ingestTranscodingOfCompressed_; |
4473
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
263 |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
264 // New in Orthanc 1.9.0 |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
265 DicomTransferSyntax preferredTransferSyntax_; |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
266 boost::mutex dynamicOptionsMutex_; |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
267 bool isUnknownSopClassAccepted_; |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
268 std::set<DicomTransferSyntax> acceptedTransferSyntaxes_; |
3894
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
269 |
4796
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
270 StoreResult StoreAfterTranscoding(std::string& resultPublicId, |
3912
7610af1532c3
prototyping automated transcoding of incoming DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3911
diff
changeset
|
271 DicomInstanceToStore& dicom, |
4988
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
272 StoreInstanceMode mode, |
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
273 bool isReconstruct); |
3912
7610af1532c3
prototyping automated transcoding of incoming DICOM files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3911
diff
changeset
|
274 |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
275 void PublishDicomCacheMetrics(); |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
276 |
4498
7b99e8bb8246
IStorageArea::HasReadRange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4473
diff
changeset
|
277 // This method must only be called from "ServerIndex"! |
7b99e8bb8246
IStorageArea::HasReadRange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4473
diff
changeset
|
278 void RemoveFile(const std::string& fileUuid, |
7b99e8bb8246
IStorageArea::HasReadRange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4473
diff
changeset
|
279 FileContentType type); |
7b99e8bb8246
IStorageArea::HasReadRange()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4473
diff
changeset
|
280 |
4376
b002f9abe802
review of changeset 4375:208029732d51
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4375
diff
changeset
|
281 // This DicomModification object is intended to be used as a |
b002f9abe802
review of changeset 4375:208029732d51
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4375
diff
changeset
|
282 // "rules engine" when de-identifying logs for C-Find, C-Get, and |
b002f9abe802
review of changeset 4375:208029732d51
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4375
diff
changeset
|
283 // C-Move queries (new in Orthanc 1.8.2) |
4375
208029732d51
New config option "DeidentifyDimseQueryLogs"
Mark Poscablo <Mark.Poscablo@varian.com>
parents:
4205
diff
changeset
|
284 DicomModification logsDeidentifierRules_; |
4376
b002f9abe802
review of changeset 4375:208029732d51
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4375
diff
changeset
|
285 bool deidentifyLogs_; |
4375
208029732d51
New config option "DeidentifyDimseQueryLogs"
Mark Poscablo <Mark.Poscablo@varian.com>
parents:
4205
diff
changeset
|
286 |
5111
7547c7dfd017
/tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s
Alain Mazy <am@osimis.io>
parents:
5058
diff
changeset
|
287 boost::posix_time::ptime serverStartTimeUtc_; |
7547c7dfd017
/tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s
Alain Mazy <am@osimis.io>
parents:
5058
diff
changeset
|
288 |
224 | 289 public: |
996
cf52f3bcb2b3
clarification of Lua classes wrt multithreading
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
946
diff
changeset
|
290 class DicomCacheLocker : public boost::noncopyable |
778
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
291 { |
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
292 private: |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
293 ServerContext& context_; |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
294 std::string instancePublicId_; |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
295 std::unique_ptr<ParsedDicomCache::Accessor> accessor_; |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
296 std::unique_ptr<ParsedDicomFile> dicom_; |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
297 size_t dicomSize_; |
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
298 std::unique_ptr<Semaphore::Locker> largeDicomLocker_; |
778
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
299 |
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
300 public: |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
301 DicomCacheLocker(ServerContext& context, |
778
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
302 const std::string& instancePublicId); |
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
303 |
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
304 ~DicomCacheLocker(); |
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
305 |
4457
789676a8c96a
Refactoring and improvements to the cache of DICOM files in ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4437
diff
changeset
|
306 ParsedDicomFile& GetDicom() const; |
778
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
307 }; |
aebf0071020e
refactoring of the mutex for the dicom cache
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
771
diff
changeset
|
308 |
1549
e5e975e9b738
refactoring and simplification of StorageAccessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1456
diff
changeset
|
309 ServerContext(IDatabaseWrapper& database, |
2665
389d050a2e66
fix deadlock, speed up unit tests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2626
diff
changeset
|
310 IStorageArea& area, |
2950
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
311 bool unitTesting, |
dc18d5804746
support of JobsHistorySize set to zero
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2940
diff
changeset
|
312 size_t maxCompletedJobs); |
1134
ba9fd42284d0
preparing storage plugin
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1133
diff
changeset
|
313 |
1436
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
314 ~ServerContext(); |
0a3e3be59094
uncoupling of SignalChange for Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1434
diff
changeset
|
315 |
2815
925d8dc03a23
unserialization of jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2738
diff
changeset
|
316 void SetupJobsEngine(bool unitTesting, |
925d8dc03a23
unserialization of jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2738
diff
changeset
|
317 bool loadJobsFromDatabase); |
925d8dc03a23
unserialization of jobs from plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2738
diff
changeset
|
318 |
224 | 319 ServerIndex& GetIndex() |
320 { | |
321 return index_; | |
322 } | |
323 | |
4792
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
324 void SetMaximumStorageCacheSize(size_t size) |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
325 { |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
326 return storageCache_.SetMaximumSize(size); |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
327 } |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
328 |
236 | 329 void SetCompressionEnabled(bool enabled); |
330 | |
331 bool IsCompressionEnabled() const | |
332 { | |
333 return compressionEnabled_; | |
334 } | |
335 | |
4627
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4513
diff
changeset
|
336 bool AddAttachment(int64_t& newRevision, |
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4513
diff
changeset
|
337 const std::string& resourceId, |
699
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
338 FileContentType attachmentType, |
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
339 const void* data, |
4627
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4513
diff
changeset
|
340 size_t size, |
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4513
diff
changeset
|
341 bool hasOldRevision, |
4640
66109d24d26e
"ETag" headers for metadata and attachments now allow strong comparison (MD5 is included)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4627
diff
changeset
|
342 int64_t oldRevision, |
66109d24d26e
"ETag" headers for metadata and attachments now allow strong comparison (MD5 is included)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4627
diff
changeset
|
343 const std::string& oldMD5); |
699
2929e17f8447
add attachments to resources
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
344 |
4796
94616af363ec
added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
345 StoreResult Store(std::string& resultPublicId, |
3814
023b2a9f3aa1
new enum: StoreInstanceMode
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3813
diff
changeset
|
346 DicomInstanceToStore& dicom, |
023b2a9f3aa1
new enum: StoreInstanceMode
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3813
diff
changeset
|
347 StoreInstanceMode mode); |
1004
a226e0959d8b
DicomInstanceToStore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1003
diff
changeset
|
348 |
4988
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
349 StoreResult TranscodeAndStore(std::string& resultPublicId, |
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
350 DicomInstanceToStore* dicom, |
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
351 StoreInstanceMode mode, |
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
352 bool isReconstruct = false); |
8fba26292a9f
Housekeeper plugin: finalizing + integration tests ok
Alain Mazy <am@osimis.io>
parents:
4978
diff
changeset
|
353 |
1146
200fcac0deb4
optimization for access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
354 void AnswerAttachment(RestApiOutput& output, |
1700
f5ddbd9239dd
New URIs for attachments: ".../compress", ".../uncompress" and ".../is-compressed"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
355 const std::string& resourceId, |
1146
200fcac0deb4
optimization for access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1145
diff
changeset
|
356 FileContentType content); |
226
8a26a8e85edf
refactoring to read files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
224
diff
changeset
|
357 |
1700
f5ddbd9239dd
New URIs for attachments: ".../compress", ".../uncompress" and ".../is-compressed"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
358 void ChangeAttachmentCompression(const std::string& resourceId, |
f5ddbd9239dd
New URIs for attachments: ".../compress", ".../uncompress" and ".../is-compressed"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
359 FileContentType attachmentType, |
f5ddbd9239dd
New URIs for attachments: ".../compress", ".../uncompress" and ".../is-compressed"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
360 CompressionType compression); |
f5ddbd9239dd
New URIs for attachments: ".../compress", ".../uncompress" and ".../is-compressed"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1632
diff
changeset
|
361 |
2124 | 362 void ReadDicomAsJson(Json::Value& result, |
2409
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
363 const std::string& instancePublicId, |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
364 const std::set<DicomTag>& ignoreTagLength); |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
365 |
e4045b3c9772
ignore-length argument if retrieving DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
366 void ReadDicomAsJson(Json::Value& result, |
4511
1ec156a0da38
ServerContext::ReadDicomUntilPixelData()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4509
diff
changeset
|
367 const std::string& instancePublicId); |
227
209ca3f6db62
dicom-scu from rest
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
226
diff
changeset
|
368 |
2124 | 369 void ReadDicom(std::string& dicom, |
4509
98b7b9d21d83
removed ServerContext::ReadAttachment()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4498
diff
changeset
|
370 const std::string& instancePublicId); |
4792
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
371 |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
372 void ReadDicomForHeader(std::string& dicom, |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
373 const std::string& instancePublicId); |
434843934307
Added a StorageCache in the StorageAccessor
Alain Mazy <am@osimis.io>
parents:
4694
diff
changeset
|
374 |
4511
1ec156a0da38
ServerContext::ReadDicomUntilPixelData()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4509
diff
changeset
|
375 bool ReadDicomUntilPixelData(std::string& dicom, |
1ec156a0da38
ServerContext::ReadDicomUntilPixelData()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4509
diff
changeset
|
376 const std::string& instancePublicId); |
1ec156a0da38
ServerContext::ReadDicomUntilPixelData()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4509
diff
changeset
|
377 |
1ec156a0da38
ServerContext::ReadDicomUntilPixelData()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4509
diff
changeset
|
378 // This method is for low-level operations on "/instances/.../attachments/..." |
2128
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2127
diff
changeset
|
379 void ReadAttachment(std::string& result, |
4627
f7d5372b59b3
handling revisions of attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4513
diff
changeset
|
380 int64_t& revision, |
2128
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2127
diff
changeset
|
381 const std::string& instancePublicId, |
9329ba17a069
Possibility to DELETE "dicom-as-json" attachments to reconstruct them
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2127
diff
changeset
|
382 FileContentType content, |
5048
22966345eaba
skip StorageCache when verifying md5 or when re-compressing attachments
Alain Mazy <am@osimis.io>
parents:
4988
diff
changeset
|
383 bool uncompressIfNeeded, |
22966345eaba
skip StorageCache when verifying md5 or when re-compressing attachments
Alain Mazy <am@osimis.io>
parents:
4988
diff
changeset
|
384 bool skipCache = false); |
4511
1ec156a0da38
ServerContext::ReadDicomUntilPixelData()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4509
diff
changeset
|
385 |
695
c59bc408fb10
parameter to disable the computation of the MD5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
386 void SetStoreMD5ForAttachments(bool storeMD5); |
c59bc408fb10
parameter to disable the computation of the MD5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
387 |
c59bc408fb10
parameter to disable the computation of the MD5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
388 bool IsStoreMD5ForAttachments() const |
c59bc408fb10
parameter to disable the computation of the MD5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
389 { |
1549
e5e975e9b738
refactoring and simplification of StorageAccessor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1456
diff
changeset
|
390 return storeMD5_; |
695
c59bc408fb10
parameter to disable the computation of the MD5
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
391 } |
771 | 392 |
2570
2e879c796ec7
JobsRegistry::SubmitAndWait(), StoreScuJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
393 JobsEngine& GetJobsEngine() |
2e879c796ec7
JobsRegistry::SubmitAndWait(), StoreScuJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
394 { |
2e879c796ec7
JobsRegistry::SubmitAndWait(), StoreScuJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
395 return jobsEngine_; |
2e879c796ec7
JobsRegistry::SubmitAndWait(), StoreScuJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
396 } |
2e879c796ec7
JobsRegistry::SubmitAndWait(), StoreScuJob
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
397 |
4694
da1edb7d6332
"/tools/bulk-delete" to delete a group of multiple, unrelated resources at once
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4640
diff
changeset
|
398 bool DeleteResource(Json::Value& remainingAncestor, |
1145
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1134
diff
changeset
|
399 const std::string& uuid, |
0479d02c6778
Plugins can retrieve the path to Orthanc and to its configuration file
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1134
diff
changeset
|
400 ResourceType expectedType); |
1189
6b9b02a16e99
NewChildInstance change type
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
401 |
1198 | 402 void SignalChange(const ServerIndexChange& change); |
1232
f1c01451a8ee
Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1223
diff
changeset
|
403 |
1368 | 404 SharedArchive& GetQueryRetrieveArchive() |
405 { | |
2940
4767d36679ed
refactoring access to Orthanc configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2876
diff
changeset
|
406 return *queryRetrieveArchive_; |
1368 | 407 } |
1427
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
408 |
2965
9c0b0a6d8b54
MediaArchiveSize configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2950
diff
changeset
|
409 SharedArchive& GetMediaArchive() |
9c0b0a6d8b54
MediaArchiveSize configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2950
diff
changeset
|
410 { |
9c0b0a6d8b54
MediaArchiveSize configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2950
diff
changeset
|
411 return *mediaArchive_; |
9c0b0a6d8b54
MediaArchiveSize configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2950
diff
changeset
|
412 } |
9c0b0a6d8b54
MediaArchiveSize configuration option
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2950
diff
changeset
|
413 |
1427
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
414 const std::string& GetDefaultLocalApplicationEntityTitle() const |
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
415 { |
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
416 return defaultLocalAet_; |
d710ea64f0fd
Custom setting of the local AET during C-Store SCU (both in Lua and in the REST API)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1368
diff
changeset
|
417 } |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
418 |
2617
912a767911b0
back to a single Lua context
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2616
diff
changeset
|
419 LuaScripting& GetLuaScripting() |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
420 { |
2738
3a55b77339ff
fix deadlock in Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2673
diff
changeset
|
421 return mainLua_; |
1433
461e7554bff7
refactoring: LuaScripting
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1427
diff
changeset
|
422 } |
1434
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
423 |
1444
b2b09a3dbd8e
refactoring: OrthancHttpHandler inside OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1436
diff
changeset
|
424 OrthancHttpHandler& GetHttpHandler() |
b2b09a3dbd8e
refactoring: OrthancHttpHandler inside OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1436
diff
changeset
|
425 { |
b2b09a3dbd8e
refactoring: OrthancHttpHandler inside OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1436
diff
changeset
|
426 return httpHandler_; |
b2b09a3dbd8e
refactoring: OrthancHttpHandler inside OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1436
diff
changeset
|
427 } |
b2b09a3dbd8e
refactoring: OrthancHttpHandler inside OrthancServer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1436
diff
changeset
|
428 |
1447
5ba7471780ae
refactoring: HttpToolbox, DumpJson in Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1444
diff
changeset
|
429 void Stop(); |
5ba7471780ae
refactoring: HttpToolbox, DumpJson in Lua
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1444
diff
changeset
|
430 |
3021
2cbafb5d5a62
renamed LookupResource::IVisitor as ServerContext::ILookupVisitor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3015
diff
changeset
|
431 void Apply(ILookupVisitor& visitor, |
3033
5da6d1063d8f
effectively replacing LookupResource by DatabaseLookup in searches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3025
diff
changeset
|
432 const DatabaseLookup& lookup, |
5da6d1063d8f
effectively replacing LookupResource by DatabaseLookup in searches
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3025
diff
changeset
|
433 ResourceType queryLevel, |
2304
563bf878407a
Argument "Since" in URI "/tools/find" (related to issue 53)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
434 size_t since, |
563bf878407a
Argument "Since" in URI "/tools/find" (related to issue 53)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
435 size_t limit); |
1757
98abb8d7f905
ServerContext::Apply lookup
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1753
diff
changeset
|
436 |
3015
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3001
diff
changeset
|
437 bool LookupOrReconstructMetadata(std::string& target, |
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3001
diff
changeset
|
438 const std::string& publicId, |
4460
6831de40acd9
New metadata automatically computed at the series level: "RemoteAET"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4457
diff
changeset
|
439 ResourceType level, |
3015
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3001
diff
changeset
|
440 MetadataType type); |
abe49ca61cd5
On C-FIND, avoid accessing the storage area whenever possible
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3001
diff
changeset
|
441 |
1434
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
442 |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
443 /** |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
444 * Management of the plugins |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
445 **/ |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
446 |
2136
dd609a99d39a
uniformization of the macro naming
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2128
diff
changeset
|
447 #if ORTHANC_ENABLE_PLUGINS == 1 |
1434
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
448 void SetPlugins(OrthancPlugins& plugins); |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
449 |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
450 void ResetPlugins(); |
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
451 |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1549
diff
changeset
|
452 const OrthancPlugins& GetPlugins() const; |
1741
06addfcd1d4c
OrthancStarted and OrthancStopped events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1700
diff
changeset
|
453 |
06addfcd1d4c
OrthancStarted and OrthancStopped events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1700
diff
changeset
|
454 OrthancPlugins& GetPlugins(); |
1632
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1549
diff
changeset
|
455 #endif |
eb8fbcf008b5
fix build with plugins disabled
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1549
diff
changeset
|
456 |
1434
f9cd40166269
refactoring of OrthancPlugins, improvement in ServeFolders
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1433
diff
changeset
|
457 bool HasPlugins() const; |
2626 | 458 |
459 void AddChildInstances(SetOfInstancesJob& job, | |
460 const std::string& publicId); | |
2940
4767d36679ed
refactoring access to Orthanc configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2876
diff
changeset
|
461 |
4767d36679ed
refactoring access to Orthanc configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2876
diff
changeset
|
462 void SignalUpdatedModalities(); |
4767d36679ed
refactoring access to Orthanc configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2876
diff
changeset
|
463 |
4767d36679ed
refactoring access to Orthanc configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2876
diff
changeset
|
464 void SignalUpdatedPeers(); |
3174
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
465 |
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
466 MetricsRegistry& GetMetricsRegistry() |
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
467 { |
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
468 return *metricsRegistry_; |
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3165
diff
changeset
|
469 } |
3533
2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
470 |
3534
cac8ffcb9cef
forcing AuthenticationEnabled to false is considered as insecure if remote access is allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3533
diff
changeset
|
471 void SetHttpServerSecure(bool isSecure) |
3533
2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
472 { |
3534
cac8ffcb9cef
forcing AuthenticationEnabled to false is considered as insecure if remote access is allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3533
diff
changeset
|
473 isHttpServerSecure_ = isSecure; |
3533
2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
474 } |
2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
475 |
3534
cac8ffcb9cef
forcing AuthenticationEnabled to false is considered as insecure if remote access is allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3533
diff
changeset
|
476 bool IsHttpServerSecure() const |
3533
2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
477 { |
3534
cac8ffcb9cef
forcing AuthenticationEnabled to false is considered as insecure if remote access is allowed
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3533
diff
changeset
|
478 return isHttpServerSecure_; |
3533
2090ec6a83a5
create a default user if none is provided, while issuing a warning in Orthanc Explorer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
479 } |
3535
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
480 |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
481 void SetExecuteLuaEnabled(bool enabled) |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
482 { |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
483 isExecuteLuaEnabled_ = enabled; |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
484 } |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
485 |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
486 bool IsExecuteLuaEnabled() const |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
487 { |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
488 return isExecuteLuaEnabled_; |
41365091a41e
display a security warning in the logs at startup when ExecuteLuaEnabled is true
Alain Mazy <alain@mazy.be>
parents:
3534
diff
changeset
|
489 } |
3660
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
490 |
5200
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
491 void SetRestApiWriteToFileSystemEnabled(bool enabled) |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
492 { |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
493 isRestApiWriteToFileSystemEnabled_ = enabled; |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
494 } |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
495 |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
496 bool IsRestApiWriteToFileSystemEnabled() const |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
497 { |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
498 return isRestApiWriteToFileSystemEnabled_; |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
499 } |
f8f1c4a9a216
New configuration option 'RestApiWriteToFileSystemEnabled'
Alain Mazy <am@osimis.io>
parents:
5185
diff
changeset
|
500 |
3813
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
501 void SetOverwriteInstances(bool overwrite) |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
502 { |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
503 overwriteInstances_ = overwrite; |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
504 } |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
505 |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
506 bool IsOverwriteInstances() const |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
507 { |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
508 return overwriteInstances_; |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
509 } |
aaaa442bfe39
moving SetOverwriteInstances from ServerIndex to ServerContext
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3762
diff
changeset
|
510 |
3660
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
511 virtual IStorageCommitmentFactory::ILookupHandler* |
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
512 CreateStorageCommitment(const std::string& jobId, |
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
513 const std::string& transactionUid, |
f159b731c47d
IStorageCommitmentFactory
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
514 const std::vector<std::string>& sopClassUids, |
3662
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3660
diff
changeset
|
515 const std::vector<std::string>& sopInstanceUids, |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3660
diff
changeset
|
516 const std::string& remoteAet, |
d8371b4302ff
OrthancPluginRegisterStorageCommitmentScpCallback()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3660
diff
changeset
|
517 const std::string& calledAet) ORTHANC_OVERRIDE; |
3736
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
518 |
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
519 StorageCommitmentReports& GetStorageCommitmentReports() |
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
520 { |
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
521 return *storageCommitmentReports_; |
0540b54324f1
StorageCommitmentReports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3713
diff
changeset
|
522 } |
3894
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
523 |
3928
4cdc875510d1
ServerContext::DecodeDicomFrame()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3916
diff
changeset
|
524 ImageAccessor* DecodeDicomFrame(const std::string& publicId, |
4cdc875510d1
ServerContext::DecodeDicomFrame()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3916
diff
changeset
|
525 unsigned int frameIndex); |
4cdc875510d1
ServerContext::DecodeDicomFrame()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3916
diff
changeset
|
526 |
4cdc875510d1
ServerContext::DecodeDicomFrame()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3916
diff
changeset
|
527 ImageAccessor* DecodeDicomFrame(const DicomInstanceToStore& dicom, |
4cdc875510d1
ServerContext::DecodeDicomFrame()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3916
diff
changeset
|
528 unsigned int frameIndex); |
4cdc875510d1
ServerContext::DecodeDicomFrame()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3916
diff
changeset
|
529 |
3980
e42f5445d20d
Fix decoding of DICOM images for plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3959
diff
changeset
|
530 ImageAccessor* DecodeDicomFrame(const void* dicom, |
e42f5445d20d
Fix decoding of DICOM images for plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3959
diff
changeset
|
531 size_t size, |
e42f5445d20d
Fix decoding of DICOM images for plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3959
diff
changeset
|
532 unsigned int frameIndex); |
e42f5445d20d
Fix decoding of DICOM images for plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3959
diff
changeset
|
533 |
3894
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
534 void StoreWithTranscoding(std::string& sopClassUid, |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
535 std::string& sopInstanceUid, |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
536 DicomStoreUserConnection& connection, |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
537 const std::string& dicom, |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
538 bool hasMoveOriginator, |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
539 const std::string& moveOriginatorAet, |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
540 uint16_t moveOriginatorId); |
8f7ad4989fec
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3814
diff
changeset
|
541 |
3930
b99acc213937
transcoder plugins and GDCM transcoding are working
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3928
diff
changeset
|
542 // This method can be used even if the global option |
3911
0ef7f4528be2
renamed option TranscodingEnabled to TranscodeDicomProtocol
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3910
diff
changeset
|
543 // "TranscodeDicomProtocol" is set to "false" |
3944
aae045f802f4
preparing simplified interface for IDicomTranscoder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3939
diff
changeset
|
544 virtual bool Transcode(DicomImage& target, |
aae045f802f4
preparing simplified interface for IDicomTranscoder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3939
diff
changeset
|
545 DicomImage& source /* in, "GetParsed()" possibly modified */, |
aae045f802f4
preparing simplified interface for IDicomTranscoder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3939
diff
changeset
|
546 const std::set<DicomTransferSyntax>& allowedSyntaxes, |
aae045f802f4
preparing simplified interface for IDicomTranscoder
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3939
diff
changeset
|
547 bool allowNewSopInstanceUid) ORTHANC_OVERRIDE; |
3959
76a24be12912
c-get: support of transcoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3951
diff
changeset
|
548 |
76a24be12912
c-get: support of transcoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3951
diff
changeset
|
549 bool IsTranscodeDicomProtocol() const |
76a24be12912
c-get: support of transcoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3951
diff
changeset
|
550 { |
76a24be12912
c-get: support of transcoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3951
diff
changeset
|
551 return transcodeDicomProtocol_; |
76a24be12912
c-get: support of transcoding
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3951
diff
changeset
|
552 } |
4375
208029732d51
New config option "DeidentifyDimseQueryLogs"
Mark Poscablo <Mark.Poscablo@varian.com>
parents:
4205
diff
changeset
|
553 |
4376
b002f9abe802
review of changeset 4375:208029732d51
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4375
diff
changeset
|
554 const std::string& GetDeidentifiedContent(const DicomElement& element) const; |
4473
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
555 |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
556 void GetAcceptedTransferSyntaxes(std::set<DicomTransferSyntax>& syntaxes); |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
557 |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
558 void SetAcceptedTransferSyntaxes(const std::set<DicomTransferSyntax>& syntaxes); |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
559 |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
560 bool IsUnknownSopClassAccepted(); |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
561 |
68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
4465
diff
changeset
|
562 void SetUnknownSopClassAccepted(bool accepted); |
4935
acd3f72e2a21
split ExpandResource in 2: read from DB and serialize to json. This will allow us to merge requested tags from both the DB and the file system
Alain Mazy <am@osimis.io>
parents:
4921
diff
changeset
|
563 |
acd3f72e2a21
split ExpandResource in 2: read from DB and serialize to json. This will allow us to merge requested tags from both the DB and the file system
Alain Mazy <am@osimis.io>
parents:
4921
diff
changeset
|
564 bool ExpandResource(Json::Value& target, |
acd3f72e2a21
split ExpandResource in 2: read from DB and serialize to json. This will allow us to merge requested tags from both the DB and the file system
Alain Mazy <am@osimis.io>
parents:
4921
diff
changeset
|
565 const std::string& publicId, |
acd3f72e2a21
split ExpandResource in 2: read from DB and serialize to json. This will allow us to merge requested tags from both the DB and the file system
Alain Mazy <am@osimis.io>
parents:
4921
diff
changeset
|
566 ResourceType level, |
4936
8422e4f99a18
Handling RequestedTags in ExpandResource -> read parent main dicom tags if required. Not yet getting missing tags from file. Integration tests ok
Alain Mazy <am@osimis.io>
parents:
4935
diff
changeset
|
567 DicomToJsonFormat format, |
5058
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
568 const std::set<DicomTag>& requestedTags, |
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
569 bool allowStorageAccess); |
4935
acd3f72e2a21
split ExpandResource in 2: read from DB and serialize to json. This will allow us to merge requested tags from both the DB and the file system
Alain Mazy <am@osimis.io>
parents:
4921
diff
changeset
|
570 |
4937
3f9b9865c8cc
include requested tags from storage if needed
Alain Mazy <am@osimis.io>
parents:
4936
diff
changeset
|
571 bool ExpandResource(Json::Value& target, |
3f9b9865c8cc
include requested tags from storage if needed
Alain Mazy <am@osimis.io>
parents:
4936
diff
changeset
|
572 const std::string& publicId, |
4940
304514ce84ee
tools/find + C-Find + list-resources now all using the same code (ExpandResource) to build 'computed tags'
Alain Mazy <am@osimis.io>
parents:
4939
diff
changeset
|
573 const DicomMap& mainDicomTags, // optional: the main dicom tags for the resource (if already available) |
4937
3f9b9865c8cc
include requested tags from storage if needed
Alain Mazy <am@osimis.io>
parents:
4936
diff
changeset
|
574 const std::string& instanceId, // optional: the id of an instance for the resource |
4978
2cfa50d8eb60
Speed-up handling of DicomModalitiesInStudy in C-Find and tools/find queries
Alain Mazy <am@osimis.io>
parents:
4940
diff
changeset
|
575 const Json::Value* dicomAsJson, // optional: the dicom-as-json for the resource |
4937
3f9b9865c8cc
include requested tags from storage if needed
Alain Mazy <am@osimis.io>
parents:
4936
diff
changeset
|
576 ResourceType level, |
3f9b9865c8cc
include requested tags from storage if needed
Alain Mazy <am@osimis.io>
parents:
4936
diff
changeset
|
577 DicomToJsonFormat format, |
5058
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
578 const std::set<DicomTag>& requestedTags, |
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
579 bool allowStorageAccess); |
4937
3f9b9865c8cc
include requested tags from storage if needed
Alain Mazy <am@osimis.io>
parents:
4936
diff
changeset
|
580 |
4939 | 581 bool ExpandResource(ExpandedResource& target, |
582 const std::string& publicId, | |
4940
304514ce84ee
tools/find + C-Find + list-resources now all using the same code (ExpandResource) to build 'computed tags'
Alain Mazy <am@osimis.io>
parents:
4939
diff
changeset
|
583 const DicomMap& mainDicomTags, // optional: the main dicom tags for the resource (if already available) |
4939 | 584 const std::string& instanceId, // optional: the id of an instance for the resource |
4978
2cfa50d8eb60
Speed-up handling of DicomModalitiesInStudy in C-Find and tools/find queries
Alain Mazy <am@osimis.io>
parents:
4940
diff
changeset
|
585 const Json::Value* dicomAsJson, // optional: the dicom-as-json for the resource |
4939 | 586 ResourceType level, |
4940
304514ce84ee
tools/find + C-Find + list-resources now all using the same code (ExpandResource) to build 'computed tags'
Alain Mazy <am@osimis.io>
parents:
4939
diff
changeset
|
587 const std::set<DicomTag>& requestedTags, |
5222
3a61fd50f804
starting refactoring ExpandedResource
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
5200
diff
changeset
|
588 ExpandResourceFlags expandFlags, |
5058
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
589 bool allowStorageAccess); |
4939 | 590 |
5058
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
591 FindStorageAccessMode GetFindStorageAccessMode() const |
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
592 { |
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
593 return findStorageAccessMode_; |
d4e5ca0c9307
Fix the "Never" option of the "StorageAccessOnFind" that was sill accessing files (bug introduced in 1.11.0)
Alain Mazy <am@osimis.io>
parents:
5048
diff
changeset
|
594 } |
5111
7547c7dfd017
/tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s
Alain Mazy <am@osimis.io>
parents:
5058
diff
changeset
|
595 |
7547c7dfd017
/tools/metrics-prometheus: added orthanc_last_change and orthanc_up_time_s
Alain Mazy <am@osimis.io>
parents:
5058
diff
changeset
|
596 int64_t GetServerUpTime() const; |
224 | 597 }; |
598 } |