# HG changeset patch # User Benjamin Golinvaux # Date 1585925266 -7200 # Node ID 556b4bc19118860fbd46a4bedcf9e07065aa7b83 # Parent 1b24f6b06408c74d28f067dd5ee2648183332524 The loaders have been adapter to the nobroker architecture and have been put back in the regular source files diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Deprecated/Volumes/IGeometryProvider.h --- a/Framework/Deprecated/Volumes/IGeometryProvider.h Fri Apr 03 16:13:24 2020 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/** - * Stone of Orthanc - * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics - * Department, University Hospital of Liege, Belgium - * Copyright (C) 2017-2020 Osimis S.A., Belgium - * - * This program is free software: you can redistribute it and/or - * modify it under the terms of the GNU Affero 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 - * Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - **/ - - -#pragma once - -#include "../../Volumes/VolumeImageGeometry.h" - -namespace Deprecated -{ - class IGeometryProvider - { - public: - virtual ~IGeometryProvider() {} - virtual bool HasGeometry() const = 0; - virtual const OrthancStone::VolumeImageGeometry& GetImageGeometry() const = 0; - }; -} diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/DicomStructureSetLoader.cpp --- a/Framework/Loaders/DicomStructureSetLoader.cpp Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Fri Apr 03 16:47:46 2020 +0200 @@ -21,9 +21,9 @@ #include "DicomStructureSetLoader.h" -#include "../../Scene2D/PolylineSceneLayer.h" -#include "../../StoneException.h" -#include "../../Toolbox/GeometryToolbox.h" +#include "../Scene2D/PolylineSceneLayer.h" +#include "../StoneException.h" +#include "../Toolbox/GeometryToolbox.h" #include @@ -357,7 +357,7 @@ } - boost::shared_ptr DicomStructureSetLoader::Create(OrthancStone::ILoadersContext& loadersContext) + boost::shared_ptr DicomStructureSetLoader::Create(OrthancStone::ILoadersContext& loadersContext) { boost::shared_ptr obj( new DicomStructureSetLoader( diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/DicomStructureSetLoader.h --- a/Framework/Loaders/DicomStructureSetLoader.h Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.h Fri Apr 03 16:47:46 2020 +0200 @@ -21,8 +21,9 @@ #pragma once -#include "../../Toolbox/DicomStructureSet.h" -#include "../../Volumes/IVolumeSlicer.h" +#include "../Toolbox/DicomStructureSet.h" +#include "../Volumes/IVolumeSlicer.h" +#include "../Loaders/ILoadersContext.h" #include "LoaderStateMachine.h" #include diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/LoaderCache.cpp --- a/Framework/Loaders/LoaderCache.cpp Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/LoaderCache.cpp Fri Apr 03 16:47:46 2020 +0200 @@ -20,12 +20,12 @@ #include "LoaderCache.h" -#include "../../StoneException.h" +#include "../StoneException.h" #include "OrthancSeriesVolumeProgressiveLoader.h" #include "OrthancMultiframeVolumeLoader.h" #include "DicomStructureSetLoader.h" -#include "../../Loaders/ILoadersContext.h" +#include "../Loaders/ILoadersContext.h" #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2 @@ -36,9 +36,9 @@ #if ORTHANC_ENABLE_WASM == 1 # include -# include "../../Oracle/WebAssemblyOracle.h" +# include "../Oracle/WebAssemblyOracle.h" #else -# include "../../Oracle/ThreadedOracle.h" +# include "../Oracle/ThreadedOracle.h" #endif #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2 @@ -46,8 +46,8 @@ #endif //BGO_ENABLE_DICOMSTRUCTURESETLOADER2 -#include "../../Volumes/DicomVolumeImage.h" -#include "../../Volumes/DicomVolumeImageMPRSlicer.h" +#include "../Volumes/DicomVolumeImage.h" +#include "../Volumes/DicomVolumeImageMPRSlicer.h" #ifdef BGO_ENABLE_DICOMSTRUCTURESETLOADER2 #include "../../Volumes/DicomStructureSetSlicer2.h" diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/LoaderCache.h --- a/Framework/Loaders/LoaderCache.h Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/LoaderCache.h Fri Apr 03 16:47:46 2020 +0200 @@ -20,8 +20,7 @@ #pragma once -#include "../Messages/LockingEmitter.h" -#include "../../Volumes/DicomVolumeImageMPRSlicer.h" +#include "../Volumes/DicomVolumeImageMPRSlicer.h" #include "OrthancSeriesVolumeProgressiveLoader.h" #include "OrthancMultiframeVolumeLoader.h" #include "DicomStructureSetLoader.h" diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/LoaderStateMachine.cpp --- a/Framework/Loaders/LoaderStateMachine.cpp Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/LoaderStateMachine.cpp Fri Apr 03 16:47:46 2020 +0200 @@ -21,7 +21,7 @@ #include "LoaderStateMachine.h" -#include "../../Loaders/ILoadersContext.h" +#include "../Loaders/ILoadersContext.h" #include diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/LoaderStateMachine.h --- a/Framework/Loaders/LoaderStateMachine.h Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/LoaderStateMachine.h Fri Apr 03 16:47:46 2020 +0200 @@ -21,13 +21,13 @@ #pragma once -#include "../../Messages/IObservable.h" -#include "../../Messages/ObserverBase.h" -#include "../../Oracle/GetOrthancImageCommand.h" -#include "../../Oracle/GetOrthancWebViewerJpegCommand.h" -#include "../../Oracle/IOracle.h" -#include "../../Oracle/OracleCommandExceptionMessage.h" -#include "../../Oracle/OrthancRestApiCommand.h" +#include "../Messages/IObservable.h" +#include "../Messages/ObserverBase.h" +#include "../Oracle/GetOrthancImageCommand.h" +#include "../Oracle/GetOrthancWebViewerJpegCommand.h" +#include "../Oracle/IOracle.h" +#include "../Oracle/OracleCommandExceptionMessage.h" +#include "../Oracle/OrthancRestApiCommand.h" #include @@ -35,6 +35,8 @@ namespace OrthancStone { + class ILoadersContext; + /** This class is supplied with Oracle commands and will schedule up to simultaneousDownloads_ of them at the same time, then will schedule the diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/OrthancMultiframeVolumeLoader.h --- a/Framework/Loaders/OrthancMultiframeVolumeLoader.h Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.h Fri Apr 03 16:47:46 2020 +0200 @@ -22,7 +22,7 @@ #pragma once #include "LoaderStateMachine.h" -#include "../../Volumes/DicomVolumeImage.h" +#include "../Volumes/DicomVolumeImage.h" #include "../Volumes/IGeometryProvider.h" #include diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp --- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Fri Apr 03 16:47:46 2020 +0200 @@ -21,12 +21,12 @@ #include "OrthancSeriesVolumeProgressiveLoader.h" -#include "../../StoneException.h" -#include "../../Loaders/ILoadersContext.h" -#include "../../Loaders/BasicFetchingItemsSorter.h" -#include "../../Loaders/BasicFetchingStrategy.h" -#include "../../Toolbox/GeometryToolbox.h" -#include "../../Volumes/DicomVolumeImageMPRSlicer.h" +#include "../StoneException.h" +#include "../Loaders/ILoadersContext.h" +#include "../Loaders/BasicFetchingItemsSorter.h" +#include "../Loaders/BasicFetchingStrategy.h" +#include "../Toolbox/GeometryToolbox.h" +#include "../Volumes/DicomVolumeImageMPRSlicer.h" #include #include diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h --- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Fri Apr 03 16:13:24 2020 +0200 +++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Fri Apr 03 16:47:46 2020 +0200 @@ -21,17 +21,17 @@ #pragma once -#include "../../Loaders/IFetchingItemsSorter.h" -#include "../../Loaders/IFetchingStrategy.h" -#include "../../Messages/IObservable.h" -#include "../../Messages/ObserverBase.h" -#include "../../Oracle/GetOrthancImageCommand.h" -#include "../../Oracle/GetOrthancWebViewerJpegCommand.h" -#include "../../Oracle/IOracle.h" -#include "../../Oracle/OrthancRestApiCommand.h" -#include "../../Toolbox/SlicesSorter.h" -#include "../../Volumes/DicomVolumeImage.h" -#include "../../Volumes/IVolumeSlicer.h" +#include "../Loaders/IFetchingItemsSorter.h" +#include "../Loaders/IFetchingStrategy.h" +#include "../Messages/IObservable.h" +#include "../Messages/ObserverBase.h" +#include "../Oracle/GetOrthancImageCommand.h" +#include "../Oracle/GetOrthancWebViewerJpegCommand.h" +#include "../Oracle/IOracle.h" +#include "../Oracle/OrthancRestApiCommand.h" +#include "../Toolbox/SlicesSorter.h" +#include "../Volumes/DicomVolumeImage.h" +#include "../Volumes/IVolumeSlicer.h" #include "../Volumes/IGeometryProvider.h" @@ -40,6 +40,7 @@ namespace OrthancStone { + class ILoadersContext; /** This class is used to manage the progressive loading of a volume that is stored in a Dicom series. @@ -109,13 +110,14 @@ void LoadJpegSliceContent(const OrthancStone::GetOrthancWebViewerJpegCommand::SuccessMessage& message); OrthancStone::ILoadersContext& loadersContext_; - bool active_; - bool progressiveQuality_; - unsigned int simultaneousDownloads_; - SeriesGeometry seriesGeometry_; - boost::shared_ptr volume_; + bool active_; + bool progressiveQuality_; + unsigned int simultaneousDownloads_; + SeriesGeometry seriesGeometry_; + boost::shared_ptr volume_; std::unique_ptr sorter_; - std::unique_ptr strategy_; + std::unique_ptr strategy_; + std::vector slicesQuality_; bool volumeImageReadyInHighQuality_; diff -r 1b24f6b06408 -r 556b4bc19118 Framework/Volumes/IGeometryProvider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Framework/Volumes/IGeometryProvider.h Fri Apr 03 16:47:46 2020 +0200 @@ -0,0 +1,35 @@ +/** + * Stone of Orthanc + * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics + * Department, University Hospital of Liege, Belgium + * Copyright (C) 2017-2020 Osimis S.A., Belgium + * + * This program is free software: you can redistribute it and/or + * modify it under the terms of the GNU Affero 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 + * Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + **/ + + +#pragma once + +#include "../Volumes/VolumeImageGeometry.h" + +namespace OrthancStone +{ + class IGeometryProvider + { + public: + virtual ~IGeometryProvider() {} + virtual bool HasGeometry() const = 0; + virtual const OrthancStone::VolumeImageGeometry& GetImageGeometry() const = 0; + }; +} diff -r 1b24f6b06408 -r 556b4bc19118 Resources/CMake/OrthancStoneConfiguration.cmake --- a/Resources/CMake/OrthancStoneConfiguration.cmake Fri Apr 03 16:13:24 2020 +0200 +++ b/Resources/CMake/OrthancStoneConfiguration.cmake Fri Apr 03 16:47:46 2020 +0200 @@ -326,13 +326,6 @@ ) endif() - if (ENABLE_SDL OR ENABLE_WASM) - list(APPEND APPLICATIONS_SOURCES - ${ORTHANC_STONE_ROOT}/Applications/Generic/GuiAdapter.cpp - ${ORTHANC_STONE_ROOT}/Applications/Generic/GuiAdapter.h - ) - endif() - if (ENABLE_SDL OR ENABLE_QT) list(APPEND APPLICATIONS_SOURCES ${ORTHANC_STONE_ROOT}/Applications/Generic/NativeStoneApplicationRunner.cpp @@ -426,7 +419,6 @@ ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/IViewport.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.cpp ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Viewport/WidgetViewport.h - ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/IGeometryProvider.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/ISlicedVolume.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/IVolumeLoader.h ${ORTHANC_STONE_ROOT}/Framework/Deprecated/Volumes/StructureSetLoader.cpp @@ -503,6 +495,13 @@ ) endif() +if (ENABLE_SDL OR ENABLE_WASM) +list(APPEND APPLICATIONS_SOURCES + ${ORTHANC_STONE_ROOT}/Applications/Generic/GuiAdapter.cpp + ${ORTHANC_STONE_ROOT}/Applications/Generic/GuiAdapter.h + ) +endif() + list(APPEND ORTHANC_STONE_SOURCES #${ORTHANC_STONE_ROOT}/Framework/Layers/SeriesFrameRendererFactory.cpp @@ -718,6 +717,7 @@ ${ORTHANC_STONE_ROOT}/Framework/Viewport/IViewport.h + ${ORTHANC_STONE_ROOT}/Framework/Volumes/IGeometryProvider.h ${ORTHANC_STONE_ROOT}/Framework/Volumes/IVolumeSlicer.cpp ${ORTHANC_STONE_ROOT}/Framework/Volumes/IVolumeSlicer.h ${ORTHANC_STONE_ROOT}/Framework/Volumes/OrientedVolumeBoundingBox.cpp