changeset 1031:7b89e88bb66e toa2019100701

Merge
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 07 Oct 2019 14:09:29 +0200
parents 7014c2397b45 (diff) 0f100d0b9caf (current diff)
children 43bf09d73e03
files
diffstat 2 files changed, 15 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Loaders/DicomStructureSetLoader.cpp	Fri Oct 04 21:58:30 2019 +0200
+++ b/Framework/Loaders/DicomStructureSetLoader.cpp	Mon Oct 07 14:09:29 2019 +0200
@@ -169,10 +169,19 @@
         loader.content_.reset(new DicomStructureSet(dicom));
         size_t structureCount = loader.content_->GetStructuresCount();
         loader.structureVisibility_.resize(structureCount);
+        bool everythingVisible = false;
+        if ((loader.initiallyVisibleStructures_.size() == 1)
+          && (loader.initiallyVisibleStructures_[0].size() == 1)
+          && (loader.initiallyVisibleStructures_[0][0] == '*'))
+        {
+          everythingVisible = true;
+        }
+
         for (size_t i = 0; i < structureCount; ++i)
         {
-          // if nothing is specified in the ctor, this means we want everything visible
-          if (loader.initiallyVisibleStructures_.size() == 0)
+          // if a single "*" string is supplied, this means we want everything 
+          // to be visible...
+          if(everythingVisible)
           {
             loader.structureVisibility_.at(i) = true;
           }
--- a/Framework/Loaders/DicomStructureSetLoader.h	Fri Oct 04 21:58:30 2019 +0200
+++ b/Framework/Loaders/DicomStructureSetLoader.h	Mon Oct 07 14:09:29 2019 +0200
@@ -52,11 +52,11 @@
     bool                              structuresReady_;
 
     /**
-    At load time, these strings is used to initialize the 
-    structureVisibility_ vector.
+    At load time, these strings are used to initialize the structureVisibility_ 
+    vector.
 
-    As a special case, if initiallyVisibleStructures_ is empty, ALL structures
-    will be made visible.
+    As a special case, if initiallyVisibleStructures_ contains a single string
+    that is '*', ALL structures will be made visible.
     */
     std::vector<std::string> initiallyVisibleStructures_;