changeset 159:5dc54316d68b

shared copyright with osimis
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 04 Jan 2017 16:41:43 +0100
parents ca2dd8d1a73a
children b0910ae2ace5
files AUTHORS CMakeLists.txt Orthanc/Core/ChunkedBuffer.cpp Orthanc/Core/ChunkedBuffer.h Orthanc/Core/DicomFormat/DicomMap.cpp Orthanc/Core/DicomFormat/DicomMap.h Orthanc/Core/DicomFormat/DicomTag.cpp Orthanc/Core/DicomFormat/DicomTag.h Orthanc/Core/DicomFormat/DicomValue.cpp Orthanc/Core/DicomFormat/DicomValue.h Orthanc/Core/Endianness.h Orthanc/Core/Enumerations.cpp Orthanc/Core/Enumerations.h Orthanc/Core/FileStorage/FilesystemStorage.cpp Orthanc/Core/FileStorage/FilesystemStorage.h Orthanc/Core/FileStorage/IStorageArea.h Orthanc/Core/IDynamicObject.h Orthanc/Core/Images/ImageAccessor.cpp Orthanc/Core/Images/ImageAccessor.h Orthanc/Core/Images/ImageBuffer.cpp Orthanc/Core/Images/ImageBuffer.h Orthanc/Core/Images/ImageProcessing.cpp Orthanc/Core/Images/ImageProcessing.h Orthanc/Core/Logging.h Orthanc/Core/MultiThreading/SharedMessageQueue.cpp Orthanc/Core/MultiThreading/SharedMessageQueue.h Orthanc/Core/OrthancException.h Orthanc/Core/PrecompiledHeaders.cpp Orthanc/Core/PrecompiledHeaders.h Orthanc/Core/SystemToolbox.cpp Orthanc/Core/SystemToolbox.h Orthanc/Core/Toolbox.cpp Orthanc/Core/Toolbox.h Orthanc/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp Orthanc/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.h Orthanc/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp Orthanc/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.h Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h Orthanc/Resources/CMake/BoostConfiguration.cmake Orthanc/Resources/EmbedResources.py Orthanc/Resources/WindowsResources.py Plugin/Cache/CacheIndex.h Plugin/Cache/CacheManager.cpp Plugin/Cache/CacheManager.h Plugin/Cache/CacheScheduler.cpp Plugin/Cache/CacheScheduler.h Plugin/Cache/ICacheFactory.h Plugin/Cache/IPrefetchPolicy.h Plugin/DecodedImageAdapter.cpp Plugin/DecodedImageAdapter.h Plugin/Plugin.cpp Plugin/SeriesInformationAdapter.cpp Plugin/SeriesInformationAdapter.h Plugin/ViewerPrefetchPolicy.cpp Plugin/ViewerPrefetchPolicy.h Plugin/ViewerToolbox.cpp Plugin/ViewerToolbox.h Resources/CMake/GdcmConfiguration.cmake Resources/CMake/JavaScriptLibraries.cmake UnitTestsSources/UnitTestsMain.cpp WebApplication/viewer.js
diffstat 62 files changed, 148 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Wed Dec 14 16:49:00 2016 +0100
+++ b/AUTHORS	Wed Jan 04 16:41:43 2017 +0100
@@ -6,8 +6,15 @@
 -------
 
 * Sebastien Jodogne <s.jodogne@gmail.com>
-  Department of Medical Physics
+
+  Overall design and lead developer.
+
+* Department of Medical Physics
   University Hospital of Liege
+  4000 Liege
   Belgium
 
