diff Applications/Samples/Common/RtViewerApp.cpp @ 1896:b3c08e607d9f

simplified signature of DicomStructureSet::ProjectStructure()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Jan 2022 17:19:37 +0100
parents 7053b8a0aaec
children c7bc9e1776a6
line wrap: on
line diff
--- a/Applications/Samples/Common/RtViewerApp.cpp	Wed Jan 19 14:51:55 2022 +0100
+++ b/Applications/Samples/Common/RtViewerApp.cpp	Wed Jan 26 17:19:37 2022 +0100
@@ -67,12 +67,17 @@
     }
   }
 
-  const VolumeImageGeometry& RtViewerApp::GetMainGeometry()
+  VolumeImageGeometry RtViewerApp::GetMainGeometry()
   {
     ORTHANC_ASSERT(geometryProvider_.get() != NULL);
-    ORTHANC_ASSERT(geometryProvider_->HasGeometry());
-    const VolumeImageGeometry& geometry = geometryProvider_->GetImageGeometry();
-    return geometry;
+    if (geometryProvider_->HasGeometry())
+    {
+      return geometryProvider_->GetImageGeometry();
+    }
+    else
+    {
+      return VolumeImageGeometry();
+    }
   }
 
   RtViewerApp::RtViewerApp() :