Mercurial > hg > orthanc-stone
diff Framework/Toolbox/DicomStructureSet.h @ 981:c20dbaab360c
Ability to cope with empty "Referenced SOP Instance UID" (dicom path (3006,0039)[i] / (0x3006, 0x0040)[0] / (0x3006, 0x0016)[0] / (0x0008, 0x1155)) + better logs + code formating
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 06 Sep 2019 09:38:18 +0200 |
parents | 61ba4b504e9a |
children | 4c9b4c4de814 |
line wrap: on
line diff
--- a/Framework/Toolbox/DicomStructureSet.h Mon Sep 02 17:44:20 2019 +0200 +++ b/Framework/Toolbox/DicomStructureSet.h Fri Sep 06 09:38:18 2019 +0200 @@ -34,7 +34,7 @@ class DicomStructureSet : public boost::noncopyable { public: - typedef std::pair<double, double> PolygonPoint; + typedef std::pair<double, double> PolygonPoint2D; private: struct ReferencedSlice @@ -72,7 +72,8 @@ Points points_; Extent2D extent_; - void CheckPoint(const Vector& v); + void CheckPointIsOnSlice(const Vector& v) const; + bool IsPointOnSlice(const Vector& v) const; public: Polygon(const std::string& sopInstanceUid) : @@ -135,7 +136,7 @@ Structure& GetStructure(size_t index); - bool ProjectStructure(std::vector< std::vector<PolygonPoint> >& polygons, + bool ProjectStructure(std::vector< std::vector<PolygonPoint2D> >& polygons, const Structure& structure, const CoordinateSystem3D& slice) const; @@ -174,7 +175,7 @@ Vector GetNormal() const; - bool ProjectStructure(std::vector< std::vector<PolygonPoint> >& polygons, + bool ProjectStructure(std::vector< std::vector<PolygonPoint2D> >& polygons, size_t index, const CoordinateSystem3D& slice) const {