diff OrthancStone/Sources/Loaders/DicomStructureSetLoader.cpp @ 1895:14c8f339d480

removed redundant definitions Point2D, Point3D and Vector3D from DicomStructureSetUtils.h
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 19 Jan 2022 14:51:55 +0100
parents 7053b8a0aaec
children b3c08e607d9f
line wrap: on
line diff
--- a/OrthancStone/Sources/Loaders/DicomStructureSetLoader.cpp	Wed Jan 19 14:25:59 2022 +0100
+++ b/OrthancStone/Sources/Loaders/DicomStructureSetLoader.cpp	Wed Jan 19 14:51:55 2022 +0100
@@ -30,7 +30,7 @@
 #include <Toolbox.h>
 
 #if STONE_TIME_BLOCKING_OPS
-# include <boost/date_time/posix_time/posix_time.hpp>
+#  include <boost/date_time/posix_time/posix_time.hpp>
 #endif
 
 #include <algorithm>
@@ -371,7 +371,7 @@
           const Color& color = content_.GetStructureColor(i);
 
 #if USE_BOOST_UNION_FOR_POLYGONS == 1
-          std::vector< std::vector<Point2D> > polygons;
+          std::vector< std::vector<ScenePoint2D> > polygons;
           
           if (content_.ProjectStructure(polygons, i, cuttingPlane))
           {
@@ -382,14 +382,14 @@
               
               for (size_t k = 0; k < polygons[j].size(); k++)
               {
-                chain[k] = ScenePoint2D(polygons[j][k].x, polygons[j][k].y);
+                chain[k] = ScenePoint2D(polygons[j][k].GetX(), polygons[j][k].GetY());
               }
               
               layer->AddChain(chain, true /* closed */, color);
             }
           }
 #else
-          std::vector< std::pair<Point2D, Point2D> > segments;
+          std::vector< std::pair<ScenePoint2D, ScenePoint2D> > segments;
 
           if (content_.ProjectStructure(segments, i, cuttingPlane))
           {
@@ -398,8 +398,8 @@
               PolylineSceneLayer::Chain chain;
               chain.resize(2);
 
-              chain[0] = ScenePoint2D(segments[j].first.x, segments[j].first.y);
-              chain[1] = ScenePoint2D(segments[j].second.x, segments[j].second.y);
+              chain[0] = ScenePoint2D(segments[j].first.GetX(), segments[j].first.GetY());
+              chain[1] = ScenePoint2D(segments[j].second.GetX(), segments[j].second.GetY());
 
               layer->AddChain(chain, false /* NOT closed */, color);
             }