Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerContext.cpp @ 4473:68f52897c119
new URIs: /tools/accepted-transfer-syntaxes and /tools/unknown-sop-class-accepted to replace Lua callbacks for transfer syntaxes
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 26 Jan 2021 14:48:10 +0100 |
parents | fe774d8e904b |
children | 6f99949b2878 |
comparison
equal
deleted
inserted
replaced
4472:28a4baadde17 | 4473:68f52897c119 |
---|---|
389 { | 389 { |
390 deidentifyLogs_ = false; | 390 deidentifyLogs_ = false; |
391 CLOG(INFO, DICOM) << "Deidentification of log contents (notably for DIMSE queries) is disabled"; | 391 CLOG(INFO, DICOM) << "Deidentification of log contents (notably for DIMSE queries) is disabled"; |
392 } | 392 } |
393 | 393 |
394 // New option in Orthanc 1.9.0 | 394 // New options in Orthanc 1.9.0 |
395 if (lock.GetConfiguration().LookupStringParameter(s, "DicomScuPreferredTransferSyntax") && | 395 if (lock.GetConfiguration().LookupStringParameter(s, "DicomScuPreferredTransferSyntax") && |
396 !LookupTransferSyntax(preferredTransferSyntax_, s)) | 396 !LookupTransferSyntax(preferredTransferSyntax_, s)) |
397 { | 397 { |
398 throw OrthancException(ErrorCode_ParameterOutOfRange, | 398 throw OrthancException(ErrorCode_ParameterOutOfRange, |
399 "Unknown preferred transfer syntax: " + s); | 399 "Unknown preferred transfer syntax: " + s); |
400 } | 400 } |
401 | 401 |
402 CLOG(INFO, DICOM) << "Preferred transfer syntax for Orthanc C-STORE SCU: " | 402 CLOG(INFO, DICOM) << "Preferred transfer syntax for Orthanc C-STORE SCU: " |
403 << GetTransferSyntaxUid(preferredTransferSyntax_); | 403 << GetTransferSyntaxUid(preferredTransferSyntax_); |
404 | |
405 lock.GetConfiguration().GetAcceptedTransferSyntaxes(acceptedTransferSyntaxes_); | |
406 | |
407 isUnknownSopClassAccepted_ = lock.GetConfiguration().GetBooleanParameter("UnknownSopClassAccepted", false); | |
404 } | 408 } |
405 | 409 |
406 jobsEngine_.SetThreadSleep(unitTesting ? 20 : 200); | 410 jobsEngine_.SetThreadSleep(unitTesting ? 20 : 200); |
407 | 411 |
408 listeners_.push_back(ServerListener(luaListener_, "Lua")); | 412 listeners_.push_back(ServerListener(luaListener_, "Lua")); |
1792 else | 1796 else |
1793 { | 1797 { |
1794 return element.GetValue().GetContent(); | 1798 return element.GetValue().GetContent(); |
1795 } | 1799 } |
1796 } | 1800 } |
1801 | |
1802 | |
1803 void ServerContext::GetAcceptedTransferSyntaxes(std::set<DicomTransferSyntax>& syntaxes) | |
1804 { | |
1805 boost::mutex::scoped_lock lock(dynamicOptionsMutex_); | |
1806 syntaxes = acceptedTransferSyntaxes_; | |
1807 } | |
1808 | |
1809 | |
1810 void ServerContext::SetAcceptedTransferSyntaxes(const std::set<DicomTransferSyntax>& syntaxes) | |
1811 { | |
1812 boost::mutex::scoped_lock lock(dynamicOptionsMutex_); | |
1813 acceptedTransferSyntaxes_ = syntaxes; | |
1814 } | |
1815 | |
1816 | |
1817 bool ServerContext::IsUnknownSopClassAccepted() | |
1818 { | |
1819 boost::mutex::scoped_lock lock(dynamicOptionsMutex_); | |
1820 return isUnknownSopClassAccepted_; | |
1821 } | |
1822 | |
1823 | |
1824 void ServerContext::SetUnknownSopClassAccepted(bool accepted) | |
1825 { | |
1826 boost::mutex::scoped_lock lock(dynamicOptionsMutex_); | |
1827 isUnknownSopClassAccepted_ = accepted; | |
1828 } | |
1797 } | 1829 } |