diff OrthancStone/Sources/Toolbox/SlicesSorter.cpp @ 1766:ae18b5cfbd3e

VolumeImageGeometry::DetectProjection() reports if normal is opposite
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 11 May 2021 11:31:34 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/SlicesSorter.cpp	Tue May 11 11:01:22 2021 +0200
+++ b/OrthancStone/Sources/Toolbox/SlicesSorter.cpp	Tue May 11 11:31:34 2021 +0200
@@ -259,38 +259,6 @@
   }
 
 
-  bool SlicesSorter::LookupClosestSlice(size_t& index,
-                                        double& distance,
-                                        const CoordinateSystem3D& slice) const
-  {
-    // TODO Turn this linear-time lookup into a log-time lookup,
-    // keeping track of whether the slices are sorted along the normal
-
-    bool found = false;
-    
-    distance = std::numeric_limits<double>::infinity();
-    
-    for (size_t i = 0; i < slices_.size(); i++)
-    {
-      assert(slices_[i] != NULL);
-
-      double tmp;
-      if (CoordinateSystem3D::ComputeDistance(tmp, slices_[i]->GetGeometry(), slice))
-      {
-        if (!found ||
-            tmp < distance)
-        {
-          index = i;
-          distance = tmp;
-          found = true;
-        }
-      }
-    }
-
-    return found;
-  }
-
-
   bool SlicesSorter::ComputeSpacingBetweenSlices(double& spacing /* out */) const
   {
     if (GetSlicesCount() <= 1)