changeset 1303:83af7e562b45 broker

IGeometryProvider interface for deprecated loaders (required for AB testing in older app)
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 04 Mar 2020 09:44:09 +0100
parents 68579a31eeb4
children b7fa67bf87fa
files Framework/Deprecated/Loaders/OrthancMultiframeVolumeLoader.h Framework/Deprecated/Loaders/OrthancSeriesVolumeProgressiveLoader.h Framework/Deprecated/Volumes/IGeometryProvider.h
diffstat 3 files changed, 43 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Deprecated/Loaders/OrthancMultiframeVolumeLoader.h	Tue Feb 04 15:24:03 2020 +0100
+++ b/Framework/Deprecated/Loaders/OrthancMultiframeVolumeLoader.h	Wed Mar 04 09:44:09 2020 +0100
@@ -23,6 +23,7 @@
 
 #include "LoaderStateMachine.h"
 #include "../../Volumes/DicomVolumeImage.h"
+#include "../Volumes/IGeometryProvider.h"
 
 #include <boost/shared_ptr.hpp>
 
@@ -30,7 +31,8 @@
 {
   class OrthancMultiframeVolumeLoader :
     public LoaderStateMachine,
-    public OrthancStone::IObservable
+    public OrthancStone::IObservable,
+    public IGeometryProvider
   {
   private:
     class LoadRTDoseGeometry;
--- a/Framework/Deprecated/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Tue Feb 04 15:24:03 2020 +0100
+++ b/Framework/Deprecated/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Wed Mar 04 09:44:09 2020 +0100
@@ -33,6 +33,9 @@
 #include "../../Volumes/DicomVolumeImage.h"
 #include "../../Volumes/IVolumeSlicer.h"
 
+#include "../Volumes/IGeometryProvider.h"
+
+
 #include <boost/shared_ptr.hpp>
 
 namespace Deprecated
@@ -44,7 +47,8 @@
   class OrthancSeriesVolumeProgressiveLoader : 
     public OrthancStone::ObserverBase<OrthancSeriesVolumeProgressiveLoader>,
     public OrthancStone::IObservable,
-    public OrthancStone::IVolumeSlicer
+    public OrthancStone::IVolumeSlicer,
+    public IGeometryProvider
   {
   private:
     static const unsigned int LOW_QUALITY = 0;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Framework/Deprecated/Volumes/IGeometryProvider.h	Wed Mar 04 09:44:09 2020 +0100
@@ -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 Deprecated
+{
+  class IGeometryProvider
+  {
+  public:
+    virtual ~IGeometryProvider() {}
+    virtual bool HasGeometry() const = 0;
+    virtual const OrthancStone::VolumeImageGeometry& GetImageGeometry() const = 0;
+  };
+}