changeset 1339:556b4bc19118 broker

The loaders have been adapter to the nobroker architecture and have been put back in the regular source files
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 03 Apr 2020 16:47:46 +0200
parents 1b24f6b06408
children c7dbe89c82d7
files Framework/Deprecated/Volumes/IGeometryProvider.h Framework/Loaders/DicomStructureSetLoader.cpp Framework/Loaders/DicomStructureSetLoader.h Framework/Loaders/LoaderCache.cpp Framework/Loaders/LoaderCache.h Framework/Loaders/LoaderStateMachine.cpp Framework/Loaders/LoaderStateMachine.h Framework/Loaders/OrthancMultiframeVolumeLoader.h Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.cpp Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h Framework/Volumes/IGeometryProvider.h Resources/CMake/OrthancStoneConfiguration.cmake
diffstat 12 files changed, 93 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- 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 <http://www.gnu.org/licenses/>.
- **/
-
-
-#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;
-  };
-}
--- 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 <Core/Toolbox.h>
 
@@ -357,7 +357,7 @@
   }
    
     
-  boost::shared_ptr<Deprecated::DicomStructureSetLoader> DicomStructureSetLoader::Create(OrthancStone::ILoadersContext& loadersContext)
+  boost::shared_ptr<OrthancStone::DicomStructureSetLoader> DicomStructureSetLoader::Create(OrthancStone::ILoadersContext& loadersContext)
   {
     boost::shared_ptr<DicomStructureSetLoader> obj(
       new DicomStructureSetLoader(
--- 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 <vector>
--- 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 <unistd.h>
-# 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"
--- 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"
--- 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 <Core/OrthancException.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 <Core/IDynamicObject.h>
 
@@ -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 
--- 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 <boost/shared_ptr.hpp>
--- 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 <Core/Images/ImageProcessing.h>
 #include <Core/OrthancException.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<OrthancStone::DicomVolumeImage> volume_;
+    bool                            active_;
+    bool                            progressiveQuality_;
+    unsigned int                    simultaneousDownloads_;
+    SeriesGeometry                  seriesGeometry_;
+    boost::shared_ptr<OrthancStone::DicomVolumeImage>             volume_;
     std::unique_ptr<OrthancStone::IFetchingItemsSorter::IFactory> sorter_;
-    std::unique_ptr<OrthancStone::IFetchingStrategy> strategy_;
+    std::unique_ptr<OrthancStone::IFetchingStrategy>              strategy_;
+    
     std::vector<unsigned int>     slicesQuality_;
     bool                          volumeImageReadyInHighQuality_;
     
--- /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 <http://www.gnu.org/licenses/>.
+ **/
+
+
+#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;
+  };
+}
--- 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