Mercurial > hg > orthanc
diff Core/Enumerations.cpp @ 2381:b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 29 Aug 2017 19:59:01 +0200 |
parents | e002430baa41 |
children | 7284093111b0 |
line wrap: on
line diff
--- a/Core/Enumerations.cpp Tue Aug 29 16:49:44 2017 +0200 +++ b/Core/Enumerations.cpp Tue Aug 29 19:59:01 2017 +0200 @@ -1475,5 +1475,28 @@ default: throw OrthancException(ErrorCode_ParameterOutOfRange); } + } + + + static boost::mutex defaultEncodingMutex_; // Should not be necessary + static Encoding defaultEncoding_ = ORTHANC_DEFAULT_DICOM_ENCODING; + + Encoding GetDefaultDicomEncoding() + { + boost::mutex::scoped_lock lock(defaultEncodingMutex_); + return defaultEncoding_; } + + void SetDefaultDicomEncoding(Encoding encoding) + { + std::string name = EnumerationToString(encoding); + + { + boost::mutex::scoped_lock lock(defaultEncodingMutex_); + defaultEncoding_ = encoding; + } + + LOG(INFO) << "Default encoding for DICOM was changed to: " << name; + } + }