Mercurial > hg > orthanc-stone
diff Samples/Sdl/Loader.cpp @ 804:61ba4b504e9a
PolylineSceneLayer now has one color per chain
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 May 2019 15:58:21 +0200 |
parents | f38c1fc08655 |
children | 6a75f1c03c4e |
line wrap: on
line diff
--- a/Samples/Sdl/Loader.cpp Tue May 28 14:18:46 2019 +0200 +++ b/Samples/Sdl/Loader.cpp Tue May 28 15:58:21 2019 +0200 @@ -1794,8 +1794,6 @@ command->SetBody(*it); command->SetPayload(new LookupInstance(loader, *it)); Schedule(command.release()); - - printf("[%s]\n", it->c_str()); } } }; @@ -1852,12 +1850,12 @@ for (size_t i = 0; i < content_.GetStructuresCount(); i++) { + const Color& color = content_.GetStructureColor(i); + std::vector< std::vector<DicomStructureSet::PolygonPoint> > polygons; if (content_.ProjectStructure(polygons, i, cuttingPlane)) { - printf(">> %d\n", static_cast<int>(polygons.size())); - for (size_t j = 0; j < polygons.size(); j++) { PolylineSceneLayer::Chain chain; @@ -1868,7 +1866,7 @@ chain[k] = ScenePoint2D(polygons[j][k].first, polygons[j][k].second); } - layer->AddChain(chain, true /* closed */); + layer->AddChain(chain, true /* closed */, color); } } } @@ -2492,6 +2490,8 @@ OrthancStone::StoneInitialize(); //Orthanc::Logging::EnableInfoLevel(true); + printf("%d\n", __cplusplus); + try { OrthancStone::NativeApplicationContext context;