# HG changeset patch # User Sebastien Jodogne # Date 1574186655 -3600 # Node ID 709aa65aca175d64fe1700cbd6b75a93b2592d87 # Parent 19b1c8caade4f49d0bd1823774af7da0d0ea655f recovery of USE_BOOST_UNION_FOR_POLYGONS diff -r 19b1c8caade4 -r 709aa65aca17 Framework/Toolbox/DicomStructureSet.cpp --- a/Framework/Toolbox/DicomStructureSet.cpp Tue Nov 19 17:30:05 2019 +0100 +++ b/Framework/Toolbox/DicomStructureSet.cpp Tue Nov 19 19:04:15 2019 +0100 @@ -884,13 +884,24 @@ #ifdef USE_BOOST_UNION_FOR_POLYGONS std::vector projected; + + for (Polygons::const_iterator polygon = structure.polygons_.begin(); + polygon != structure.polygons_.end(); ++polygon) + { + double x1, y1, x2, y2; + + if (polygon->Project(x1, y1, x2, y2, slice)) + { + projected.push_back(CreateRectangle(x1, y1, x2, y2)); + } + } #else // this will contain the intersection of the polygon slab with // the cutting plane, projected on the cutting plane coord system // (that yields a rectangle) + the Z coordinate of the polygon // (this is required to group polygons with the same Z later) std::vector > projected; -#endif + for (Polygons::const_iterator polygon = structure.polygons_.begin(); polygon != structure.polygons_.end(); ++polygon) { @@ -909,6 +920,8 @@ static_cast(y2)),curZ)); } } +#endif + #ifndef USE_BOOST_UNION_FOR_POLYGONS // projected contains a set of rectangles specified by two opposite // corners (x1,y1,x2,y2) diff -r 19b1c8caade4 -r 709aa65aca17 Framework/Toolbox/DicomStructureSet.h --- a/Framework/Toolbox/DicomStructureSet.h Tue Nov 19 17:30:05 2019 +0100 +++ b/Framework/Toolbox/DicomStructureSet.h Tue Nov 19 19:04:15 2019 +0100 @@ -26,7 +26,7 @@ #include "Extent2D.h" #include "../Scene2D/Color.h" -//#define USE_BOOST_UNION_FOR_POLYGONS 1 +#define USE_BOOST_UNION_FOR_POLYGONS 1 #include