diff OrthancServer/SliceOrdering.h @ 3538:23219b9da4d1

fix ordered-slices route to be closer to 1.5.7 behaviour
author Alain Mazy <alain@mazy.be>
date Tue, 15 Oct 2019 09:53:33 +0200
parents ac72032d69a2
children 94f4a18a79cc
line wrap: on
line diff
--- a/OrthancServer/SliceOrdering.h	Thu Oct 10 13:16:15 2019 +0200
+++ b/OrthancServer/SliceOrdering.h	Tue Oct 15 09:53:33 2019 +0200
@@ -51,7 +51,8 @@
     std::string              seriesId_;
     bool                     hasNormal_;
     Vector                   normal_;
-    std::vector<Instance*>   instances_;
+    std::vector<Instance*>   instances_;        // this vector owns the instances
+    std::vector<Instance*>   sortedInstances_;  // this vectore references the instances of instances_
     bool                     isVolume_;
 
     static bool ComputeNormal(Vector& normal,
@@ -77,14 +78,14 @@
 
     ~SliceOrdering();
 
-    size_t  GetInstancesCount() const
+    size_t  GetSortedInstancesCount() const
     {
-      return instances_.size();
+      return sortedInstances_.size();
     }
 
-    const std::string& GetInstanceId(size_t index) const;
+    const std::string& GetSortedInstanceId(size_t index) const;
 
-    unsigned int GetFramesCount(size_t index) const;
+    unsigned int GetSortedInstanceFramesCount(size_t index) const;
 
     void Format(Json::Value& result) const;
   };