Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/DicomStructureSet.h @ 131:3e6163a53b16 wasm
optimization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 16 Nov 2017 15:00:45 +0100 |
parents | c9e88e7935a4 |
children | 35c2b85836ce |
comparison
equal
deleted
inserted
replaced
130:1982d6c1d2ff | 131:3e6163a53b16 |
---|---|
20 | 20 |
21 | 21 |
22 #pragma once | 22 #pragma once |
23 | 23 |
24 #include "CoordinateSystem3D.h" | 24 #include "CoordinateSystem3D.h" |
25 #include "Extent2D.h" | |
25 | 26 |
26 #include <Plugins/Samples/Common/FullOrthancDataset.h> | 27 #include <Plugins/Samples/Common/FullOrthancDataset.h> |
27 | |
28 #include <list> | 28 #include <list> |
29 | 29 |
30 namespace OrthancStone | 30 namespace OrthancStone |
31 { | 31 { |
32 class DicomStructureSet : public boost::noncopyable | 32 class DicomStructureSet : public boost::noncopyable |
60 typedef std::list<Vector> Points; | 60 typedef std::list<Vector> Points; |
61 | 61 |
62 class Polygon | 62 class Polygon |
63 { | 63 { |
64 private: | 64 private: |
65 std::string sopInstanceUid_; | 65 std::string sopInstanceUid_; |
66 bool hasSlice_; | 66 bool hasSlice_; |
67 Vector normal_; | 67 CoordinateSystem3D geometry_; |
68 double projectionAlongNormal_; | 68 double projectionAlongNormal_; |
69 double sliceThickness_; // In millimeters | 69 double sliceThickness_; // In millimeters |
70 Points points_; | 70 Points points_; |
71 Extent2D extent_; | |
71 | 72 |
72 void CheckPoint(const Vector& v); | 73 void CheckPoint(const Vector& v); |
73 | 74 |
74 public: | 75 public: |
75 Polygon(const std::string& sopInstanceUid) : | 76 Polygon(const std::string& sopInstanceUid) : |
96 | 97 |
97 double GetSliceThickness() const | 98 double GetSliceThickness() const |
98 { | 99 { |
99 return sliceThickness_; | 100 return sliceThickness_; |
100 } | 101 } |
102 | |
103 bool Project(double& x1, | |
104 double& y1, | |
105 double& x2, | |
106 double& y2, | |
107 const CoordinateSystem3D& slice) const; | |
101 }; | 108 }; |
102 | 109 |
103 typedef std::list<Polygon> Polygons; | 110 typedef std::list<Polygon> Polygons; |
104 | 111 |
105 struct Structure | 112 struct Structure |