# HG changeset patch # User Sebastien Jodogne # Date 1743857556 -7200 # Node ID 7b334c586295c8b6ae237719ed2540b93759d00d # Parent ff1b0e0b498849600c0fb60a93c9ab3e12cd0dc9 reorganization diff -r ff1b0e0b4988 -r 7b334c586295 OrthancFramework/Resources/CMake/OrthancFrameworkConfiguration.cmake --- 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 diff -r ff1b0e0b4988 -r 7b334c586295 OrthancFramework/Sources/DicomFormat/DicomImageInformation.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; diff -r ff1b0e0b4988 -r 7b334c586295 OrthancFramework/Sources/DicomFormat/DicomImageInformation.h --- 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 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: diff -r ff1b0e0b4988 -r 7b334c586295 OrthancFramework/Sources/DicomFormat/Window.cpp --- /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 + * . + **/ + + +#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)); + } +} diff -r ff1b0e0b4988 -r 7b334c586295 OrthancFramework/Sources/DicomFormat/Window.h --- /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 + * . + **/ + + +#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); + }; +} diff -r ff1b0e0b4988 -r 7b334c586295 OrthancServer/Plugins/Samples/MultitenantDicom/OrthancFrameworkDependencies.cpp --- 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"