diff Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h @ 921:81d30cd93b65 toa2019072201

Ability to ask the loader for the geometry in PULL mode (when subscribing to the messages is not possible) + small changes (removed const/ref qualifiers for boost::shared_ptr param, added traces, doc change)
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 22 Jul 2019 11:21:09 +0200
parents aead999345e0
children 401808e7ff2e
line wrap: on
line diff
--- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Fri Jul 19 15:15:13 2019 +0200
+++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Mon Jul 22 11:21:09 2019 +0200
@@ -92,7 +92,6 @@
       void IncrementSliceRevision(size_t index);
     };
 
-
     void ScheduleNextSliceDownload();
 
     void LoadGeometry(const OrthancRestApiCommand::SuccessMessage& message);
@@ -125,6 +124,24 @@
     void LoadSeries(const std::string& seriesId);
 
     /**
+    This getter is used by clients that do not receive the geometry through
+    subscribing, for instance if they are created or listening only AFTER the
+    "geometry loaded" message is broadcast 
+    */
+    bool HasGeometry() const
+    {
+      return seriesGeometry_.HasGeometry();
+    }
+
+    /**
+    Same remark as HasGeometry
+    */
+    const VolumeImageGeometry& GetImageGeometry() const
+    {
+      return seriesGeometry_.GetImageGeometry();
+    }
+
+    /**
     When a slice is requested, the strategy algorithm (that defines the 
     sequence of resources to be loaded from the server) is modified to 
     take into account this request (this is done in the ExtractedSlice ctor)