diff OrthancStone/Sources/Toolbox/SortedFrames.h @ 1599:73cd85d7da6a

SortedFrames::LookupSopInstanceUid()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 28 Oct 2020 10:55:45 +0100
parents 8563ea5d8ae4
children b253b79906fa
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/SortedFrames.h	Mon Oct 26 20:49:28 2020 +0100
+++ b/OrthancStone/Sources/Toolbox/SortedFrames.h	Wed Oct 28 10:55:45 2020 +0100
@@ -94,11 +94,16 @@
       }
     };
 
+
+    // Maps "SOPInstanceUID" to an index in "instances_"
+    typedef std::map<std::string, size_t>  InstancesIndex;
+
     std::string             studyInstanceUid_;
     std::string             seriesInstanceUid_;
     std::vector<Instance*>  instances_;
     std::vector<Frame>      frames_;
     bool                    sorted_;
+    InstancesIndex          instancesIndex_;
 
     const Instance& GetInstance(size_t index) const;
 
@@ -154,6 +159,9 @@
       return GetInstance(index).GetSopInstanceUid();
     }
 
+    bool LookupSopInstanceUid(size_t& instanceIndex,
+                              const std::string& sopInstanceUid) const;
+
     bool IsSorted() const
     {
       return sorted_;