changeset 924:9ba1e1198e73

merge
author Alain Mazy <alain@mazy.be>
date Mon, 22 Jul 2019 14:29:23 +0200
parents 6b81c5453382 (current diff) 988fa647df21 (diff)
children e594e76e0a81 861c080ef47b
files
diffstat 6 files changed, 25 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Jul 22 14:28:56 2019 +0200
+++ b/.hgtags	Mon Jul 22 14:29:23 2019 +0200
@@ -4,3 +4,4 @@
 c71ef52602a00dbb35f2b6bd7bd5ed516f1014fa toa2019062501
 fe96057e97b94eb8a46c1a33ba350c354b5c4afc toa2019062502
 60a403f01c3112249f9d4a1a6149bef1de9766bf toa2019062503
+81d30cd93b6586c2d190283eb23622822db0666d toa2019072201
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp	Mon Jul 22 14:28:56 2019 +0200
+++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.cpp	Mon Jul 22 14:29:23 2019 +0200
@@ -196,7 +196,6 @@
     transferSyntaxUid_ = Orthanc::Toolbox::StripSpaces(transferSyntax);
     ScheduleFrameDownloads();
   }
-    
 
   void OrthancMultiframeVolumeLoader::SetGeometry(const Orthanc::DicomMap& dicom)
   {
@@ -298,7 +297,6 @@
       }
     }
   }
-    
 
   void OrthancMultiframeVolumeLoader::SetUncompressedPixelData(const std::string& pixelData)
   {
@@ -318,7 +316,7 @@
   }
 
 
-  OrthancMultiframeVolumeLoader::OrthancMultiframeVolumeLoader(const boost::shared_ptr<DicomVolumeImage>& volume,
+  OrthancMultiframeVolumeLoader::OrthancMultiframeVolumeLoader(boost::shared_ptr<DicomVolumeImage> volume,
                                                                IOracle& oracle,
                                                                IObservable& oracleObservable) :
     LoaderStateMachine(oracle, oracleObservable),
--- a/Framework/Loaders/OrthancMultiframeVolumeLoader.h	Mon Jul 22 14:28:56 2019 +0200
+++ b/Framework/Loaders/OrthancMultiframeVolumeLoader.h	Mon Jul 22 14:29:23 2019 +0200
@@ -42,7 +42,6 @@
     std::string                          instanceId_;
     std::string                          transferSyntaxUid_;
 
-
     const std::string& GetInstanceId() const;
 
     void ScheduleFrameDownloads();
@@ -57,7 +56,7 @@
     void SetUncompressedPixelData(const std::string& pixelData);
 
   public:
-    OrthancMultiframeVolumeLoader(const boost::shared_ptr<DicomVolumeImage>& volume,
+    OrthancMultiframeVolumeLoader(boost::shared_ptr<DicomVolumeImage> volume,
                                   IOracle& oracle,
                                   IObservable& oracleObservable);
 
--- a/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Mon Jul 22 14:28:56 2019 +0200
+++ b/Framework/Loaders/OrthancSeriesVolumeProgressiveLoader.h	Mon Jul 22 14:29:23 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)
--- a/Framework/Volumes/VolumeSceneLayerSource.cpp	Mon Jul 22 14:28:56 2019 +0200
+++ b/Framework/Volumes/VolumeSceneLayerSource.cpp	Mon Jul 22 14:29:23 2019 +0200
@@ -119,6 +119,7 @@
     }
     else
     {
+      LOG(TRACE) << "VolumeSceneLayerSource::Update -- Content has changed: An update is needed";
       // Content has changed: An update is needed
       lastPlane_.reset(new CoordinateSystem3D(plane));
       lastRevision_ = slice->GetRevision();
@@ -126,10 +127,12 @@
       std::auto_ptr<ISceneLayer> layer(slice->CreateSceneLayer(configurator_.get(), plane));
       if (layer.get() == NULL)
       {
+        LOG(TRACE) << "VolumeSceneLayerSource::Update -- (layer.get() == NULL)";
         ClearLayer();
       }
       else
       {
+        LOG(TRACE) << "VolumeSceneLayerSource::Update -- (layer.get() != NULL)";
         if (configurator_.get() != NULL)
         {
           lastConfiguratorRevision_ = configurator_->GetRevision();
--- a/Framework/Volumes/VolumeSceneLayerSource.h	Mon Jul 22 14:28:56 2019 +0200
+++ b/Framework/Volumes/VolumeSceneLayerSource.h	Mon Jul 22 14:29:23 2019 +0200
@@ -34,7 +34,7 @@
      scene". The style of the layer can be fine-tuned using a "layer
      style configurator". The class only changes the layer if the
      cutting plane has been modified since the last call to "Update()".
-   **/
+   */
   class VolumeSceneLayerSource : public boost::noncopyable
   {
   private: