comparison OrthancStone/Sources/Loaders/DicomStructureSetLoader.cpp @ 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
28 #include "../Toolbox/GeometryToolbox.h" 28 #include "../Toolbox/GeometryToolbox.h"
29 29
30 #include <Toolbox.h> 30 #include <Toolbox.h>
31 31
32 #if STONE_TIME_BLOCKING_OPS 32 #if STONE_TIME_BLOCKING_OPS
33 # include <boost/date_time/posix_time/posix_time.hpp> 33 # include <boost/date_time/posix_time/posix_time.hpp>
34 #endif 34 #endif
35 35
36 #include <algorithm> 36 #include <algorithm>
37 37
38 namespace OrthancStone 38 namespace OrthancStone
369 if ((visibility_.size() == 0) || visibility_.at(i)) 369 if ((visibility_.size() == 0) || visibility_.at(i))
370 { 370 {
371 const Color& color = content_.GetStructureColor(i); 371 const Color& color = content_.GetStructureColor(i);
372 372
373 #if USE_BOOST_UNION_FOR_POLYGONS == 1 373 #if USE_BOOST_UNION_FOR_POLYGONS == 1
374 std::vector< std::vector<Point2D> > polygons; 374 std::vector< std::vector<ScenePoint2D> > polygons;
375 375
376 if (content_.ProjectStructure(polygons, i, cuttingPlane)) 376 if (content_.ProjectStructure(polygons, i, cuttingPlane))
377 { 377 {
378 for (size_t j = 0; j < polygons.size(); j++) 378 for (size_t j = 0; j < polygons.size(); j++)
379 { 379 {
380 PolylineSceneLayer::Chain chain; 380 PolylineSceneLayer::Chain chain;
381 chain.resize(polygons[j].size()); 381 chain.resize(polygons[j].size());
382 382
383 for (size_t k = 0; k < polygons[j].size(); k++) 383 for (size_t k = 0; k < polygons[j].size(); k++)
384 { 384 {
385 chain[k] = ScenePoint2D(polygons[j][k].x, polygons[j][k].y); 385 chain[k] = ScenePoint2D(polygons[j][k].GetX(), polygons[j][k].GetY());
386 } 386 }
387 387
388 layer->AddChain(chain, true /* closed */, color); 388 layer->AddChain(chain, true /* closed */, color);
389 } 389 }
390 } 390 }
391 #else 391 #else
392 std::vector< std::pair<Point2D, Point2D> > segments; 392 std::vector< std::pair<ScenePoint2D, ScenePoint2D> > segments;
393 393
394 if (content_.ProjectStructure(segments, i, cuttingPlane)) 394 if (content_.ProjectStructure(segments, i, cuttingPlane))
395 { 395 {
396 for (size_t j = 0; j < segments.size(); j++) 396 for (size_t j = 0; j < segments.size(); j++)
397 { 397 {
398 PolylineSceneLayer::Chain chain; 398 PolylineSceneLayer::Chain chain;
399 chain.resize(2); 399 chain.resize(2);
400 400
401 chain[0] = ScenePoint2D(segments[j].first.x, segments[j].first.y); 401 chain[0] = ScenePoint2D(segments[j].first.GetX(), segments[j].first.GetY());
402 chain[1] = ScenePoint2D(segments[j].second.x, segments[j].second.y); 402 chain[1] = ScenePoint2D(segments[j].second.GetX(), segments[j].second.GetY());
403 403
404 layer->AddChain(chain, false /* NOT closed */, color); 404 layer->AddChain(chain, false /* NOT closed */, color);
405 } 405 }
406 } 406 }
407 #endif 407 #endif