-  Overall design and lead developer.
+* Osimis <info@osimis.io>
+  Rue des Chasseurs Ardennais 3
+  4031 Liege 
+  Belgium
--- a/CMakeLists.txt	Wed Dec 14 16:49:00 2016 +0100
+++ b/CMakeLists.txt	Wed Jan 04 16:41:43 2017 +0100
@@ -1,6 +1,7 @@
 # Orthanc - A Lightweight, RESTful DICOM Store
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
+# Copyright (C) 2017 Osimis, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Affero General Public License
--- a/Orthanc/Core/ChunkedBuffer.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/ChunkedBuffer.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/ChunkedBuffer.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/ChunkedBuffer.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/DicomFormat/DicomMap.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomMap.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/DicomFormat/DicomMap.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomMap.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/DicomFormat/DicomTag.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomTag.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/DicomFormat/DicomTag.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomTag.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/DicomFormat/DicomValue.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomValue.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/DicomFormat/DicomValue.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/DicomFormat/DicomValue.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Endianness.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Endianness.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Enumerations.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Enumerations.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Enumerations.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Enumerations.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/FileStorage/FilesystemStorage.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/FileStorage/FilesystemStorage.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/FileStorage/FilesystemStorage.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/FileStorage/FilesystemStorage.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/FileStorage/IStorageArea.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/FileStorage/IStorageArea.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/IDynamicObject.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/IDynamicObject.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Images/ImageAccessor.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Images/ImageAccessor.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Images/ImageAccessor.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Images/ImageAccessor.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Images/ImageBuffer.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Images/ImageBuffer.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Images/ImageBuffer.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Images/ImageBuffer.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Images/ImageProcessing.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Images/ImageProcessing.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Images/ImageProcessing.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Images/ImageProcessing.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/Logging.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Logging.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -38,11 +39,27 @@
 #  error The macro ORTHANC_ENABLE_LOGGING must be defined
 #endif
 
