changeset 1522:fa30f275cd80

Removed requirement for a non-empty RTDOSE
author Benjamin Golinvaux <bgo@osimis.io>
date Fri, 31 Jul 2020 17:06:11 +0200
parents bc4c50a53bd3
children 4e3d11755e9b
files OrthancStone/Samples/Common/RtViewerApp.cpp
diffstat 1 files changed, 30 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Samples/Common/RtViewerApp.cpp	Fri Jul 31 13:36:49 2020 +0200
+++ b/OrthancStone/Samples/Common/RtViewerApp.cpp	Fri Jul 31 17:06:11 2020 +0200
@@ -157,12 +157,36 @@
     ORTHANC_ASSERT(HasArgument("ctseries") && HasArgument("rtdose") && HasArgument("rtstruct"));
 
     LOG(INFO) << "About to load:";
-    LOG(INFO) << "  CT       : " << GetArgument("ctseries");
-    LOG(INFO) << "  RTDOSE   : " << GetArgument("rtdose");
-    LOG(INFO) << "  RTSTRUCT : " << GetArgument("rtstruct");
-    ctLoader_->LoadSeries(GetArgument("ctseries"));
-    doseLoader_->LoadInstance(GetArgument("rtdose"));
-    rtstructLoader_->LoadInstanceFullVisibility(GetArgument("rtstruct"));
+
+    if (GetArgument("ctseries") == "")
+    {
+      LOG(INFO) << "  CT       : <unspecified>";
+    }
+    else
+    {
+      LOG(INFO) << "  CT       : " << GetArgument("ctseries");
+      ctLoader_->LoadSeries(GetArgument("ctseries"));
+    }
+    
+    if (GetArgument("rtdose") == "")
+    {
+      LOG(INFO) << "  RTDOSE   : <unspecified>";
+    }
+    else
+    {
+      LOG(INFO) << "  RTDOSE   : " << GetArgument("rtdose");
+      doseLoader_->LoadInstance(GetArgument("rtdose"));
+    }
+
+    if (GetArgument("rtstruct") == "")
+    {
+      LOG(INFO) << "  RTSTRUCT : : <unspecified>";
+    }
+    else
+    {
+      LOG(INFO) << "  RTSTRUCT : : " << GetArgument("rtstruct");
+      rtstructLoader_->LoadInstanceFullVisibility(GetArgument("rtstruct"));
+    }
   }
 
   void RtViewerApp::HandleGeometryReady(const DicomVolumeImage::GeometryReadyMessage& message)