Mercurial > hg > orthanc-stone
diff Framework/Loaders/DicomStructureSetLoader.cpp @ 1030:7014c2397b45
Empty structureNames now means NOTHING will be (initially) displayed
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Mon, 07 Oct 2019 14:05:01 +0200 |
parents | 29f5f2031310 |
children | f6be9412e42a |
line wrap: on
line diff
--- a/Framework/Loaders/DicomStructureSetLoader.cpp Mon Sep 30 10:41:37 2019 +0200 +++ b/Framework/Loaders/DicomStructureSetLoader.cpp Mon Oct 07 14:05:01 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; }