+#if !defined(ORTHANC_ENABLE_LOGGING_PLUGIN)
+#  if ORTHANC_ENABLE_LOGGING == 1
+#    error The macro ORTHANC_ENABLE_LOGGING_PLUGIN must be defined
+#  else
+#    define ORTHANC_ENABLE_LOGGING_PLUGIN 0
+#  endif
+#endif
+
+#if ORTHANC_ENABLE_LOGGING_PLUGIN == 1
+#  include <orthanc/OrthancCPlugin.h>
+#endif
+
 namespace Orthanc
 {
   namespace Logging
   {
+#if ORTHANC_ENABLE_LOGGING_PLUGIN == 1
+    void Initialize(OrthancPluginContext* context);
+#else
     void Initialize();
+#endif
 
     void Finalize();
 
@@ -86,7 +103,41 @@
 #  define LOG(level)   ::Orthanc::Logging::NullStream()
 #  define VLOG(level)  ::Orthanc::Logging::NullStream()
 
-#else  /* ORTHANC_ENABLE_LOGGING == 1 */
+
+#elif ORTHANC_ENABLE_LOGGING_PLUGIN == 1
+
+#  include <boost/noncopyable.hpp>
+#  define LOG(level)  ::Orthanc::Logging::InternalLogger(#level,  __FILE__, __LINE__)
+#  define VLOG(level) ::Orthanc::Logging::InternalLogger("TRACE", __FILE__, __LINE__)
+
+namespace Orthanc
+{
+  namespace Logging
+  {
+    class InternalLogger : public boost::noncopyable
+    {
+    private:
+      std::string level_;
+      std::string message_;
+
+    public:
+      InternalLogger(const char* level,
+                     const char* file,
+                     int line);
+
+      ~InternalLogger();
+      
+      InternalLogger& operator<< (const std::string& message);
+
+      InternalLogger& operator<< (const char* message);
+
+      InternalLogger& operator<< (int message);
+    };
+  }
+}
+
+
+#else  /* ORTHANC_ENABLE_LOGGING_PLUGIN == 0 && ORTHANC_ENABLE_LOGGING == 1 */
 
 #  include <boost/thread/mutex.hpp>
 #  define LOG(level)  ::Orthanc::Logging::InternalLogger(#level,  __FILE__, __LINE__)
--- a/Orthanc/Core/MultiThreading/SharedMessageQueue.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/MultiThreading/SharedMessageQueue.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/MultiThreading/SharedMessageQueue.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/MultiThreading/SharedMessageQueue.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/OrthancException.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/OrthancException.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/PrecompiledHeaders.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/PrecompiledHeaders.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/PrecompiledHeaders.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/PrecompiledHeaders.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Core/SystemToolbox.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/SystemToolbox.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -123,7 +124,7 @@
     barrierEvent_ = ServerBarrierEvent_Stop;
     while (!(*stopFlag || finish_))
     {
-      Toolbox::USleep(100 * 1000);
+      SystemToolbox::USleep(100 * 1000);
     }
 
 #if defined(_WIN32)
@@ -152,6 +153,18 @@
   }
 
 
+  void SystemToolbox::USleep(uint64_t microSeconds)
+  {
+#if defined(_WIN32)
+    ::Sleep(static_cast<DWORD>(microSeconds / static_cast<uint64_t>(1000)));
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__native_client__)
+    usleep(microSeconds);
+#else
+#error Support your platform here
+#endif
+  }
+
+
   static std::streamsize GetStreamSize(std::istream& f)
   {
     // http://www.cplusplus.com/reference/iostream/istream/tellg/
--- a/Orthanc/Core/SystemToolbox.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/SystemToolbox.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -50,6 +51,8 @@
 {
   namespace SystemToolbox
   {
+    void USleep(uint64_t microSeconds);
+
     ServerBarrierEvent ServerBarrier(const bool& stopFlag);
 
     ServerBarrierEvent ServerBarrier();
--- a/Orthanc/Core/Toolbox.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Toolbox.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -90,18 +91,6 @@
 
 namespace Orthanc
 {
-  void Toolbox::USleep(uint64_t microSeconds)
-  {
-#if defined(_WIN32)
-    ::Sleep(static_cast<DWORD>(microSeconds / static_cast<uint64_t>(1000)));
-#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__native_client__)
-    usleep(microSeconds);
-#else
-#error Support your platform here
-#endif
-  }
-
-
   void Toolbox::ToUpperCase(std::string& s)
   {
     std::transform(s.begin(), s.end(), s.begin(), toupper);
--- a/Orthanc/Core/Toolbox.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Core/Toolbox.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
@@ -78,8 +79,6 @@
 
   namespace Toolbox
   {
-    void USleep(uint64_t microSeconds);
-
     void ToUpperCase(std::string& s);  // Inplace version
 
     void ToLowerCase(std::string& s);  // Inplace version
--- a/Orthanc/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Plugins/Samples/GdcmDecoder/GdcmDecoderCache.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Plugins/Samples/GdcmDecoder/GdcmImageDecoder.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Plugins/Samples/GdcmDecoder/OrthancImageWrapper.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU General Public License as
--- a/Orthanc/Resources/CMake/BoostConfiguration.cmake	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Resources/CMake/BoostConfiguration.cmake	Wed Jan 04 16:41:43 2017 +0100
@@ -99,6 +99,13 @@
       -DBOOST_LOCALE_NO_POSIX_BACKEND=1
       -DBOOST_LOCALE_NO_STD_BACKEND=1
       )
+
+  elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
+    add_definitions(
+      -DBOOST_LOCALE_NO_POSIX_BACKEND=1
+      -DBOOST_LOCALE_NO_STD_BACKEND=1
+      )
+
   else()
     message(FATAL_ERROR "Support your platform here")
   endif()
@@ -114,10 +121,15 @@
   list(APPEND BOOST_SOURCES
     ${BOOST_REGEX_SOURCES}
     ${BOOST_SOURCES_DIR}/libs/date_time/src/gregorian/greg_month.cpp
-    ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp
     ${BOOST_SOURCES_DIR}/libs/system/src/error_code.cpp
     )
 
+  if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Emscripten")
+    list(APPEND BOOST_SOURCES
+      ${BOOST_SOURCES_DIR}/libs/locale/src/encoding/codepage.cpp
+      )
+  endif()
+
   if (${CMAKE_SYSTEM_NAME} STREQUAL "PNaCl" OR
       ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl32" OR
       ${CMAKE_SYSTEM_NAME} STREQUAL "NaCl64")
--- a/Orthanc/Resources/EmbedResources.py	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Resources/EmbedResources.py	Wed Jan 04 16:41:43 2017 +0100
@@ -3,6 +3,7 @@
 # Orthanc - A Lightweight, RESTful DICOM Store
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
+# Copyright (C) 2017 Osimis, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
--- a/Orthanc/Resources/WindowsResources.py	Wed Dec 14 16:49:00 2016 +0100
+++ b/Orthanc/Resources/WindowsResources.py	Wed Jan 04 16:41:43 2017 +0100
@@ -3,6 +3,7 @@
 # Orthanc - A Lightweight, RESTful DICOM Store
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
+# Copyright (C) 2017 Osimis, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU General Public License as
--- a/Plugin/Cache/CacheIndex.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/CacheIndex.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Cache/CacheManager.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/CacheManager.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Cache/CacheManager.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/CacheManager.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Cache/CacheScheduler.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/CacheScheduler.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Cache/CacheScheduler.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/CacheScheduler.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Cache/ICacheFactory.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/ICacheFactory.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Cache/IPrefetchPolicy.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Cache/IPrefetchPolicy.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/DecodedImageAdapter.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/DecodedImageAdapter.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/DecodedImageAdapter.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/DecodedImageAdapter.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/Plugin.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/Plugin.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/SeriesInformationAdapter.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/SeriesInformationAdapter.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/SeriesInformationAdapter.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/SeriesInformationAdapter.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/ViewerPrefetchPolicy.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/ViewerPrefetchPolicy.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/ViewerPrefetchPolicy.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/ViewerPrefetchPolicy.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/ViewerToolbox.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/ViewerToolbox.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Plugin/ViewerToolbox.h	Wed Dec 14 16:49:00 2016 +0100
+++ b/Plugin/ViewerToolbox.h	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/Resources/CMake/GdcmConfiguration.cmake	Wed Dec 14 16:49:00 2016 +0100
+++ b/Resources/CMake/GdcmConfiguration.cmake	Wed Jan 04 16:41:43 2017 +0100
@@ -1,6 +1,7 @@
 # Orthanc - A Lightweight, RESTful DICOM Store
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
+# Copyright (C) 2017 Osimis, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Affero General Public License
--- a/Resources/CMake/JavaScriptLibraries.cmake	Wed Dec 14 16:49:00 2016 +0100
+++ b/Resources/CMake/JavaScriptLibraries.cmake	Wed Jan 04 16:41:43 2017 +0100
@@ -1,6 +1,7 @@
 # Orthanc - A Lightweight, RESTful DICOM Store
 # Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
 # Department, University Hospital of Liege, Belgium
+# Copyright (C) 2017 Osimis, Belgium
 #
 # This program is free software: you can redistribute it and/or
 # modify it under the terms of the GNU Affero General Public License
--- a/UnitTestsSources/UnitTestsMain.cpp	Wed Dec 14 16:49:00 2016 +0100
+++ b/UnitTestsSources/UnitTestsMain.cpp	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License
--- a/WebApplication/viewer.js	Wed Dec 14 16:49:00 2016 +0100
+++ b/WebApplication/viewer.js	Wed Jan 04 16:41:43 2017 +0100
@@ -2,6 +2,7 @@
  * Orthanc - A Lightweight, RESTful DICOM Store
  * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
  * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017 Osimis, Belgium
  *
  * This program is free software: you can redistribute it and/or
  * modify it under the terms of the GNU Affero General Public License