Mercurial > hg > orthanc-stone
comparison Framework/Toolbox/DicomStructurePolygon2.cpp @ 1018:58eed6bbcabb
fix warnings
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 26 Sep 2019 09:22:27 +0200 |
parents | 38b6bb0bdd72 |
children | 29f5f2031310 |
comparison
equal
deleted
inserted
replaced
1017:069519ae389b | 1018:58eed6bbcabb |
---|---|
87 double planeV = 0.0; | 87 double planeV = 0.0; |
88 | 88 |
89 // if true, then "u" in the code is "x" and "v" is "y". | 89 // if true, then "u" in the code is "x" and "v" is "y". |
90 // (v is constant in the plane) | 90 // (v is constant in the plane) |
91 bool uvxy = false; | 91 bool uvxy = false; |
92 // if true, then "u" in the code is "y" and "v" is "x" | |
93 // (v is constant in the plane) | |
94 bool uvyx = false; | |
95 | 92 |
96 size_t uindex = static_cast<size_t>(-1); | 93 size_t uindex = static_cast<size_t>(-1); |
97 size_t vindex = static_cast<size_t>(-1); | 94 size_t vindex = static_cast<size_t>(-1); |
98 | 95 |
99 ORTHANC_ASSERT(LinearAlgebra::IsNear(plane.GetNormal()[2], 0.0)); | 96 ORTHANC_ASSERT(LinearAlgebra::IsNear(plane.GetNormal()[2], 0.0)); |
104 // plane is constant X | 101 // plane is constant X |
105 uindex = 1; | 102 uindex = 1; |
106 vindex = 0; | 103 vindex = 0; |
107 | 104 |
108 uvxy = false; | 105 uvxy = false; |
109 uvyx = true; | |
110 planeV = plane.GetOrigin()[0]; | 106 planeV = plane.GetOrigin()[0]; |
111 if (planeV < minX_) | 107 if (planeV < minX_) |
112 return; | 108 return; |
113 if (planeV > maxX_) | 109 if (planeV > maxX_) |
114 return; | 110 return; |
119 // plane is constant Y | 115 // plane is constant Y |
120 uindex = 0; | 116 uindex = 0; |
121 vindex = 1; | 117 vindex = 1; |
122 | 118 |
123 uvxy = true; | 119 uvxy = true; |
124 uvyx = false; | |
125 planeV = plane.GetOrigin()[1]; | 120 planeV = plane.GetOrigin()[1]; |
126 if (planeV < minY_) | 121 if (planeV < minY_) |
127 return; | 122 return; |
128 if (planeV > maxY_) | 123 if (planeV > maxY_) |
129 return; | 124 return; |
252 | 247 |
253 // the plane is horizontal | 248 // the plane is horizontal |
254 ORTHANC_ASSERT(LinearAlgebra::IsNear(plane.GetNormal()[0], 0.0)); | 249 ORTHANC_ASSERT(LinearAlgebra::IsNear(plane.GetNormal()[0], 0.0)); |
255 ORTHANC_ASSERT(LinearAlgebra::IsNear(plane.GetNormal()[1], 0.0)); | 250 ORTHANC_ASSERT(LinearAlgebra::IsNear(plane.GetNormal()[1], 0.0)); |
256 | 251 |
257 size_t pointCount = GetPointCount(); | |
258 | |
259 segments.clear(); | 252 segments.clear(); |
260 segments.reserve(points_.size()); | 253 segments.reserve(points_.size()); |
261 // since the returned values need to be expressed in the supplied coordinate | 254 // since the returned values need to be expressed in the supplied coordinate |
262 // system, we need to subtract origin_ from the returned points | 255 // system, we need to subtract origin_ from the returned points |
263 | 256 |