comparison OrthancStone/Sources/Toolbox/DicomStructureSet.h @ 1896:b3c08e607d9f

simplified signature of DicomStructureSet::ProjectStructure()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 26 Jan 2022 17:19:37 +0100
parents 14c8f339d480
children a5e54bd87b25
comparison
equal deleted inserted replaced
1895:14c8f339d480 1896:b3c08e607d9f
38 38
39 #if ORTHANC_ENABLE_DCMTK == 1 39 #if ORTHANC_ENABLE_DCMTK == 1
40 # include <DicomParsing/ParsedDicomFile.h> 40 # include <DicomParsing/ParsedDicomFile.h>
41 #endif 41 #endif
42 42
43 //#define USE_BOOST_UNION_FOR_POLYGONS 1
44
45 43
46 #include <list> 44 #include <list>
47 45
48 namespace OrthancStone 46 namespace OrthancStone
49 { 47 {
158 156
159 const Structure& GetStructure(size_t index) const; 157 const Structure& GetStructure(size_t index) const;
160 158
161 Structure& GetStructure(size_t index); 159 Structure& GetStructure(size_t index);
162 160
163 bool ProjectStructure( 161 bool ProjectStructure(std::vector< std::vector<ScenePoint2D> >& chains,
164 #if USE_BOOST_UNION_FOR_POLYGONS == 1 162 const Structure& structure,
165 std::vector< std::vector<ScenePoint2D> >& polygons, 163 const CoordinateSystem3D& slice) const;
166 #else
167 std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments,
168 #endif
169 const Structure& structure,
170 const CoordinateSystem3D& slice) const;
171 164
172 void EstimateGeometry(); 165 void EstimateGeometry();
173 166
174 public: 167 public:
175 explicit DicomStructureSet(const FullOrthancDataset& instance) 168 explicit DicomStructureSet(const FullOrthancDataset& instance)
205 198
206 void CheckReferencedSlices(); 199 void CheckReferencedSlices();
207 200
208 Vector GetNormal() const; 201 Vector GetNormal() const;
209 202
210 #if USE_BOOST_UNION_FOR_POLYGONS == 1 203 bool ProjectStructure(std::vector< std::vector<ScenePoint2D> >& chains,
211 bool ProjectStructure(std::vector< std::vector<ScenePoint2D> >& polygons,
212 size_t index, 204 size_t index,
213 const CoordinateSystem3D& slice) const 205 const CoordinateSystem3D& slice) const
214 { 206 {
215 return ProjectStructure(polygons, GetStructure(index), slice); 207 return ProjectStructure(chains, GetStructure(index), slice);
216 } 208 }
217 #else
218 bool ProjectStructure(std::vector< std::pair<ScenePoint2D, ScenePoint2D> >& segments,
219 size_t index,
220 const CoordinateSystem3D& slice) const
221 {
222 return ProjectStructure(segments, GetStructure(index), slice);
223 }
224 #endif
225 209
226 void ProjectOntoLayer(PolylineSceneLayer& layer, 210 void ProjectOntoLayer(PolylineSceneLayer& layer,
227 const CoordinateSystem3D& plane, 211 const CoordinateSystem3D& plane,
228 size_t structureIndex, 212 size_t structureIndex,
229 const Color& color) const; 213 const Color& color) const;