changeset 6087:7b334c586295

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 05 Apr 2025 14:52:36 +0200
parents ff1b0e0b4988
children 47b36a7c3b1c
files OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp OrthancFramework/Sources/DicomFormat/DicomImageInformation.h OrthancFramework/Sources/DicomFormat/Window.cpp OrthancFramework/Sources/DicomFormat/Window.h OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp
diffstat 6 files changed, 115 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Sat Apr 05 14:44:35 2025 +0200
+++ b/OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake	Sat Apr 05 14:52:36 2025 +0200
@@ -163,8 +163,9 @@
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Cache/MemoryCache.cpp
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Cache/MemoryObjectCache.cpp
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/ChunkedBuffer.cpp
+  ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomFormat/DicomPath.cpp
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomFormat/DicomTag.cpp
-  ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomFormat/DicomPath.cpp
+  ${CMAKE_CURRENT_LIST_DIR}/../../Sources/DicomFormat/Window.cpp
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/EnumerationDictionary.h
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/Enumerations.cpp
   ${CMAKE_CURRENT_LIST_DIR}/../../Sources/FileStorage/FileInfo.cpp
--- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp	Sat Apr 05 14:44:35 2025 +0200
+++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp	Sat Apr 05 14:52:36 2025 +0200
@@ -44,29 +44,6 @@
 
 namespace Orthanc
 {
-  Window::Window(double center,
-                 double width) :
-    center_(center)
-  {
-    width_ = std::abs(width);
-  }
-
-
-  void Window::GetBounds(double& low,
-                         double& high) const
-  {
-    low = center_ - width_ / 2.0;
-    high = center_ + width_ / 2.0;
-  }
-
-
-  Window Window::FromBounds(double low,
-                            double high)
-  {
-    return Window((low + high) / 2.0, std::abs(high - low));
-  }
-
-
   DicomImageInformation::DicomImageInformation(const DicomMap& values)
   {
     std::string sopClassUid;
--- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.h	Sat Apr 05 14:44:35 2025 +0200
+++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.h	Sat Apr 05 14:52:36 2025 +0200
@@ -25,39 +25,12 @@
 #pragma once
 
 #include "DicomMap.h"
+#include "Window.h"
 
 #include <stdint.h>
 
 namespace Orthanc
 {
-  class ORTHANC_PUBLIC Window
-  {
-  private:
-    double center_;
-    double width_;
-
-  public:
-    Window(double center,
-           double width);
-
-    double GetCenter() const
-    {
-      return center_;
-    }
-
-    double GetWidth() const
-    {
-      return width_;
-    }
-
-    void GetBounds(double& low,
-                   double& high) const;
-
-    static Window FromBounds(double low,
-                             double high);
-  };
-
-
   class ORTHANC_PUBLIC DicomImageInformation
   {  
   private:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Sources/DicomFormat/Window.cpp	Sat Apr 05 14:52:36 2025 +0200
@@ -0,0 +1,52 @@
+/**
+ * Orthanc - A Lightweight, RESTful DICOM Store
+ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
+ * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017-2023 Osimis S.A., Belgium
+ * Copyright (C) 2024-2025 Orthanc Team SRL, Belgium
+ * Copyright (C) 2021-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
+ *
+ * This program is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/>.
+ **/
+
+
+#include "../PrecompiledHeaders.h"
+#include "Window.h"
+
+
+namespace Orthanc
+{
+  Window::Window(double center,
+                 double width) :
+    center_(center)
+  {
+    width_ = std::abs(width);
+  }
+
+
+  void Window::GetBounds(double& low,
+                         double& high) const
+  {
+    low = center_ - width_ / 2.0;
+    high = center_ + width_ / 2.0;
+  }
+
+
+  Window Window::FromBounds(double low,
+                            double high)
+  {
+    return Window((low + high) / 2.0, std::abs(high - low));
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OrthancFramework/Sources/DicomFormat/Window.h	Sat Apr 05 14:52:36 2025 +0200
@@ -0,0 +1,59 @@
+/**
+ * Orthanc - A Lightweight, RESTful DICOM Store
+ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
+ * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017-2023 Osimis S.A., Belgium
+ * Copyright (C) 2024-2025 Orthanc Team SRL, Belgium
+ * Copyright (C) 2021-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
+ *
+ * This program is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/>.
+ **/
+
+
+#pragma once
+
+#include "../Compatibility.h"
+#include "../OrthancFramework.h"
+
+
+namespace Orthanc
+{
+  class ORTHANC_PUBLIC Window
+  {
+  private:
+    double center_;
+    double width_;
+
+  public:
+    Window(double center,
+           double width);
+
+    double GetCenter() const
+    {
+      return center_;
+    }
+
+    double GetWidth() const
+    {
+      return width_;
+    }
+
+    void GetBounds(double& low,
+                   double& high) const;
+
+    static Window FromBounds(double low,
+                             double high);
+  };
+}
--- a/OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp	Sat Apr 05 14:44:35 2025 +0200
+++ b/OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp	Sat Apr 05 14:52:36 2025 +0200
@@ -46,6 +46,7 @@
 #include "../../../../OrthancFramework/Sources/DicomFormat/DicomPath.cpp"
 #include "../../../../OrthancFramework/Sources/DicomFormat/DicomTag.cpp"
 #include "../../../../OrthancFramework/Sources/DicomFormat/DicomValue.cpp"
+#include "../../../../OrthancFramework/Sources/DicomFormat/Window.cpp"
 #include "../../../../OrthancFramework/Sources/DicomNetworking/DicomAssociation.cpp"
 #include "../../../../OrthancFramework/Sources/DicomNetworking/DicomAssociationParameters.cpp"
 #include "../../../../OrthancFramework/Sources/DicomNetworking/DicomFindAnswers.cpp"