Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Enumerations.cpp @ 5398:08b5516c6e5e
compatibility of OrthancFramework with latest releases of Emscripten
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 11 Oct 2023 15:26:45 +0200 |
parents | 33410f14033b |
children | aaf7c49a9ddc 3206537cbb56 |
comparison
equal
deleted
inserted
replaced
5397:e7f6ec8cbc35 | 5398:08b5516c6e5e |
---|---|
22 | 22 |
23 | 23 |
24 #include "PrecompiledHeaders.h" | 24 #include "PrecompiledHeaders.h" |
25 #include "Enumerations.h" | 25 #include "Enumerations.h" |
26 | 26 |
27 #include "Logging.h" | |
28 #include "MultiThreading/Mutex.h" | |
27 #include "OrthancException.h" | 29 #include "OrthancException.h" |
28 #include "Toolbox.h" | 30 #include "Toolbox.h" |
29 #include "Logging.h" | 31 |
30 | |
31 #include <boost/thread/mutex.hpp> | |
32 #include <string.h> | 32 #include <string.h> |
33 #include <cassert> | 33 #include <cassert> |
34 #include <boost/algorithm/string/replace.hpp> | 34 #include <boost/algorithm/string/replace.hpp> |
35 | 35 |
36 namespace Orthanc | 36 namespace Orthanc |
2375 throw OrthancException(ErrorCode_ParameterOutOfRange); | 2375 throw OrthancException(ErrorCode_ParameterOutOfRange); |
2376 } | 2376 } |
2377 } | 2377 } |
2378 | 2378 |
2379 | 2379 |
2380 static boost::mutex defaultEncodingMutex_; // Should not be necessary | 2380 static Mutex defaultEncodingMutex_; // Should not be necessary |
2381 static Encoding defaultEncoding_ = ORTHANC_DEFAULT_DICOM_ENCODING; | 2381 static Encoding defaultEncoding_ = ORTHANC_DEFAULT_DICOM_ENCODING; |
2382 | 2382 |
2383 Encoding GetDefaultDicomEncoding() | 2383 Encoding GetDefaultDicomEncoding() |
2384 { | 2384 { |
2385 boost::mutex::scoped_lock lock(defaultEncodingMutex_); | 2385 Mutex::ScopedLock lock(defaultEncodingMutex_); |
2386 return defaultEncoding_; | 2386 return defaultEncoding_; |
2387 } | 2387 } |
2388 | 2388 |
2389 void SetDefaultDicomEncoding(Encoding encoding) | 2389 void SetDefaultDicomEncoding(Encoding encoding) |
2390 { | 2390 { |
2391 std::string name = EnumerationToString(encoding); | 2391 std::string name = EnumerationToString(encoding); |
2392 | 2392 |
2393 { | 2393 { |
2394 boost::mutex::scoped_lock lock(defaultEncodingMutex_); | 2394 Mutex::ScopedLock lock(defaultEncodingMutex_); |
2395 defaultEncoding_ = encoding; | 2395 defaultEncoding_ = encoding; |
2396 } | 2396 } |
2397 | 2397 |
2398 LOG(INFO) << "Default encoding for DICOM was changed to: " << name; | 2398 LOG(INFO) << "Default encoding for DICOM was changed to: " << name; |
2399 } | 2399 } |