Mercurial > hg > orthanc
comparison OrthancServer/Sources/OrthancConfiguration.h @ 4944:f377d5643538 more-tags
new Warnings configuration + InstanceAvailability tag
author | Alain Mazy <am@osimis.io> |
---|---|
date | Thu, 17 Mar 2022 17:03:59 +0100 |
parents | 96a3e81eba90 |
children | dad71e6da406 |
comparison
equal
deleted
inserted
replaced
4941:96a3e81eba90 | 4944:f377d5643538 |
---|---|
29 #include <OrthancServerResources.h> | 29 #include <OrthancServerResources.h> |
30 | 30 |
31 #include <boost/filesystem.hpp> | 31 #include <boost/filesystem.hpp> |
32 #include <boost/thread/shared_mutex.hpp> | 32 #include <boost/thread/shared_mutex.hpp> |
33 #include <boost/thread/lock_types.hpp> | 33 #include <boost/thread/lock_types.hpp> |
34 #include <set> | |
34 | 35 |
35 class DcmDataset; | 36 class DcmDataset; |
36 | 37 |
37 namespace Orthanc | 38 namespace Orthanc |
38 { | 39 { |
40 class DicomTag; | 41 class DicomTag; |
41 class HttpServer; | 42 class HttpServer; |
42 class ParsedDicomFile; | 43 class ParsedDicomFile; |
43 class ServerIndex; | 44 class ServerIndex; |
44 class TemporaryFile; | 45 class TemporaryFile; |
45 | 46 |
47 enum Warnings | |
48 { | |
49 Warnings_None, | |
50 Warnings_001_TagsBeingReadFromStorage, | |
51 Warnings_002_InconsistentDicomTagsInDb, | |
52 }; | |
53 | |
54 | |
46 class OrthancConfiguration : public boost::noncopyable | 55 class OrthancConfiguration : public boost::noncopyable |
47 { | 56 { |
48 private: | 57 private: |
49 typedef std::map<std::string, RemoteModalityParameters> Modalities; | 58 typedef std::map<std::string, RemoteModalityParameters> Modalities; |
50 typedef std::map<std::string, WebServiceParameters> Peers; | 59 typedef std::map<std::string, WebServiceParameters> Peers; |
56 FontRegistry fontRegistry_; | 65 FontRegistry fontRegistry_; |
57 const char* configurationFileArg_; | 66 const char* configurationFileArg_; |
58 Modalities modalities_; | 67 Modalities modalities_; |
59 Peers peers_; | 68 Peers peers_; |
60 ServerIndex* serverIndex_; | 69 ServerIndex* serverIndex_; |
70 std::set<Warnings> disabledWarnings_; | |
61 | 71 |
62 OrthancConfiguration() : | 72 OrthancConfiguration() : |
63 configurationFileArg_(NULL), | 73 configurationFileArg_(NULL), |
64 serverIndex_(NULL) | 74 serverIndex_(NULL) |
65 { | 75 { |
151 | 161 |
152 void Read(const char* configurationFile); | 162 void Read(const char* configurationFile); |
153 | 163 |
154 // "SetServerIndex()" must have been called | 164 // "SetServerIndex()" must have been called |
155 void LoadModalitiesAndPeers(); | 165 void LoadModalitiesAndPeers(); |
156 | 166 |
167 void LoadWarnings(); | |
168 | |
157 void RegisterFont(ServerResources::FileResourceId resource); | 169 void RegisterFont(ServerResources::FileResourceId resource); |
158 | 170 |
159 bool LookupStringParameter(std::string& target, | 171 bool LookupStringParameter(std::string& target, |
160 const std::string& parameter) const; | 172 const std::string& parameter) const; |
161 | 173 |
240 | 252 |
241 void GetAcceptedTransferSyntaxes(std::set<DicomTransferSyntax>& target) const; | 253 void GetAcceptedTransferSyntaxes(std::set<DicomTransferSyntax>& target) const; |
242 | 254 |
243 std::string GetDatabaseServerIdentifier() const; | 255 std::string GetDatabaseServerIdentifier() const; |
244 | 256 |
245 bool IsInconsistentDicomTagsLogsEnabled() const; | 257 bool IsWarningEnabled(Warnings warning) const |
246 | 258 { |
247 bool IsStorageAccessOnFindLogsEnabled() const; | 259 return disabledWarnings_.count(warning) == 0; |
260 } | |
248 | 261 |
249 static void DefaultExtractDicomSummary(DicomMap& target, | 262 static void DefaultExtractDicomSummary(DicomMap& target, |
250 const ParsedDicomFile& dicom); | 263 const ParsedDicomFile& dicom); |
251 | 264 |
252 static void DefaultExtractDicomSummary(DicomMap& target, | 265 static void DefaultExtractDicomSummary(DicomMap& target, |