comparison OrthancStone/Sources/Toolbox/DicomStructureSet.cpp @ 1885:ddaee6b96501

retrieving rt-struct info
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 14 Jan 2022 19:04:05 +0100
parents 7053b8a0aaec
children 6ce81914f7e4
comparison
equal deleted inserted replaced
1884:0c6923982fdd 1885:ddaee6b96501
698 green = s.green_; 698 green = s.green_;
699 blue = s.blue_; 699 blue = s.blue_;
700 } 700 }
701 701
702 702
703 void DicomStructureSet::GetReferencedInstances(std::set<std::string>& instances) 703 void DicomStructureSet::GetReferencedInstances(std::set<std::string>& instances) const
704 { 704 {
705 for (Structures::const_iterator structure = structures_.begin(); 705 for (Structures::const_iterator structure = structures_.begin();
706 structure != structures_.end(); ++structure) 706 structure != structures_.end(); ++structure)
707 { 707 {
708 for (Polygons::const_iterator polygon = structure->polygons_.begin(); 708 for (Polygons::const_iterator polygon = structure->polygons_.begin();
1085 layer.AddChain(chain, false, color.GetRed(), color.GetGreen(), color.GetBlue()); 1085 layer.AddChain(chain, false, color.GetRed(), color.GetGreen(), color.GetBlue());
1086 } 1086 }
1087 } 1087 }
1088 #endif 1088 #endif
1089 } 1089 }
1090
1091
1092 void DicomStructureSet::GetStructurePoints(std::list< std::vector<Vector> >& target,
1093 size_t structureIndex,
1094 const std::string& sopInstanceUid) const
1095 {
1096 target.clear();
1097
1098 const Structure& structure = GetStructure(structureIndex);
1099
1100 // TODO - Could be optimized by adding a multimap on "Structure", mapping
1101 // from SOP Instance UID to polygons
1102
1103 for (Polygons::const_iterator it = structure.polygons_.begin();
1104 it != structure.polygons_.end(); ++it)
1105 {
1106 if (it->GetSopInstanceUid() == sopInstanceUid)
1107 {
1108 target.push_back(it->GetPoints());
1109 }
1110 }
1111 }
1090 } 1112 }