Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/DicomStructureSetUtils.h @ 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 |
comparison
equal
deleted
inserted
replaced
1894:438071a29f77 | 1895:14c8f339d480 |
---|---|
23 #pragma once | 23 #pragma once |
24 | 24 |
25 #include <vector> | 25 #include <vector> |
26 #include <utility> | 26 #include <utility> |
27 | 27 |
28 #include "../Scene2D/ScenePoint2D.h" | |
28 #include "../Toolbox/LinearAlgebra.h" | 29 #include "../Toolbox/LinearAlgebra.h" |
29 | 30 |
30 namespace OrthancStone | 31 namespace OrthancStone |
31 { | 32 { |
32 #if 0 | |
33 struct Point3D | |
34 { | |
35 Point3D(double x, double y, double z) : x(x), y(y), z(z) {} | |
36 Point3D() : x(0), y(0), z(0) {} | |
37 double x, y, z; | |
38 }; | |
39 | |
40 struct Vector3D | |
41 { | |
42 Vector3D(double x, double y, double z) : x(x), y(y), z(z) {} | |
43 Vector3D() : x(0), y(0), z(0) {} | |
44 double x, y, z; | |
45 }; | |
46 #else | |
47 typedef Vector Vector3D; | |
48 typedef Vector Point3D; | |
49 #endif | |
50 | |
51 struct Point2D | |
52 { | |
53 Point2D(double x, double y) : x(x), y(y) {} | |
54 Point2D() : x(0), y(0) {} | |
55 double x, y; | |
56 }; | |
57 | |
58 | |
59 /** Internal */ | 33 /** Internal */ |
60 struct RtStructRectangleInSlab | 34 struct RtStructRectangleInSlab |
61 { | 35 { |
62 double xmin, xmax, ymin, ymax; | 36 double xmin, xmax, ymin, ymax; |
63 }; | 37 }; |
73 /** Internal */ | 47 /** Internal */ |
74 void PartitionRectangleList(std::vector< std::vector<size_t> > & sets, const std::vector<RtStructRectanglesInSlab>); | 48 void PartitionRectangleList(std::vector< std::vector<size_t> > & sets, const std::vector<RtStructRectanglesInSlab>); |
75 #endif | 49 #endif |
76 | 50 |
77 /** Internal */ | 51 /** Internal */ |
78 void ConvertListOfSlabsToSegments(std::vector< std::pair<Point2D, Point2D> >& segments, const std::vector<RtStructRectanglesInSlab>& slabCuts, const size_t totalRectCount); | 52 void ConvertListOfSlabsToSegments(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments, const std::vector<RtStructRectanglesInSlab>& slabCuts, const size_t totalRectCount); |
79 | 53 |
80 /** Internal */ | 54 /** Internal */ |
81 void AddSlabBoundaries(std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, const std::vector<RtStructRectanglesInSlab>& slabCuts, size_t iSlab); | 55 void AddSlabBoundaries(std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, const std::vector<RtStructRectanglesInSlab>& slabCuts, size_t iSlab); |
82 | 56 |
83 /** Internal */ | 57 /** Internal */ |
84 void ProcessBoundaryList(std::vector< std::pair<Point2D, Point2D> >& segments, const std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, double y); | 58 void ProcessBoundaryList(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments, const std::vector<std::pair<double, RectangleBoundaryKind> >& boundaries, double y); |
85 | 59 |
86 } | 60 } |