Mercurial > hg > orthanc-stone
diff OrthancStone/Sources/Toolbox/DicomStructure2.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 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/DicomStructure2.cpp Wed Jan 19 14:25:59 2022 +0100 +++ b/OrthancStone/Sources/Toolbox/DicomStructure2.cpp Wed Jan 19 14:51:55 2022 +0100 @@ -195,7 +195,7 @@ } - bool DicomStructure2::Project(std::vector< std::pair<Point2D, Point2D> > & segments, const CoordinateSystem3D & plane) const + bool DicomStructure2::Project(std::vector< std::pair<ScenePoint2D, ScenePoint2D> > & segments, const CoordinateSystem3D & plane) const { segments.clear(); @@ -237,7 +237,7 @@ // let's compute the intersection between the polygon and the plane // intersections are in plane coords - std::vector<Point2D> intersections; + std::vector<ScenePoint2D> intersections; polygons_[i].ProjectOnConstantPlane(intersections, plane); @@ -257,12 +257,12 @@ for (size_t iRect = 0; iRect < numRects; ++iRect) { RtStructRectangleInSlab rectangle; - ORTHANC_ASSERT(LinearAlgebra::IsNear(intersections[2 * iRect].y, intersections[2 * iRect + 1].y)); + ORTHANC_ASSERT(LinearAlgebra::IsNear(intersections[2 * iRect].GetY(), intersections[2 * iRect + 1].GetY())); ORTHANC_ASSERT((2 * iRect + 1) < intersections.size()); - double x1 = intersections[2 * iRect].x; - double x2 = intersections[2 * iRect + 1].x; - double y1 = intersections[2 * iRect].y - sliceThickness_ * 0.5; - double y2 = intersections[2 * iRect].y + sliceThickness_ * 0.5; + double x1 = intersections[2 * iRect].GetX(); + double x2 = intersections[2 * iRect + 1].GetX(); + double y1 = intersections[2 * iRect].GetY() - sliceThickness_ * 0.5; + double y2 = intersections[2 * iRect].GetY() + sliceThickness_ * 0.5; rectangle.xmin = std::min(x1, x2); rectangle.xmax = std::max(x1, x2);