diff Framework/Toolbox/SlicesSorter.cpp @ 648:1088d4c4d78c

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 13 May 2019 17:19:04 +0200
parents 6af3099ed8da
children e9339f2b5de7
line wrap: on
line diff
--- a/Framework/Toolbox/SlicesSorter.cpp	Mon May 13 17:03:46 2019 +0200
+++ b/Framework/Toolbox/SlicesSorter.cpp	Mon May 13 17:19:04 2019 +0200
@@ -148,7 +148,7 @@
   }
   
     
-  void SlicesSorter::Sort()
+  void SlicesSorter::SortInternal()
   {
     if (!hasNormal_)
     {
@@ -237,6 +237,24 @@
   }
 
 
+  bool SlicesSorter::Sort()
+  {
+    if (GetSlicesCount() > 0)
+    {
+      Vector normal;
+      if (SelectNormal(normal))
+      {
+        FilterNormal(normal);
+        SetNormal(normal);
+        SortInternal();
+        return true;
+      }
+    }
+
+    return false;
+  }
+
+
   bool SlicesSorter::LookupClosestSlice(size_t& index,
                                         double& distance,
                                         const CoordinateSystem3D& slice) const